-
Notifications
You must be signed in to change notification settings - Fork 112
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
Add hipstdpar support to BabelStream #195
base: develop
Are you sure you want to change the base?
Conversation
src/std-indices/model.cmake
Outdated
@@ -50,4 +66,13 @@ macro(setup) | |||
register_definitions(USE_ONEDPL) | |||
register_link_library(oneDPL) | |||
endif () | |||
if (CLANG_OFFLOAD) |
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.
I'm not totally sold on the name of this definition as CLANG is not specific to AMD, but the CLANG_FLAGS
set below are definitely specific. Can we rename this please to something appropriate?
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.
Would replacing CLANG_OFFLOAD
with AMDGPU_TARGET_OFFLOAD
and CLANG_FLAGS
with AMDGPU_TARGET_OFFLOAD_FLAGS
be acceptable?
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.
Hi @tomdeakin, please confirm if the above suggestion would work or recommend something better. I can make the changes accordingly.
It's great to see hipstdpar working, so let's work to get this merged in. Thanks for the contributions. |
Change definition names to be more specific to AMD GPUs
Hi @tomdeakin, @afanfa and I have made the changes requested. Please check and approve if everything looks okay. |
Added this PR with some fixes to #202 . |
This PR adds support for offload to AMD GPUs using the
par_unseq
execution policy in C++ standard parallelism algorithms. To trigger the GPU offload of all parallel algorithms, the--hipstdpar
compilation flag must be provided. For GPU targets other than the current default ofgfx906
, the--offload-arch=<arch_string>
option must also be provided at compile time.When using ROCm 6.1.0, the compilation commands may look like the following if compiling for an AMD Instinct MI200 series GPU:
Remember to set the environment variable to enable address translation and page migration (where applicable) when running
std-data-stream
orstd-indices-stream
: