We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 510f3c7 commit 37a0e5bCopy full SHA for 37a0e5b
mlir/include/mlir/Dialect/Utils/ReshapeOpsUtils.h
@@ -387,7 +387,8 @@ struct ComposeExpandOfCollapseOp : public OpRewritePattern<ExpandOpTy> {
387
auto resultSubShape =
388
resultShape.slice(resultIndices.front(), resultIndices.size());
389
390
- if (llvm::count_if(srcSubShape, ShapedType::isDynamic) >= 2)
+ if (llvm::count_if(srcSubShape, ShapedType::isDynamic) >= 2 &&
391
+ llvm::count_if(resultSubShape, ShapedType::isDynamic) >= 2)
392
return std::nullopt;
393
394
if (srcSubShape.size() == resultSubShape.size()) {
0 commit comments