[Mlir-commits] [mlir] [mlir][GPU] Plumb range information through the NVVM lowerings (PR #107659)

Krzysztof Drewniak llvmlistbot at llvm.org
Fri Sep 13 10:07:46 PDT 2024


================
@@ -917,6 +929,20 @@ gpu.module @test_module_48 {
   }
 }
 
+gpu.module @test_module_49 {
+// CHECK-LABEL: func @explicit_id_bounds()
+  func.func @explicit_id_bounds() -> (index, index, index) {
+    // CHECK: = nvvm.read.ptx.sreg.tid.x range <i32, 0, 32> : i32
+    %0 = gpu.thread_id x upper_bound 32
+    // CHECK: = nvvm.read.ptx.sreg.ntid.x range <i32, 1, 33> : i32
+    %1 = gpu.block_dim x upper_bound 32
----------------
krzysz00 wrote:

I'm open to tweaking that

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


More information about the Mlir-commits mailing list