Skip to content

Commit 1fe0b8b

Browse files
committed
Adjust return type to new signature of materialization callbacks
1 parent 21fd016 commit 1fe0b8b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ static Value createLinalgBodyCalculationForElementwiseOp(
8787
else
8888
return rewriter.create<arith::DivUIOp>(loc, resultTypes, args);
8989
}
90-
90+
9191
// tosa::IntDivOp
9292
if (isa<tosa::IntDivOp>(op) && isa<IntegerType>(elementTy))
9393
return rewriter.create<arith::DivSIOp>(loc, resultTypes, args);
@@ -2826,18 +2826,18 @@ void mlir::tosa::populateTosaToLinalgTypeConversion(TypeConverter &converter) {
28262826
});
28272827
converter.addSourceMaterialization([&](OpBuilder &builder, Type resultType,
28282828
ValueRange inputs,
2829-
Location loc) -> std::optional<Value> {
2829+
Location loc) -> Value {
28302830
if (inputs.size() != 1)
2831-
return std::nullopt;
2831+
return Value();
28322832

28332833
return builder.create<UnrealizedConversionCastOp>(loc, resultType, inputs)
28342834
.getResult(0);
28352835
});
28362836
converter.addTargetMaterialization([&](OpBuilder &builder, Type resultType,
28372837
ValueRange inputs,
2838-
Location loc) -> std::optional<Value> {
2838+
Location loc) -> Value {
28392839
if (inputs.size() != 1)
2840-
return std::nullopt;
2840+
return Value();
28412841

28422842
return builder.create<UnrealizedConversionCastOp>(loc, resultType, inputs)
28432843
.getResult(0);

0 commit comments

Comments
 (0)