[Mlir-commits] [mlir] [mlir] Check if the stride tensor is empty. (PR #76428)

Balaji V. Iyer. llvmlistbot at llvm.org
Thu Dec 28 07:36:58 PST 2023


================
@@ -356,3 +356,15 @@ func.func @fold_unit_dims_entirely(%arg0 : vector<8xi32>,
 // CHECK:           %[[VAL_3:.*]] = arith.muli %[[VAL_0]], %[[VAL_1]] : vector<8xi32>
 // CHECK:           %[[VAL_4:.*]] = arith.addi %[[VAL_3]], %[[VAL_2]] : vector<8xi32>
 // CHECK:           return %[[VAL_4]] : vector<8xi32>
+
+// -----
+
+// This test is to make sure there is no crash for empty stride.
----------------
bviyer wrote:

I am sorry but I don't understand. What do you mean by a proper test? This test is a simplification of the original test that was breaking. Without my change it will break the same way, and and with my change it will not crash and run to completion. The comment was added to show why the test was added. I also added some CHECK tags with the tests, to make sure it is executing.

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


More information about the Mlir-commits mailing list