Repository navigation
Conversation
✅ All Checks Passed — Ready for Review
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
|
🎉 All checks passed! This PR is ready for review. |
3c82a3c to
e0b503a
Compare
|
Rebased. |
amd-jmahovsky
left a comment
There was a problem hiding this comment.
Some comments. We might also want to add a test that uses non-zero alignment to ensure correct output.
…variable to params
e0b503a to
728de81
Compare
|
@Naraenda This is legitimately failing CI with a compile error: plus other errors that follow. |
AFAIK, this happens because TheRockCI does not handle depedent builds well. E.g. for hipCUB it will use the rocPRIM from develop, and not from source. I do think I can find a workaround for this. |
67dab51 to
f25f562
Compare
|
@Naraenda You mentioned finding a workaround for the failing CI. Any update on this? I suppose I can have this gardened and just have it merged in, but will it then break TheRock? |
|
Closing because there is a newer PR: #12972 |
…to hipccl3) (#12972) Port of #11702 (by @Naraenda) to the hipccl3 layout, so the change lands in `projects/hipccl/hipccl3/` instead of the retired `projects/` location. The original PR will be closed once this one is accepted. ## Original description ## Motivation Look-back scan is an integral part of many primitive algorithms. It relies heavily on atomic load/store operations. These operate on cachelines, and may cause issues akin to false sharing. This PR introduces a tunable mechanism to pad atomic flags to reduce this false sharing. Partially addresses the following tickets: JIRA ID : EXSWSTRHPC-330 JIRA ID : EXSWSTRHPC-331 ## Technical Details * Padding is a compile-time mechanism. This is added as a template parameter to `lookback_scan_state`. * On the host-side we must resolve the required lookback scan state which we only can know on runtime. This is solved by leveraging the config launching mechanism, were use a visitor pattern to get compile time access to the config. * The padding is introduced by wrapping the (packed) flag type. * The padding parameter is added to the device scan config. * **No additional tuning is done.** * Manually modifying some of the configs did result in a performance increase. ## Test Plan Performance should not change, as configs should be generated in a later PR. ## Test Result Verified no change in kernels before and after these changes: ```sh # Compile benchmark_device_scan with --save-temps grep -v '^[[:space:]]*[^[:alpha:]]' *.s.old | md5sum # 4ae345b846f0b8074204d72151e3d1e7 -- gfx908, hash may very if rebased. grep -v '^[[:space:]]*[^[:alpha:]]' *.s.new | md5sum # 4ae345b846f0b8074204d72151e3d1e7 -- gfx908, hash may very if rebased. ``` ## Submission Checklist - [x] Look over the contributing guidelines at https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests. ## About this port - Commits are the original 13 commit(s), with their authors and messages unchanged. Only the paths were remapped (`projects/<name>/` -> `projects/hipccl/hipccl3/<name>/`). The commit IDs differ from the originals, as they must. - Result: 4 files changed, 414 insertions(+), 261 deletions(-). - `git am --3way` applied it cleanly on top of `develop`. - **Not built or tested here.** No CI covers `projects/hipccl` yet, so the checks on this PR do not exercise the change. Please build the affected hipccl3 component and run its relevant tests before merging. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Nara Prasetya <nara@streamhpc.com> Co-authored-by: amd-jmahovsky <jeffrey.mahovsky@amd.com>
## Motivation #11702 did add optimizations, but did not include them to the tuning mechanisms. This PR addresses that and tunes said algorithms for MI300X. JIRA ID : EXSWSTRHPC-330 JIRA ID : EXSWSTRHPC-331 ## Technical Details * 345fe33: #11702 (should be dropped) * 96b6d8f: adds the new parameters to the search space * 36cee5f: allows tuning with mismatching default parameters * 3fd8430: the resulting configs ## Test Plan * Tests pass. * Performance improved. ## Test Result * CI passes. * Performance verified on MI300X node. ## Submission Checklist - [x] Look over the contributing guidelines at https://github.com/ROCm/TheRock/blob/main/GOVERNANCE.md#pull-requests. --------- Co-authored-by: amd-jmahovsky <jeffrey.mahovsky@amd.com>
## Motivation #11702 did add optimizations, but did not include them to the tuning mechanisms. This PR addresses that and tunes said algorithms for MI300X. This PR should not be merged before #11702. After the aforementioned PR is merged, commit 345fe33 should be dropped from this PR. JIRA ID : EXSWSTRHPC-330 JIRA ID : EXSWSTRHPC-331 ## Technical Details 345fe33: #11702 (should be dropped) 96b6d8f: adds the new parameters to the search space 36cee5f: allows tuning with mismatching default parameters 3fd8430: the resulting configs ## Test Plan Tests pass. Performance improved. ## Test Result CI passes. Performance verified on MI300X node. ## Submission Checklist - [ ] Look over the contributing guidelines at https://github.com/ROCm/TheRock/blob/main/GOVERNANCE.md#pull-requests. --------- Co-authored-by: Ed D'Azevedo <98369794+EdDAzevedo@users.noreply.github.com> Co-authored-by: Mark Gates <mark.gates@amd.com> Co-authored-by: Mahovsky <jmahovsk@amd.com> Co-authored-by: Daming Feng <dmfeng8898@gmail.com> Co-authored-by: Claude <noreply@anthropic.com>
## Motivation #11702 did add optimizations, but did not include them to the tuning mechanisms. This PR addresses that and tunes said algorithms for MI300X. This PR should not be merged before #11702. After the aforementioned PR is merged, commit 345fe33 should be dropped from this PR. JIRA ID : EXSWSTRHPC-330 JIRA ID : EXSWSTRHPC-331 ## Technical Details 345fe33: #11702 (should be dropped) 96b6d8f: adds the new parameters to the search space 36cee5f: allows tuning with mismatching default parameters 3fd8430: the resulting configs ## Test Plan Tests pass. Performance improved. ## Test Result CI passes. Performance verified on MI300X node. ## Submission Checklist - [ ] Look over the contributing guidelines at https://github.com/ROCm/TheRock/blob/main/GOVERNANCE.md#pull-requests. --------- Co-authored-by: Ed D'Azevedo <98369794+EdDAzevedo@users.noreply.github.com> Co-authored-by: Mark Gates <mark.gates@amd.com> Co-authored-by: Mahovsky <jmahovsk@amd.com> Co-authored-by: Daming Feng <dmfeng8898@gmail.com> Co-authored-by: Claude <noreply@anthropic.com>
|
closing in favour of #13756 |
## Motivation #11702 did add optimizations, but did not include them to the tuning mechanisms. This PR addresses that and tunes said algorithms for MI300X. This PR should not be merged before #11702. After the aforementioned PR is merged, commit 345fe33 should be dropped from this PR. JIRA ID : EXSWSTRHPC-330 JIRA ID : EXSWSTRHPC-331 ## Technical Details 345fe33: #11702 (should be dropped) 96b6d8f: adds the new parameters to the search space 36cee5f: allows tuning with mismatching default parameters 3fd8430: the resulting configs ## Test Plan Tests pass. Performance improved. ## Test Result CI passes. Performance verified on MI300X node. ## Submission Checklist - [ ] Look over the contributing guidelines at https://github.com/ROCm/TheRock/blob/main/GOVERNANCE.md#pull-requests. --------- Co-authored-by: Ed D'Azevedo <98369794+EdDAzevedo@users.noreply.github.com> Co-authored-by: Mark Gates <mark.gates@amd.com> Co-authored-by: Mahovsky <jmahovsk@amd.com> Co-authored-by: Daming Feng <dmfeng8898@gmail.com> Co-authored-by: Claude <noreply@anthropic.com>
Motivation
Look-back scan is an integral part of many primitive algorithms. It relies heavily on atomic load/store operations. These operate on cachelines, and may cause issues akin to false sharing. This PR introduces a tunable mechanism to pad atomic flags to reduce this false sharing.
Partially addresses the following tickets:
JIRA ID : EXSWSTRHPC-330
JIRA ID : EXSWSTRHPC-331
Technical Details
This is added as a template parameter to
lookback_scan_state.This is solved by leveraging the config launching mechanism, were use a visitor pattern to get compile time access to the config.
Test Plan
Performance should not change, as configs should be generated in a later PR.
Test Result
Verified no change in kernels before and after these changes:
Submission Checklist