[Mlir-commits] [mlir] [mlir][linalg] Fix empty outer dim case for packing reshape op (PR #96732)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Jun 26 18:48:37 PDT 2024


================
@@ -605,7 +605,9 @@ static bool isDimsDivisibleByTileSizes(ArrayRef<int64_t> dimsPos,
 static int64_t applyPermutationAndReindexReassoc(
     SmallVector<ReassociationIndices> &reassocIndices,
     ArrayRef<int64_t> permutation) {
-  applyPermutationToVector<ReassociationIndices>(reassocIndices, permutation);
+  if (!permutation.empty()) {
+    applyPermutationToVector<ReassociationIndices>(reassocIndices, permutation);
+  }
----------------
yifeizh2 wrote:

Thanks for pointing out! Fixed~

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


More information about the Mlir-commits mailing list