[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:17:02 PST 2025


================
@@ -20,36 +20,6 @@ func.func @affine_apply_resul_non_index(%arg0 : index) {
   return
 }
 
-// -----
-
-#map = affine_map<(d0)[s0] -> (d0 + s0)>
-
-func.func @affine_for_lower_bound_invalid_dim(%arg : index) {
-  affine.for %n0 = 0 to 7 {
-    %dim = arith.addi %arg, %arg : index
-
-    // expected-error at +1 {{operand cannot be used as a dimension id}}
-    affine.for %n1 = 0 to #map(%dim)[%arg] {
-    }
-  }
-  return
-}
-
-// -----
-
-#map = affine_map<(d0)[s0] -> (d0 + s0)>
-
-func.func @affine_for_upper_bound_invalid_dim(%arg : index) {
-  affine.for %n0 = 0 to 7 {
-    %dim = arith.addi %arg, %arg : index
-
-    // expected-error at +1 {{operand cannot be used as a dimension id}}
-    affine.for %n1 = #map(%dim)[%arg] to 7 {
-    }
-  }
-  return
-}
-
----------------
bondhugula wrote:

Instead of simply deleting them, these can be moved to the positive tests! i.e., to `ops.mlir`. It strengthens the testing instead of just having the gpu.thread_id one now added.

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


More information about the Mlir-commits mailing list