Skip to content

Commit

Permalink
Adjust return type to new signature of materialization callbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
jorickert committed Jan 14, 2025
1 parent 21fd016 commit 1fe0b8b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ static Value createLinalgBodyCalculationForElementwiseOp(
else
return rewriter.create<arith::DivUIOp>(loc, resultTypes, args);
}

// tosa::IntDivOp
if (isa<tosa::IntDivOp>(op) && isa<IntegerType>(elementTy))
return rewriter.create<arith::DivSIOp>(loc, resultTypes, args);
Expand Down Expand Up @@ -2826,18 +2826,18 @@ void mlir::tosa::populateTosaToLinalgTypeConversion(TypeConverter &converter) {
});
converter.addSourceMaterialization([&](OpBuilder &builder, Type resultType,
ValueRange inputs,
Location loc) -> std::optional<Value> {
Location loc) -> Value {
if (inputs.size() != 1)
return std::nullopt;
return Value();

return builder.create<UnrealizedConversionCastOp>(loc, resultType, inputs)
.getResult(0);
});
converter.addTargetMaterialization([&](OpBuilder &builder, Type resultType,
ValueRange inputs,
Location loc) -> std::optional<Value> {
Location loc) -> Value {
if (inputs.size() != 1)
return std::nullopt;
return Value();

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

0 comments on commit 1fe0b8b

Please sign in to comment.