[libc-commits] [libc] [libc] Rework the RPC interface to accept runtime wave sizes (PR #80914)

Jon Chesterfield via libc-commits libc-commits at lists.llvm.org
Wed Feb 7 16:13:10 PST 2024


JonChesterfield wrote:

I think a fair amount of the complexity is from trying to treat the wavesize as a compile time constant in some places and as a variable in others. I don't think that's worth the hassle - if we go with it as a "runtime" value everywhere, it'll still constant propagate on the GPU, and it might do so on the host as well if function specialisation decides it's worth doing.

Or we could go with it's a compile time constant everywhere and make the function specialisation explicit. The host side would pick up a switch to convert the runtime value to a compile time one. Messy. In general the rpc implementation in trunk tends to trust the compiler to constant propagate (unlike the prototype which burned everything at compile time) so leaving calls to `gpu::wavesize()` scattered around is probably the better way to go. 

https://github.com/llvm/llvm-project/pull/80914


More information about the libc-commits mailing list