You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Determine session labelsifis_sess_boundary:
# This thread marks the start of a sessionresults[gid] =gid# Make sure all session boundaries are written# before populating the session idgrid=cuda.cg.this_grid()
grid.sync()
# more code here ....
However, this will only sync for some threads. Presumably the example could be changed to:
# Determine session labelsifis_sess_boundary:
# This thread marks the start of a sessionresults[gid] =gid# Make sure all session boundaries are written# before populating the session idgrid=cuda.cg.this_grid()
grid.sync()
ifis_sess_boundary:
# more code here ....
The text was updated successfully, but these errors were encountered:
These operations require participation of all threads in the specified group in order to complete the operation. All threads in the group need to pass the same values for corresponding arguments to each collective call, unless different values are explicitly allowed in the argument description. Otherwise the behavior of the call is undefined.
I think the present implementation of grid group sync in Numba happens to work with this example, because it uses a particular mechanism for synchronizing the grid, but it's an implementation detail and would fail if we switched to using the more efficient method used in newer (11.0 onwards) CUDA toolkits.
I think your suggested fix looks correct, and it should be picked up by CI if it is not, because the code is a doctest - would you like to make a PR for the fix?
https://numba.readthedocs.io/en/stable/cuda/examples.html#dividing-click-data-into-sessions
Has example containing:
However, this will only sync for some threads. Presumably the example could be changed to:
The text was updated successfully, but these errors were encountered: