-
Notifications
You must be signed in to change notification settings - Fork 407
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
OpenMPTarget: Guard scratch memory usage in ParallelReduce #6585
OpenMPTarget: Guard scratch memory usage in ParallelReduce #6585
Conversation
7b67bc9
to
fcb0452
Compare
Can we push this one post #6380 . That is where we actually start using scratch memory? |
That pull request is really for the user-requested L0 scratch memory space in TeamPolicy and doesn't touch |
Retest this please. |
Until the #6380 is merged, there is only global scratch in OpenMPTarget. Even if L0 is requested it comes from global memory. |
Right, so the two pull requests are orthogonal. |
Its a good idea, since the scratch is on global memory, we want to avoid multiple instances accessing that location. |
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.
Looks good besides the static.
All the scope_guards have a comment that says
|
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.
Oh, missed the comment. Thanks!
This should fix the occasional
openmptarget.partitioning_by_args
failures. AFAIK, we don't guard the usage of scratch memory in the OpenMPTarget backend so that we could run into race conditions when executingparallel_reduce
from multiple simultaneously likepartitioning_by_args
does.Names of the variables are up for bikeshedding, of course.