[Mlir-commits] [mlir] [mlir][gpu]add AffineScope Trait to gpu.launch. (PR #121058)
lonely eagle
llvmlistbot at llvm.org
Mon Feb 3 01:26:24 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
+
+// -----
+
+// CHECK-LABEL: @gpu_launch_affine
----------------
linuxlonelyeagle wrote:
To be honest with you.Because of the previous changes, the test should not be testing `AffineScope` Trait now.I don't have a great idea for testing the `AffineScope` trait in `gpu.launch` at the moment though.It should now be in test `gpu.launch` to test the changes made in the last PR, and it runs fine (including in my local program)
Introducing `AffineScope` is still necessary though, and I think I can fix this PR first, and I'll go back and add the tests that test `AffineScope` later.
https://github.com/llvm/llvm-project/pull/121058
More information about the Mlir-commits
mailing list