Skip to content
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

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

seanofthemillers
Copy link

@seanofthemillers seanofthemillers commented Sep 3, 2024

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:

  1. First idea or goal
  2. Second idea
  3. Third idea

This PR implements 1. and 3. It leaves out 2. for the following reasons

  • (impractical)
  • (too big)
  • (not a good idea anyway)

@seanofthemillers seanofthemillers force-pushed the feature/seanofthemillers/adding_radeon_support branch from 95de1dc to 8ca1d56 Compare September 27, 2024 17:45
Comment on lines 80 to 87
#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
Copy link
Member

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?

Copy link
Author

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.

Copy link
Member

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.

Copy link
Member

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?

Copy link
Author

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?

Copy link
Member

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.

CMakeLists.txt Outdated Show resolved Hide resolved
@seanofthemillers seanofthemillers force-pushed the feature/seanofthemillers/adding_radeon_support branch from 8ca1d56 to 314466a Compare October 8, 2024 21:53
@seanofthemillers seanofthemillers force-pushed the feature/seanofthemillers/adding_radeon_support branch from 1aa7b05 to f352a5f Compare November 18, 2024 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants