-
Notifications
You must be signed in to change notification settings - Fork 76
Added generic pragmas and created fallback for atomics #734
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
rocm-ci
merged 2 commits into
ROCm:release/rocm-rel-6.4
from
StreamHPC:upstream-atomics-generic-fix
May 22, 2025
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -77,28 +77,42 @@ | |
| #undef ROCPRIM_TARGET_CDNA1 | ||
| #undef ROCPRIM_TARGET_CDNA2 | ||
| #undef ROCPRIM_TARGET_CDNA3 | ||
| #undef ROCPRIM_TARGET_UNKNOWN | ||
|
|
||
| // See https://llvm.org/docs/AMDGPUUsage.html#instructions | ||
| #if defined(__gfx940__) || defined(__gfx941__) || defined(__gfx942__) | ||
| #if defined(__gfx940__) || defined(__gfx941__) || defined(__gfx942__) || defined(__gfx9_4_generic__) | ||
| #define ROCPRIM_TARGET_CDNA3 1 | ||
| #elif defined(__gfx90a__) | ||
| #define ROCPRIM_TARGET_CDNA2 1 | ||
| #elif defined(__gfx908__) | ||
| #define ROCPRIM_TARGET_CDNA1 1 | ||
| #elif defined(__gfx900__) || defined(__gfx902__) || defined(__gfx904__) || defined(__gfx906__) \ | ||
| || defined(__gfx90c__) | ||
| || defined(__gfx90c__) || defined(__gfx9_generic__) | ||
| #define ROCPRIM_TARGET_GCN5 1 | ||
| #elif defined(__GFX12__) | ||
| #elif defined(__GFX12__) || defined(__gfx12_generic__) | ||
| #define ROCPRIM_TARGET_RDNA4 1 | ||
| #elif defined(__GFX11__) | ||
| #elif defined(__GFX11__) || defined(__gfx11_generic__) | ||
|
Comment on lines
-93
to
+94
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It does no harm to do this, but I will note that the
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| #define ROCPRIM_TARGET_RDNA3 1 | ||
| #elif defined(__gfx1030__) || defined(__gfx1031__) || defined(__gfx1032__) || defined(__gfx1033__) \ | ||
| || defined(__gfx1034__) || defined(__gfx1035__) || defined(__gfx1036__) | ||
| || defined(__gfx1034__) || defined(__gfx1035__) || defined(__gfx1036__) \ | ||
| || defined(__gfx10_3_generic__) | ||
| #define ROCPRIM_TARGET_RDNA2 1 | ||
| #elif defined(__gfx1010__) || defined(__gfx1011__) || defined(__gfx1012__) || defined(__gfx1013__) | ||
| #elif defined(__gfx1010__) || defined(__gfx1011__) || defined(__gfx1012__) || defined(__gfx1013__) \ | ||
| || defined(__gfx10_1_generic__) | ||
| #define ROCPRIM_TARGET_RDNA1 1 | ||
| #elif defined(__GFX8__) | ||
| #define ROCPRIM_TARGET_GCN3 1 | ||
| #elif defined(__HIP_DEVICE_COMPILE__) | ||
| // Double check the build target for typos otherwise please submit an issue or pull request! | ||
| #warning "unknown build target" | ||
| #define ROCPRIM_TARGET_UNKNOWN 1 | ||
| #endif | ||
|
|
||
| // unknown targets do not support 128-bit atomics. | ||
| #if defined(ROCPRIM_TARGET_UKNOWN) | ||
| #define ROCPRIM_MAX_ATOMIC_SIZE 8 | ||
| #else | ||
| #define ROCPRIM_MAX_ATOMIC_SIZE 16 | ||
| #endif | ||
|
|
||
| // DPP is supported only after Volcanic Islands (GFX8+) | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does no harm to do this, but I will note that the
__GFX12__macro is defined whenever__gfx12_generic__is defined.