Skip to content

Commit

Permalink
[ONNX] Bump ORT version to 1.15.0 (#102248)
Browse files Browse the repository at this point in the history
Pull Request resolved: #102248
Approved by: https://github.com/abock
  • Loading branch information
titaiwangms authored and pytorchmergebot committed May 25, 2023
1 parent 3c77310 commit 053dff1
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .ci/docker/common/install_onnx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pip_install \
onnx==1.14.0

pip_install \
onnxruntime==1.14.0 \
onnxruntime==1.15.0 \
parameterized==0.8.1 \
pytest-cov==4.0.0 \
pytest-subtests==0.10.0 \
Expand Down
15 changes: 0 additions & 15 deletions test/onnx/test_fx_op_consistency.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,21 +406,6 @@
dtypes=(torch.uint8, torch.int8, torch.int16,),
reason=onnx_test_common.reason_onnx_script_does_not_support("Add", "int8, int16"),
),
xfail(
"new_full",
dtypes=onnx_test_common.BOOL_TYPES + onnx_test_common.INT_TYPES + onnx_test_common.FLOAT_TYPES,
reason=onnx_test_common.reason_onnx_runtime_does_not_support("new_full", "ORT 1.15 will support"),
),
xfail(
"new_ones",
dtypes=onnx_test_common.BOOL_TYPES + onnx_test_common.INT_TYPES + onnx_test_common.FLOAT_TYPES,
reason=onnx_test_common.reason_onnx_runtime_does_not_support("new_ones", "ORT 1.15 will support"),
),
xfail(
"new_zeros",
dtypes=onnx_test_common.BOOL_TYPES + onnx_test_common.INT_TYPES + onnx_test_common.FLOAT_TYPES,
reason=onnx_test_common.reason_onnx_runtime_does_not_support("new_zeros", "ORT 1.15 will support"),
),
xfail(
"nn.functional.adaptive_avg_pool1d",
reason=onnx_test_common.reason_onnx_script_does_not_support("aten.mean.dim"),
Expand Down
2 changes: 2 additions & 0 deletions test/onnx/test_op_consistency.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@
skip("nn.functional.scaled_dot_product_attention", reason="fixme: ORT crashes on Windows, segfaults randomly on Linux"),
skip("sqrt", dtypes=onnx_test_common.BOOL_TYPES, reason=onnx_test_common.reason_onnx_does_not_support("Sqrt")),
skip("stft", opsets=[onnx_test_common.opsets_before(17)], reason=onnx_test_common.reason_onnx_does_not_support("STFT")),
xfail("stft",
reason=onnx_test_common.reason_onnx_runtime_does_not_support("STFT", "Regression on ORT=1.15 4 percent difference")),
skip("tile", opsets=[onnx_test_common.opsets_before(13)], reason=onnx_test_common.reason_onnx_does_not_support("Tile")),
xfail("unflatten", opsets=[onnx_test_common.opsets_before(13)], reason="Helper function is needed to support legacy ops."),
)
Expand Down
25 changes: 8 additions & 17 deletions test/onnx/test_pytorch_onnx_onnxruntime.py
Original file line number Diff line number Diff line change
Expand Up @@ -650,15 +650,7 @@ def forward(

self.run_test(model, (x, y, z), input_names=("x", "y", "z"))
self.run_test(model, (x,), {"y": y, "z": z}, input_names=("x", "y", "z"))

# Requires input_names to be set so that we can feed the inputs properly into ORT.
# TODO: Export default values as ONNX initializers, then this should not raise.
# https://msdata.visualstudio.com/Vienna/_workitems/edit/969268
# Default values are accessible via FunctionSchema.
with self.assertRaisesRegex(
ValueError, "Model requires 3 inputs. Input Feed contains 2"
):
self.run_test(model, (x,), {"y": y}, input_names=("x", "y"))
self.run_test(model, (x,), {"y": y}, input_names=("x", "y"))

for example_inputs, example_kwargs in (
((x, y, None), {}),
Expand Down Expand Up @@ -742,14 +734,13 @@ def forward(
y = torch.randn(2, 3)
model = torch.jit.script(Model())

# TODO: Export default values as ONNX initializers, then this should not raise.
# https://msdata.visualstudio.com/Vienna/_workitems/edit/969268
# Default values are accessible via FunctionSchema.
with self.assertRaisesRegex(
ValueError, "Model requires 2 inputs. Input Feed contains 1"
):
self.run_test(model, (x,))
self.run_test(model, (), {"y": y})
# Optional supports None inputs
self.run_test(model, (x,))
# NOTE: default value is not supported on ONNX, so torch and ONNX has
# different behavior
with self.assertRaisesRegex(AssertionError, "Tensor-likes are not close!"):
self.run_test(model, (), {"y": y}, input_names=["y"])

self.run_test(model, (x, y))
self.run_test(model, (), {"x": x, "y": y}, input_names=("x", "y"))

Expand Down

0 comments on commit 053dff1

Please sign in to comment.