[Mlir-commits] [mlir] [mlir][linalg] Handle unset outer_dims_perm in data layout propagation (PR #98040)
Quinn Dawkins
llvmlistbot at llvm.org
Mon Jul 8 21:09:47 PDT 2024
================
@@ -912,10 +906,16 @@ pushDownUnPackOpThroughExpandShape(tensor::UnPackOp unPackOp,
// new permutation after pushing. This is because moving a source dim is
// equivalent to moving the associated expanded dims together.
SmallVector<int64_t> newOuterDimsPerm;
- for (auto outerPos : outerDimsPerm) {
- newOuterDimsPerm.insert(newOuterDimsPerm.end(),
- reassocIndices[outerPos].begin(),
- reassocIndices[outerPos].end());
+ if (!outerDimsPerm.empty()) {
----------------
qedawkins wrote:
This check seems unnecessary because the loop will already do nothing if the permutation is empty. Can we just add the comment in the empty `else` branch to the code that was there before?
https://github.com/llvm/llvm-project/pull/98040
More information about the Mlir-commits
mailing list