[Mlir-commits] [mlir] [mlir][affine]introduce AffineSymbol trait and use it for using gpu.threadid op in the inner loops. (PR #118478)

Uday Bondhugula llvmlistbot at llvm.org
Thu Jan 16 07:18:18 PST 2025


================
@@ -324,3 +324,40 @@ module attributes {gpu.container_module} {
 // CHECK:             affine.for %[[VAL_4:.*]] = %[[VAL_3]] to %[[VAL_2]] step 32 {
 // CHECK:             }
 // CHECK:             gpu.return
+
+// -----
+
+#map = affine_map<()[s0] -> (s0 mod 32)>
+
+// CHECK: #[[$ATTR_0:.+]] = affine_map<()[s0] -> (s0 mod 32)>
+
+// CHECK-LABEL: @affine_thread_id
----------------
bondhugula wrote:

Nit: Please move this right above the matching line below: `gpu.func ...`.

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


More information about the Mlir-commits mailing list