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

via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 11 04:35:56 PDT 2024


================
@@ -0,0 +1,34 @@
+; RUN: llc < %s -march=nvptx64 -mcpu=sm_72 2>&1 | FileCheck %s
+; RUN: %if ptxas %{ llc < %s -march=nvptx64 -mcpu=sm_72 | %ptxas-verify %}
+
+%struct.Large = type { [16 x double] }
+
+; CHECK: .param .u64 .ptr .global .align 16 func_align_param_0,
+; CHECK: .param .u64 func_align_param_1,
----------------
Vandana2896 wrote:

@Artem-B I have updated the attributed in this change. With the assumption that CUDA always uses global pointers for kernel arguments, .global .ptr is generated for both the arguments. The .align is generated only with the alignment is specified in CUDA, but in non CUDA alignment is default specified. 

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


More information about the llvm-commits mailing list