aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Module.cpp
diff options
context:
space:
mode:
authorJoseph Huber <jhuber6@vols.utk.edu>2023-05-19 14:58:32 -0500
committerJoseph Huber <jhuber6@vols.utk.edu>2023-05-23 10:59:47 -0500
commit29d3da3b86cc4e8d5025602e0d7a290609f44f45 (patch)
tree7d85adc1253316b8822eba02715531169faace80 /llvm/lib/IR/Module.cpp
parent75eb3bd1a43db7d72be0a12edce4b1f6a2bb1fa7 (diff)
downloadllvm-29d3da3b86cc4e8d5025602e0d7a290609f44f45.zip
llvm-29d3da3b86cc4e8d5025602e0d7a290609f44f45.tar.gz
llvm-29d3da3b86cc4e8d5025602e0d7a290609f44f45.tar.bz2
[libc] Fix the `send_n` and `recv_n` utilities under divergent lanes
We provide the `send_n` and `recv_n` utilities as a generic way to stream data between both sides of the process. This was previously tested and performed as expected when using a string of constant size. However, when the size was allowed to diverge between the threads in the warp or wavefront this could deadlock. This did not occur on NVPTX because of the use of the explicit warp sync. However, on AMD one of the work items in the wavefront could continue executing and hit the next `recv` call before the other threads, then we would deadlock as we violated the RPC invariants. This patch replaces the for loop with a thread ballot. This will cause every thread in the warp or wavefront to continue executing the loop until all of them can exit. This acts as a more explicit wavefront sync. Reviewed By: JonChesterfield Differential Revision: https://reviews.llvm.org/D150992
Diffstat (limited to 'llvm/lib/IR/Module.cpp')
0 files changed, 0 insertions, 0 deletions