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.
resultShape
1 parent 47398c2 commit b259199Copy full SHA for b259199
mlir/lib/Dialect/Shape/IR/Shape.cpp
@@ -652,15 +652,10 @@ OpFoldResult BroadcastOp::fold(FoldAdaptor adaptor) {
652
if (!adaptor.getShapes().front())
653
return nullptr;
654
655
- auto firstShape = llvm::to_vector<6>(
+ SmallVector<int64_t, 6> resultShape(
656
llvm::cast<DenseIntElementsAttr>(adaptor.getShapes().front())
657
.getValues<int64_t>());
658
659
- SmallVector<int64_t, 6> resultShape;
660
- resultShape.clear();
661
- std::copy(firstShape.begin(), firstShape.end(),
662
- std::back_inserter(resultShape));
663
-
664
for (auto next : adaptor.getShapes().drop_front()) {
665
if (!next)
666
0 commit comments