Skip to content

Commit 5082c91

Browse files
author
Ferdinand Lemaire
committed
Merge feature/fused_ops to the bump branch
1 parent 52b3d2c commit 5082c91

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

mlir/lib/Dialect/Tosa/IR/TosaCanonicalizations.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -666,8 +666,9 @@ OpFoldResult MulOp::fold(FoldAdaptor adaptor) {
666666
return mulBinaryFolder(lhsAttr, rhsAttr, resultTy, getShift());
667667
}
668668

669-
OpFoldResult ReciprocalOp::fold(ArrayRef<Attribute> operands) {
670-
auto constantAttr = dyn_cast_or_null<DenseElementsAttr>(operands[0]);
669+
OpFoldResult ReciprocalOp::fold(FoldAdaptor adaptor) {
670+
671+
auto constantAttr = dyn_cast_or_null<DenseElementsAttr>(adaptor.getOperands()[0]);
671672
auto lhsTy = dyn_cast<RankedTensorType>(getInput1().getType());
672673

673674
if (!lhsTy || !constantAttr) {
@@ -1025,7 +1026,7 @@ OpFoldResult TransposeOp::fold(FoldAdaptor adaptor) {
10251026
return getInput1();
10261027
}
10271028

1028-
OpFoldResult ConcatOp::fold(ArrayRef<Attribute> operands) {
1029+
OpFoldResult ConcatOp::fold(FoldAdaptor adaptor) {
10291030
// Fold consecutive concats on the same axis into a single op.
10301031
// Keep track of the operands so we are able to construct a new concat
10311032
// later. Conservatively assume that we double the number of operands when

mlir/lib/Tools/PDLL/Parser/Parser.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2823,7 +2823,8 @@ FailureOr<ast::OperationExpr *> Parser::createOperationExpr(
28232823
OpResultTypeContext resultTypeContext,
28242824
SmallVectorImpl<ast::Expr *> &operands,
28252825
MutableArrayRef<ast::NamedAttributeDecl *> attributes,
2826-
SmallVectorImpl<ast::Expr *> &results) {
2826+
SmallVectorImpl<ast::Expr *> &results,
2827+
unsigned numRegions) {
28272828
std::optional<StringRef> opNameRef = name->getName();
28282829
const ods::Operation *odsOp = lookupODSOperation(opNameRef);
28292830

0 commit comments

Comments
 (0)