[Mlir-commits] [mlir] [MLIR][GPU-LLVM] Add GPU to LLVM-SPV address space mapping (PR #102621)

Victor Perez llvmlistbot at llvm.org
Mon Aug 12 03:19:44 PDT 2024


================
@@ -503,3 +503,15 @@ gpu.module @kernels {
     gpu.return
   }
 }
+
+// -----
+
+gpu.module @kernels {
+// CHECK-LABEL:   llvm.func spir_funccc @address_spaces(
+// CHECK-SAME:                                          {{.*}}: !llvm.ptr<1>
+// CHECK-SAME:                                          {{.*}}: !llvm.ptr<3>
+// CHECK-SAME:                                          {{.*}}: !llvm.ptr
+  gpu.func @address_spaces(%arg0: memref<f32, #gpu.address_space<global>>, %arg1: memref<f32, #gpu.address_space<workgroup>>, %arg2: memref<f32, #gpu.address_space<private>>) {
----------------
victor-eds wrote:

That maps to `0` right now. As we're just introducing `gpu.address_space` remapping, I'd argue that's out of scope for our use case here. We can discuss if we want to keep that in the future.

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


More information about the Mlir-commits mailing list