[libc-commits] [PATCH] D159276: [libc][gpu] Thread divergence fix on volta
Jon Chesterfield via Phabricator via libc-commits
libc-commits at lists.llvm.org
Thu Aug 31 06:20:19 PDT 2023
JonChesterfield added inline comments.
================
Comment at: libc/src/__support/RPC/rpc.h:337
private:
Process<T, S> &process;
uint64_t lane_mask;
----------------
These values may be a problem. I think Port instances usually end up on the stack in the hope that SROA will disassemble the pieces. Lane_mask and index should be invariant over the lifetime of the Port. I'm not sure what the out variable is - my recollection is that it's a cache of the outbox state, but if that's true it should be a bool.
I'd guess out/receive/owns are mutable and toggle back and forth as the machine executes.
Mutable or not, I think these should all be warp invariant, and whether that invariant is known at compile time or not is probably an emergent feature of the optimiser at the moment.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D159276/new/
https://reviews.llvm.org/D159276
More information about the libc-commits
mailing list