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

Fix occupancy calculator and Use common types #1524

Merged
merged 8 commits into from
Aug 4, 2023

Conversation

MrBurmark
Copy link
Member

Summary

Fix the compilation of the occupancy calculator and Use common types between the hip and cuda backends in the occupancy calculator and kernel policies and kernel launch helper routines.

  • This PR is a refactoring, bugfix
  • It does the following (modify list as needed):
    • Modifies/refactors occupancy calcualtor and kernel policies and helpers
    • Fixes Occupancy Calculator compilation in certain circumstances

scan, in a GPU kernel launched
sort with given thread-block
size. Note that the
scan, directly mapped to global threads
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 I wish there were a good way to embedd a summary in a rst table so that we don't have to repeat the same description for multiple policies. Oh well.

@MrBurmark
Copy link
Member Author

On another note this and some other work brought up is thread safety which I've added an issue for #1525. I did fix this for the occupancy calculator functions in this PR. But we do have a general problem with reducers and memory pools when we configure without OpenMP support.

int max_blocks;
int max_threads;
};

template < typename RAJA_UNUSED_ARG(UniqueMarker), typename Func >
RAJA_INLINE
void cuda_occupancy_max_blocks_threads(Func&& func, int shmem_size,
size_t &max_blocks, size_t &max_threads)
void cuda_occupancy_max_blocks_threads(Func&& func, size_t shmem_size,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should document conventions like this in the RAJA Dev Guide so we can try to keep type usage consistent during code reviews.

@MrBurmark MrBurmark merged commit 8aca822 into develop Aug 4, 2023
12 checks passed
@MrBurmark MrBurmark deleted the bugfix/burmark1/occupancy_calculator branch August 4, 2023 15:55
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.

3 participants