[Mlir-commits] [mlir] [mlir][gpu]add AffineScope Trait to gpu.launch. (PR #121058)

lonely eagle llvmlistbot at llvm.org
Mon Feb 3 01:22:28 PST 2025


================
@@ -317,13 +317,42 @@ module attributes {gpu.container_module} {
     }
   }
 }
-// CHECK-SAME:        (%[[VAL_0:.*]]: memref<?x?xf32>) kernel {
-// CHECK:             %[[VAL_1:.*]] = arith.constant 1 : index
-// CHECK:             %[[VAL_2:.*]] = memref.dim %[[VAL_0]], %[[VAL_1]] : memref<?x?xf32>
-// CHECK:             %[[VAL_3:.*]] = arith.constant 0 : index
-// CHECK:             affine.for %[[VAL_4:.*]] = %[[VAL_3]] to %[[VAL_2]] step 32 {
-// CHECK:             }
-// CHECK:             gpu.return
+// CHECK-SAME: (%[[VAL_0:.*]]: memref<?x?xf32>) kernel {
+// CHECK: %[[VAL_1:.*]] = arith.constant 1 : index
+// CHECK: %[[VAL_2:.*]] = memref.dim %[[VAL_0]], %[[VAL_1]] : memref<?x?xf32>
+// CHECK: %[[VAL_3:.*]] = arith.constant 0 : index
+// CHECK: affine.for %{{.*}} = %[[VAL_3]] to %[[VAL_2]] step 32 {
+// CHECK: }
+// CHECK: gpu.return
----------------
linuxlonelyeagle wrote:

Still testing a few things here, tested `memref.dim`, this op does the special processing (forgot the details a bit, sorry)
I seem to understand what you mean though, this `memref.dim` is a `pure` Op, maybe the code could be simplified? (It's the holiday season over here these days, so I might wait a few days to check it out.

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


More information about the Mlir-commits mailing list