Skip to content

Commit fee88fd

Browse files
authored
[ONNX] clarifies error message for upsample interpolation mode (llvm#3940)
Changes the messaging for an `onnx.Upsample` match failure in `TorchOnnxToTorch`.
1 parent 38a0a5a commit fee88fd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Conversion/TorchOnnxToTorch/DefaultDomainQtoZ.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3331,8 +3331,8 @@ void mlir::torch::onnx_c::populateDefaultDomainQtoZ(
33313331

33323332
if (mode != "nearest" && mode != "linear")
33333333
return rewriter.notifyMatchFailure(
3334-
binder.op, "unsupported interpolation mode other than nearest, "
3335-
"linear");
3334+
binder.op,
3335+
R"(Expected valid interpolation mode: "nearest" | "linear")");
33363336

33373337
int64_t resultRank = resultType.getSizes().size();
33383338
if (resultRank > 5)

0 commit comments

Comments
 (0)