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

Lock constant memory in Cuda/HIP kernel launch with a mutex #4525

Merged

Conversation

masterleinad
Copy link
Contributor

The constant memory used for kernel launches is shared between all Cuda/HIP execution space instances. We already guard the access to make sure that the last kernel using the constant memory has finished before copying the next one. This doesn't prevent (different) kernels submitted from independent threads to be copied to the constant memory in a conflict way. Note that we already have a mutex for the case that the same kernel is submitted from different threads.

This pull request adds another mutex that guards access to the constant memory globally.

@masterleinad masterleinad force-pushed the fix_constant_memory_launch_cuda_hip branch from 369193b to 3d6b036 Compare November 11, 2021 22:30
@masterleinad masterleinad marked this pull request as ready for review November 11, 2021 22:57
@crtrott crtrott merged commit 1151436 into kokkos:develop Nov 18, 2021
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.

None yet

2 participants