[llvm] [NVPTX] Annotate CUDA kernel pointer arguments with .ptr .space .align attributes. (PR #79646)

Artem Belevich via llvm-commits llvm-commits at lists.llvm.org
Mon May 20 10:52:04 PDT 2024


================
@@ -1597,7 +1597,6 @@ void NVPTXAsmPrinter::emitFunctionParamList(const Function *F, raw_ostream &O) {
             // CUDA kernels assume that pointers are in global address space
             // See:
             // https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#parameter-state-space
-            assert(addrSpace == 0 && "Invalid address space");
----------------
Artem-B wrote:

I think this assertion is still (partially?) valid. The only case when we want to emit `.global` is if the pointer is generic or explicitly in the global AS. 

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


More information about the llvm-commits mailing list