From 28e69954a1fb25c20153c0e3636b9052e6962ffa Mon Sep 17 00:00:00 2001 From: AllenTiTaiWang Date: Wed, 15 Feb 2023 23:06:27 +0000 Subject: [PATCH] [ONNX] Support aten::bit_wise_not in fx-onnx exporter (#94919) Pull Request resolved: https://github.com/pytorch/pytorch/pull/94919 Approved by: https://github.com/justinchuby, https://github.com/wschin --- .ci/onnx/test.sh | 2 +- torch/onnx/_internal/fx/function_dispatcher.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.ci/onnx/test.sh b/.ci/onnx/test.sh index a8fe9711cf0..f29188c6fd5 100755 --- a/.ci/onnx/test.sh +++ b/.ci/onnx/test.sh @@ -64,7 +64,7 @@ if [[ "$BUILD_ENVIRONMENT" == *onnx* ]]; then # TODO: change this when onnx 1.13.1 is released. pip install --no-use-pep517 'onnx @ git+https://github.com/onnx/onnx@e192ba01e438d22ca2dedd7956e28e3551626c91' # TODO: change this when onnx-script is on testPypi - pip install 'onnx-script @ git+https://github.com/microsoft/onnx-script@a71e35bcd72537bf7572536ee57250a0c0488bf6' + pip install 'onnx-script @ git+https://github.com/microsoft/onnx-script@0298154caf6b46fc4e30abba034095c1290c26e3' # numba requires numpy <= 1.20, onnxruntime requires numpy >= 1.21. # We don't actually need it for our tests, but it's imported if it's present, so uninstall. pip uninstall -q --yes numba diff --git a/torch/onnx/_internal/fx/function_dispatcher.py b/torch/onnx/_internal/fx/function_dispatcher.py index 6ab30c3ce18..9c584adfd87 100644 --- a/torch/onnx/_internal/fx/function_dispatcher.py +++ b/torch/onnx/_internal/fx/function_dispatcher.py @@ -49,7 +49,7 @@ _ATENLIB_FUNCTIONS = { "aten::atan": ops.core.aten_atan, "aten::atanh": ops.core.aten_atanh, "aten::baddbmm": ops.core.aten_baddbmm, - "aten::bitwise_not": ops.core.aten_bitwise_not, + "aten::bitwise_not": ops.core.aten_bitwise_not_bool, "aten::bmm": ops.core.aten_bmm, "aten::ceil": ops.core.aten_ceil, "aten::celu": ops.nn.aten_celu,