Skip to content

Commit

Permalink
[ONNX] clarifies error message for upsample interpolation mode (#3940)
Browse files Browse the repository at this point in the history
Changes the messaging for an `onnx.Upsample` match failure in `TorchOnnxToTorch`.
  • Loading branch information
bjacobgordon authored Jan 6, 2025
1 parent 38a0a5a commit fee88fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Conversion/TorchOnnxToTorch/DefaultDomainQtoZ.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3331,8 +3331,8 @@ void mlir::torch::onnx_c::populateDefaultDomainQtoZ(

if (mode != "nearest" && mode != "linear")
return rewriter.notifyMatchFailure(
binder.op, "unsupported interpolation mode other than nearest, "
"linear");
binder.op,
R"(Expected valid interpolation mode: "nearest" | "linear")");

int64_t resultRank = resultType.getSizes().size();
if (resultRank > 5)
Expand Down

0 comments on commit fee88fd

Please sign in to comment.