File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed
mlir/lib/Dialect/Linalg/Transforms Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -1304,17 +1304,8 @@ struct FoldReshapeWithProducerPadOpByCollapsing
13041304 }
13051305
13061306 SmallVector<int64_t > staticCollapsedShape;
1307- for (OpFoldResult dim : collapsedShape) {
1308- if (auto attr = dyn_cast<Attribute>(dim)) {
1309- if (auto intAttr = dyn_cast<IntegerAttr>(attr)) {
1310- staticCollapsedShape.push_back (intAttr.getInt ());
1311- } else {
1312- staticCollapsedShape.push_back (ShapedType::kDynamic );
1313- }
1314- } else {
1315- staticCollapsedShape.push_back (ShapedType::kDynamic );
1316- }
1317- }
1307+ std::tie (staticCollapsedShape, std::ignore) =
1308+ decomposeMixedValues (collapsedShape);
13181309
13191310 auto newCollapseType = RankedTensorType::get (
13201311 staticCollapsedShape, padOp.getSource ().getType ().getElementType ());
You can’t perform that action at this time.
0 commit comments