-
Notifications
You must be signed in to change notification settings - Fork 103
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
Adding Radeon support by controlling wave size #1729
base: develop
Are you sure you want to change the base?
Adding Radeon support by controlling wave size #1729
Conversation
480d181
to
95de1dc
Compare
95de1dc
to
8ca1d56
Compare
#ifdef RAJA_COMPILER_MSVC | ||
// MSVC doesn't like taking a pointer to stack allocated data?!?! | ||
varType *ptr = new varType[camp::get<Pos>(data.param_tuple).size()]; | ||
camp::get<Pos>(data.param_tuple).set_data(ptr); | ||
#else | ||
varType Array[camp::get<Pos>(data.param_tuple).size()]; | ||
camp::get<Pos>(data.param_tuple).set_data(&Array[0]); | ||
#endif |
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.
Is this related to this PR?
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.
This was to address a warning that pops up in clang 18 for dynamic stack variables. I can move to a separate issue, but it was small enough I thought I would just throw it in here.
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 was wondering if anyone knew if we'd gotten past the MSVC problem from the comment.
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.
Thinking about this a bit more are we really declaring a dynamically sized array in c++ or is our function to get the size just not constexpr?
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 would appear that the compiler is not treating it as compile time knowledge - I'm not sure why. Should I remove this change from this branch to be worked on separately?
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.
Let's do that for now.
8ca1d56
to
314466a
Compare
1aa7b05
to
f352a5f
Compare
Summary
This is a feature. It adds a configuration time control parameter for the default wave size. On AMD MI cards this is generally 64, however on Radeon (gaming) cards this is usually 32. These changes will require the user to know if the card is setup for Wave32 or Wave64.
I also added a fix for the dynamically sized memory allocation which seems to trigger a lot of warnings for ROCm 6.2.
Design review (for API changes or additions---delete if unneeded)
On (date), we reviewed this PR. We discussed the design ideas:
This PR implements 1. and 3. It leaves out 2. for the following reasons