[libc-commits] [PATCH] D149598: [libc] Support concurrent RPC port access on the GPU
Jon Chesterfield via Phabricator via libc-commits
libc-commits at lists.llvm.org
Wed May 3 10:28:40 PDT 2023
JonChesterfield added inline comments.
================
Comment at: libc/src/__support/RPC/rpc.h:355
+ // Attempt to acquire the lock on this index.
+ uint64_t lane_mask = gpu::get_lane_mask();
+ uint32_t previous = 0;
----------------
You could make this less vulnerable to data races on volta by getting the appropriate thread mask outside of the loop. That's also likely to be faster on amdgpu.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149598/new/
https://reviews.llvm.org/D149598
More information about the libc-commits
mailing list