[Mlir-commits] [mlir] [mlir][tensor] Enhance pack/unpack simplification for identity outer_dims_perm cases. (PR #77409)

Han-Chung Wang llvmlistbot at llvm.org
Wed Jan 10 06:57:30 PST 2024


================
@@ -213,6 +213,14 @@ mlir::invertPermutationVector(ArrayRef<int64_t> permutation) {
   return inversion;
 }
 
+bool mlir::isIdentityPermutation(ArrayRef<int64_t> permutation) {
+  int n = permutation.size();
----------------
hanhanW wrote:

I'm changing this to `for (auto i : llvm::seq<int64_t>(0, permutation.size()))` so we won't need `n`. And `i` uses int64_t type.

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


More information about the Mlir-commits mailing list