Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ONNX] Support optional type (#68793) #73284

Closed
wants to merge 14 commits into from

Conversation

BowenBao
Copy link
Collaborator

@BowenBao BowenBao commented Feb 23, 2022

Stack from ghstack:

Some important ops won't support optional type until opset 16,
so we can't fully test things end-to-end, but I believe this should
be all that's needed. Once ONNX Runtime supports opset 16,
we can do more testing and fix any remaining bugs.

Co-authored-by: garymm [email protected]
Co-authored-by: neginraoof [email protected]

Differential Revision: D34625646

Some important ops won't support optional type until opset 16,
so we can't fully test things end-to-end, but I believe this should
be all that's needed. Once ONNX Runtime supports opset 16,
we can do more testing and fix any remaining bugs.

Co-authored-by: BowenBao <[email protected]>
Co-authored-by: neginraoof <[email protected]>

[ghstack-poisoned]
@pytorch-bot
Copy link

pytorch-bot bot commented Feb 23, 2022

CI Flow Status

⚛️ CI Flow

Ruleset - Version: v1
Ruleset - File: https://github.com/pytorch/pytorch/blob/28dd2e9e7c8e67d31aa7d1dbc0edee177b168af1/.github/generated-ciflow-ruleset.json
PR ciflow labels: ciflow/default
Add ciflow labels to this PR to trigger more builds:

Workflows Labels (bold enabled) Status
Triggered Workflows
linux-binary-conda ciflow/binaries, ciflow/binaries_conda, ciflow/default ✅ triggered
linux-binary-libtorch-cxx11-abi ciflow/binaries, ciflow/binaries_libtorch, ciflow/default ✅ triggered
linux-binary-libtorch-pre-cxx11 ciflow/binaries, ciflow/binaries_libtorch, ciflow/default ✅ triggered
linux-binary-manywheel ciflow/binaries, ciflow/binaries_wheel, ciflow/default ✅ triggered
linux-bionic-py3.7-clang9 ciflow/all, ciflow/cpu, ciflow/default, ciflow/linux, ciflow/noarch, ciflow/trunk ✅ triggered
linux-bionic-rocm4.5-py3.7 ciflow/all, ciflow/default, ciflow/linux, ciflow/rocm, ciflow/trunk ✅ triggered
linux-docs ciflow/all, ciflow/cpu, ciflow/default, ciflow/docs, ciflow/linux, ciflow/trunk ✅ triggered
linux-vulkan-bionic-py3.7-clang9 ciflow/all, ciflow/cpu, ciflow/default, ciflow/linux, ciflow/trunk, ciflow/vulkan ✅ triggered
linux-xenial-cuda11.3-py3.7-gcc7 ciflow/all, ciflow/cuda, ciflow/default, ciflow/linux, ciflow/trunk ✅ triggered
linux-xenial-cuda11.3-py3.7-gcc7-bazel-test ciflow/all, ciflow/bazel, ciflow/cpu, ciflow/default, ciflow/linux, ciflow/trunk ✅ triggered
linux-xenial-py3-clang5-mobile-build ciflow/all, ciflow/default, ciflow/linux, ciflow/mobile, ciflow/trunk ✅ triggered
linux-xenial-py3-clang5-mobile-custom-build-static ciflow/all, ciflow/default, ciflow/linux, ciflow/mobile, ciflow/trunk ✅ triggered
linux-xenial-py3.7-clang7-asan ciflow/all, ciflow/cpu, ciflow/default, ciflow/linux, ciflow/sanitizers, ciflow/trunk ✅ triggered
linux-xenial-py3.7-clang7-onnx ciflow/all, ciflow/cpu, ciflow/default, ciflow/linux, ciflow/onnx, ciflow/trunk ✅ triggered
linux-xenial-py3.7-gcc5.4 ciflow/all, ciflow/cpu, ciflow/default, ciflow/linux, ciflow/trunk ✅ triggered
linux-xenial-py3.7-gcc7 ciflow/all, ciflow/cpu, ciflow/default, ciflow/linux, ciflow/trunk ✅ triggered
linux-xenial-py3.7-gcc7-no-ops ciflow/all, ciflow/cpu, ciflow/default, ciflow/linux, ciflow/trunk ✅ triggered
macos-arm64-binary-conda ciflow/binaries, ciflow/binaries_conda, ciflow/default ✅ triggered
macos-arm64-binary-wheel ciflow/binaries, ciflow/binaries_wheel, ciflow/default ✅ triggered
macos-binary-conda ciflow/binaries, ciflow/binaries_conda, ciflow/default ✅ triggered
macos-binary-libtorch-cxx11-abi ciflow/binaries, ciflow/binaries_libtorch, ciflow/default ✅ triggered
macos-binary-libtorch-pre-cxx11 ciflow/binaries, ciflow/binaries_libtorch, ciflow/default ✅ triggered
macos-binary-wheel ciflow/binaries, ciflow/binaries_wheel, ciflow/default ✅ triggered
pytorch-linux-xenial-py3-clang5-android-ndk-r19c-gradle-custom-build-single ciflow/all, ciflow/android, ciflow/cpu, ciflow/default, ciflow/linux, ciflow/trunk ✅ triggered
pytorch-linux-xenial-py3-clang5-android-ndk-r19c-gradle-custom-build-single-full-jit ciflow/all, ciflow/android, ciflow/cpu, ciflow/default, ciflow/linux, ciflow/trunk ✅ triggered
win-vs2019-cpu-py3 ciflow/all, ciflow/cpu, ciflow/default, ciflow/trunk, ciflow/win ✅ triggered
win-vs2019-cuda11.3-py3 ciflow/all, ciflow/cuda, ciflow/default, ciflow/trunk, ciflow/win ✅ triggered
windows-binary-libtorch-cxx11-abi ciflow/binaries, ciflow/binaries_libtorch, ciflow/default ✅ triggered
windows-binary-libtorch-pre-cxx11 ciflow/binaries, ciflow/binaries_libtorch, ciflow/default ✅ triggered
windows-binary-wheel ciflow/binaries, ciflow/binaries_wheel, ciflow/default ✅ triggered
Skipped Workflows
caffe2-linux-xenial-py3.7-gcc5.4 ciflow/all, ciflow/cpu, ciflow/linux, ciflow/trunk 🚫 skipped
docker-builds ciflow/all, ciflow/trunk 🚫 skipped
ios-12-5-1-arm64 ciflow/all, ciflow/ios, ciflow/macos, ciflow/scheduled 🚫 skipped
ios-12-5-1-arm64-coreml ciflow/all, ciflow/ios, ciflow/macos, ciflow/scheduled 🚫 skipped
ios-12-5-1-arm64-custom-ops ciflow/all, ciflow/ios, ciflow/macos, ciflow/scheduled 🚫 skipped
ios-12-5-1-arm64-metal ciflow/all, ciflow/ios, ciflow/macos, ciflow/scheduled 🚫 skipped
ios-12-5-1-x86-64 ciflow/all, ciflow/ios, ciflow/macos, ciflow/trunk 🚫 skipped
ios-12-5-1-x86-64-coreml ciflow/all, ciflow/ios, ciflow/macos, ciflow/trunk 🚫 skipped
libtorch-linux-xenial-cuda10.2-py3.7-gcc7 ciflow/all, ciflow/cuda, ciflow/libtorch, ciflow/linux, ciflow/trunk 🚫 skipped
libtorch-linux-xenial-cuda11.3-py3.7-gcc7 ciflow/all, ciflow/cuda, ciflow/libtorch, ciflow/linux, ciflow/trunk 🚫 skipped
linux-bionic-cuda10.2-py3.9-gcc7 ciflow/all, ciflow/cuda, ciflow/linux, ciflow/slow, ciflow/trunk 🚫 skipped
linux-docs-push ciflow/all, ciflow/cpu, ciflow/linux, ciflow/scheduled 🚫 skipped
linux-xenial-cuda11.3-py3.7-gcc7-no-ops ciflow/all, ciflow/cuda, ciflow/linux, ciflow/trunk 🚫 skipped
macos-10-15-py3-arm64 ciflow/all, ciflow/macos, ciflow/trunk 🚫 skipped
macos-10-15-py3-lite-interpreter-x86-64 ciflow/all, ciflow/macos, ciflow/trunk 🚫 skipped
macos-11-py3-x86-64 ciflow/all, ciflow/macos, ciflow/trunk 🚫 skipped
parallelnative-linux-xenial-py3.7-gcc5.4 ciflow/all, ciflow/cpu, ciflow/linux, ciflow/trunk 🚫 skipped
periodic-libtorch-linux-bionic-cuda11.5-py3.7-gcc7 ciflow/all, ciflow/cuda, ciflow/libtorch, ciflow/linux, ciflow/scheduled 🚫 skipped
periodic-libtorch-linux-xenial-cuda11.1-py3.7-gcc7 ciflow/all, ciflow/cuda, ciflow/libtorch, ciflow/linux, ciflow/scheduled 🚫 skipped
periodic-linux-bionic-cuda11.5-py3.7-gcc7 ciflow/all, ciflow/cuda, ciflow/linux, ciflow/scheduled 🚫 skipped
periodic-linux-xenial-cuda10.2-py3-gcc7-slow-gradcheck ciflow/all, ciflow/cuda, ciflow/linux, ciflow/scheduled, ciflow/slow, ciflow/slow-gradcheck 🚫 skipped
periodic-linux-xenial-cuda11.1-py3.7-gcc7-debug ciflow/all, ciflow/cuda, ciflow/linux, ciflow/scheduled 🚫 skipped
periodic-win-vs2019-cuda11.1-py3 ciflow/all, ciflow/cuda, ciflow/scheduled, ciflow/win 🚫 skipped
periodic-win-vs2019-cuda11.5-py3 ciflow/all, ciflow/cuda, ciflow/scheduled, ciflow/win 🚫 skipped
pytorch-linux-xenial-py3-clang5-android-ndk-r19c-build ciflow/all, ciflow/android, ciflow/cpu, ciflow/linux, ciflow/trunk 🚫 skipped
pytorch-xla-linux-bionic-py3.7-clang8 ciflow/all, ciflow/cpu, ciflow/linux, ciflow/trunk, ciflow/xla 🚫 skipped

@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Feb 23, 2022

🔗 Helpful links

💊 CI failures summary and remediations

As of commit b8fab95 (more details on the Dr. CI page):

Expand to see more
  • 6/6 failures introduced in this PR

🕵️ 6 new failures recognized by patterns

The following CI failures do not appear to be due to upstream breakages

See GitHub Actions build pull / linux-xenial-py3.7-gcc5.4 / test (default, 1, 2, linux.2xlarge) (1/6)

Step: "Test" (full log | diagnosis details | 🔁 rerun)

2022-05-04T19:46:13.6292456Z RuntimeError: test_decomp failed!
2022-05-04T19:46:12.8722066Z 
2022-05-04T19:46:12.8722178Z FAILED (errors=2, skipped=46, expected failures=6)
2022-05-04T19:46:12.8722321Z 
2022-05-04T19:46:12.8722406Z Generating XML reports...
2022-05-04T19:46:13.2902155Z Generated XML report: test-reports/python-unittest/test_decomp/TEST-TestDecompCPU-20220504194501.xml
2022-05-04T19:46:13.6287868Z Traceback (most recent call last):
2022-05-04T19:46:13.6288330Z   File "test/run_test.py", line 1063, in <module>
2022-05-04T19:46:13.6290036Z     main()
2022-05-04T19:46:13.6290325Z   File "test/run_test.py", line 1041, in main
2022-05-04T19:46:13.6292208Z     raise RuntimeError(err_message)
2022-05-04T19:46:13.6292456Z RuntimeError: test_decomp failed!
2022-05-04T19:46:13.8797954Z + cleanup
2022-05-04T19:46:13.8798293Z + retcode=1
2022-05-04T19:46:13.8798540Z + set +x
2022-05-04T19:46:13.8833505Z ##[error]Process completed with exit code 1.
2022-05-04T19:46:13.8916882Z ##[group]Run pytorch/pytorch/.github/actions/get-workflow-job-id@master
2022-05-04T19:46:13.8917132Z with:
2022-05-04T19:46:13.8917538Z   github-token: ***
2022-05-04T19:46:13.8917711Z env:
2022-05-04T19:46:13.8917870Z   IN_CI: 1
2022-05-04T19:46:13.8918022Z   IS_GHA: 1

See GitHub Actions build pull / win-vs2019-cuda11.3-py3 / test (default, 1, 2, windows.8xlarge.nvidia.gpu) (2/6)

Step: "Test" (full log | diagnosis details | 🔁 rerun)

2022-05-04T23:00:11.4328232Z RuntimeError: test_decomp failed!
2022-05-04T23:00:09.4118232Z FAILED (errors=2, skipped=116, expected failures=6)
2022-05-04T23:00:09.4118446Z 
2022-05-04T23:00:09.4118567Z Generating XML reports...
2022-05-04T23:00:09.4118993Z Generated XML report: test-reports\python-unittest\test_decomp\TEST-TestDecompCPU-20220504223653.xml
2022-05-04T23:00:09.4119574Z Generated XML report: test-reports\python-unittest\test_decomp\TEST-TestDecompCUDA-20220504223653.xml
2022-05-04T23:00:11.4326624Z Traceback (most recent call last):
2022-05-04T23:00:11.4327076Z   File "run_test.py", line 1063, in <module>
2022-05-04T23:00:11.4327355Z     main()
2022-05-04T23:00:11.4327647Z   File "run_test.py", line 1041, in main
2022-05-04T23:00:11.4327938Z     raise RuntimeError(err_message)
2022-05-04T23:00:11.4328232Z RuntimeError: test_decomp failed!
2022-05-04T23:00:11.8382046Z 
2022-05-04T23:00:11.8383042Z (base) C:\actions-runner\_work\pytorch\pytorch\test>if ERRORLEVEL 1 goto fail 
2022-05-04T23:00:11.8386189Z 
2022-05-04T23:00:11.8386631Z (base) C:\actions-runner\_work\pytorch\pytorch\test>exit /b 1 
2022-05-04T23:00:11.8424784Z + cleanup
2022-05-04T23:00:11.8425279Z + retcode=1
2022-05-04T23:00:11.8425872Z + set +x
2022-05-04T23:00:11.8466836Z ##[error]Process completed with exit code 1.
2022-05-04T23:00:11.9025285Z ##[group]Run pytorch/pytorch/.github/actions/get-workflow-job-id@master
2022-05-04T23:00:11.9025703Z with:

See GitHub Actions build pull / linux-xenial-py3.7-gcc7 / test (default, 2, 2, linux.2xlarge) (3/6)

Step: "Test" (full log | diagnosis details | 🔁 rerun)

2022-05-04T19:32:28.0734206Z RuntimeError: test_decomp failed!
2022-05-04T19:32:27.2892931Z 
2022-05-04T19:32:27.2893042Z FAILED (errors=2, skipped=46, expected failures=6)
2022-05-04T19:32:27.2893183Z 
2022-05-04T19:32:27.2893266Z Generating XML reports...
2022-05-04T19:32:27.7074893Z Generated XML report: test-reports/python-unittest/test_decomp/TEST-TestDecompCPU-20220504193117.xml
2022-05-04T19:32:28.0729229Z Traceback (most recent call last):
2022-05-04T19:32:28.0729740Z   File "test/run_test.py", line 1063, in <module>
2022-05-04T19:32:28.0731721Z     main()
2022-05-04T19:32:28.0731957Z   File "test/run_test.py", line 1041, in main
2022-05-04T19:32:28.0733800Z     raise RuntimeError(err_message)
2022-05-04T19:32:28.0734206Z RuntimeError: test_decomp failed!
2022-05-04T19:32:28.3629194Z + cleanup
2022-05-04T19:32:28.3629614Z + retcode=1
2022-05-04T19:32:28.3629830Z + set +x
2022-05-04T19:32:28.3663000Z ##[error]Process completed with exit code 1.
2022-05-04T19:32:28.3702902Z ##[group]Run pytorch/pytorch/.github/actions/get-workflow-job-id@master
2022-05-04T19:32:28.3703149Z with:
2022-05-04T19:32:28.3703565Z   github-token: ***
2022-05-04T19:32:28.3703738Z env:
2022-05-04T19:32:28.3703880Z   IN_CI: 1
2022-05-04T19:32:28.3704039Z   IS_GHA: 1

See GitHub Actions build pull / win-vs2019-cpu-py3 / test (default, 2, 2, windows.4xlarge) (4/6)

Step: "Test" (full log | diagnosis details | 🔁 rerun)

2022-05-04T20:32:02.7539456Z RuntimeError: test_decomp failed!
2022-05-04T20:32:02.3907820Z 
2022-05-04T20:32:02.3907965Z FAILED (errors=2, skipped=46, expected failures=6)
2022-05-04T20:32:02.3908123Z 
2022-05-04T20:32:02.3908223Z Generating XML reports...
2022-05-04T20:32:02.3908566Z Generated XML report: test-reports\dist-gloo\test_decomp\TEST-TestDecompCPU-20220504203037.xml
2022-05-04T20:32:02.7538167Z Traceback (most recent call last):
2022-05-04T20:32:02.7538546Z   File "run_test.py", line 1063, in <module>
2022-05-04T20:32:02.7538761Z     main()
2022-05-04T20:32:02.7538972Z   File "run_test.py", line 1041, in main
2022-05-04T20:32:02.7539227Z     raise RuntimeError(err_message)
2022-05-04T20:32:02.7539456Z RuntimeError: test_decomp failed!
2022-05-04T20:32:03.0104560Z 
2022-05-04T20:32:03.0104938Z (base) C:\actions-runner\_work\pytorch\pytorch\test>popd
2022-05-04T20:32:03.0109988Z 
2022-05-04T20:32:03.0110588Z (base) C:\actions-runner\_work\pytorch\pytorch>if ERRORLEVEL 1 exit /b 1 
2022-05-04T20:32:03.0138263Z + cleanup
2022-05-04T20:32:03.0138596Z + retcode=1
2022-05-04T20:32:03.0138878Z + set +x
2022-05-04T20:32:03.0172999Z ##[error]Process completed with exit code 1.
2022-05-04T20:32:03.0584385Z ##[group]Run pytorch/pytorch/.github/actions/get-workflow-job-id@master
2022-05-04T20:32:03.0584709Z with:

See GitHub Actions build pull / win-vs2019-cuda11.3-py3 / test (force_on_cpu, 1, 1, windows.4xlarge) (5/6)

Step: "Test" (full log | diagnosis details | 🔁 rerun)

2022-05-04T20:35:17.0750248Z RuntimeError: test_decomp failed!
2022-05-04T20:35:16.7009484Z 
2022-05-04T20:35:16.7009624Z FAILED (errors=2, skipped=46, expected failures=6)
2022-05-04T20:35:16.7009778Z 
2022-05-04T20:35:16.7009888Z Generating XML reports...
2022-05-04T20:35:16.7010216Z Generated XML report: test-reports\dist-gloo\test_decomp\TEST-TestDecompCPU-20220504203351.xml
2022-05-04T20:35:17.0748819Z Traceback (most recent call last):
2022-05-04T20:35:17.0749212Z   File "run_test.py", line 1063, in <module>
2022-05-04T20:35:17.0749419Z     main()
2022-05-04T20:35:17.0749662Z   File "run_test.py", line 1041, in main
2022-05-04T20:35:17.0750012Z     raise RuntimeError(err_message)
2022-05-04T20:35:17.0750248Z RuntimeError: test_decomp failed!
2022-05-04T20:35:17.3475628Z 
2022-05-04T20:35:17.3476346Z (base) C:\actions-runner\_work\pytorch\pytorch\test>popd
2022-05-04T20:35:17.3481099Z 
2022-05-04T20:35:17.3481517Z (base) C:\actions-runner\_work\pytorch\pytorch>if ERRORLEVEL 1 exit /b 1 
2022-05-04T20:35:17.3509615Z + cleanup
2022-05-04T20:35:17.3509961Z + retcode=1
2022-05-04T20:35:17.3510139Z + set +x
2022-05-04T20:35:17.3543532Z ##[error]Process completed with exit code 1.
2022-05-04T20:35:17.4002930Z ##[group]Run pytorch/pytorch/.github/actions/get-workflow-job-id@master
2022-05-04T20:35:17.4003255Z with:

See GitHub Actions build pull / linux-bionic-py3.7-clang9 / test (default, 2, 2, linux.2xlarge) (6/6)

Step: "Test" (full log | diagnosis details | 🔁 rerun)

2022-05-04T19:17:14.7944123Z RuntimeError: test_decomp failed!
2022-05-04T19:17:14.1086839Z 
2022-05-04T19:17:14.1086956Z FAILED (errors=2, skipped=46, expected failures=6)
2022-05-04T19:17:14.1087088Z 
2022-05-04T19:17:14.1087172Z Generating XML reports...
2022-05-04T19:17:14.5027493Z Generated XML report: test-reports/python-unittest/test_decomp/TEST-TestDecompCPU-20220504191606.xml
2022-05-04T19:17:14.7939399Z Traceback (most recent call last):
2022-05-04T19:17:14.7939874Z   File "test/run_test.py", line 1063, in <module>
2022-05-04T19:17:14.7941713Z     main()
2022-05-04T19:17:14.7942056Z   File "test/run_test.py", line 1041, in main
2022-05-04T19:17:14.7943727Z     raise RuntimeError(err_message)
2022-05-04T19:17:14.7944123Z RuntimeError: test_decomp failed!
2022-05-04T19:17:15.0099070Z 
2022-05-04T19:17:15.0099432Z real	3m53.414s
2022-05-04T19:17:15.0099742Z user	8m41.106s
2022-05-04T19:17:15.0100047Z sys	0m33.175s
2022-05-04T19:17:15.0100353Z + cleanup
2022-05-04T19:17:15.0100575Z + retcode=1
2022-05-04T19:17:15.0100724Z + set +x
2022-05-04T19:17:15.0135447Z ##[error]Process completed with exit code 1.
2022-05-04T19:17:15.0274300Z ##[group]Run pytorch/pytorch/.github/actions/get-workflow-job-id@master
2022-05-04T19:17:15.0274543Z with:

This comment was automatically generated by Dr. CI (expand for details).

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

@facebook-github-bot facebook-github-bot added the oncall: jit Add this issue/PR to JIT oncall triage queue label Feb 23, 2022
Some important ops won't support optional type until opset 16,
so we can't fully test things end-to-end, but I believe this should
be all that's needed. Once ONNX Runtime supports opset 16,
we can do more testing and fix any remaining bugs.

Co-authored-by: BowenBao <bowbaomicrosoft.com>
Co-authored-by: neginraoof <neginmrutexas.edu>

[ghstack-poisoned]
BowenBao added a commit that referenced this pull request Feb 23, 2022
Some important ops won't support optional type until opset 16,
so we can't fully test things end-to-end, but I believe this should
be all that's needed. Once ONNX Runtime supports opset 16,
we can do more testing and fix any remaining bugs.

Co-authored-by: BowenBao <bowbaomicrosoft.com>
Co-authored-by: neginraoof <neginmrutexas.edu>

ghstack-source-id: df051bdc2b735eef9830f094cefa003d1450d496
Pull Request resolved: #73284
@BowenBao BowenBao added the onnx-needs-import This PR is related to ONNX, but touches files outside of merge rule patterns, and hence needs import label Feb 23, 2022
Some important ops won't support optional type until opset 16,
so we can't fully test things end-to-end, but I believe this should
be all that's needed. Once ONNX Runtime supports opset 16,
we can do more testing and fix any remaining bugs.

Co-authored-by: BowenBao <bowbaomicrosoft.com>
Co-authored-by: neginraoof <neginmrutexas.edu>

[ghstack-poisoned]
Some important ops won't support optional type until opset 16,
so we can't fully test things end-to-end, but I believe this should
be all that's needed. Once ONNX Runtime supports opset 16,
we can do more testing and fix any remaining bugs.

Co-authored-by: BowenBao <bowbaomicrosoft.com>
Co-authored-by: neginraoof <neginmrutexas.edu>

[ghstack-poisoned]
BowenBao added a commit that referenced this pull request Mar 2, 2022
Some important ops won't support optional type until opset 16,
so we can't fully test things end-to-end, but I believe this should
be all that's needed. Once ONNX Runtime supports opset 16,
we can do more testing and fix any remaining bugs.

Co-authored-by: BowenBao <bowbaomicrosoft.com>
Co-authored-by: neginraoof <neginmrutexas.edu>

ghstack-source-id: 297f9ee8cab312adcec1a527dca70d0c31b32af2
Pull Request resolved: #73284
@malfet
Copy link
Contributor

malfet commented Mar 3, 2022

@malfet has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@malfet malfet requested a review from suo March 3, 2022 22:13
@malfet
Copy link
Contributor

malfet commented Mar 3, 2022

@suo can you please check(or add someone) who knows whether methods modified in torch/csrc/jit/ folder affect something outside of torch exporter?

@suo
Copy link
Member

suo commented Mar 16, 2022

sorry, missed the ping. @eellison do you mind looking over the JIT changes

@malfet malfet requested a review from eellison March 17, 2022 18:13
Copy link
Contributor

@eellison eellison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple questions

aten/src/ATen/core/interned_strings.h Outdated Show resolved Hide resolved
torch/csrc/jit/python/script_init.cpp Show resolved Hide resolved
torch/csrc/jit/python/script_init.cpp Show resolved Hide resolved
Some important ops won't support optional type until opset 16,
so we can't fully test things end-to-end, but I believe this should
be all that's needed. Once ONNX Runtime supports opset 16,
we can do more testing and fix any remaining bugs.

Co-authored-by: garymm <garymiguelmicrosoft.com>
Co-authored-by: neginraoof <neginmrutexas.edu>

Differential Revision: [D34625646](https://our.internmc.facebook.com/intern/diff/D34625646)

[ghstack-poisoned]
BowenBao added a commit that referenced this pull request Apr 26, 2022
Some important ops won't support optional type until opset 16,
so we can't fully test things end-to-end, but I believe this should
be all that's needed. Once ONNX Runtime supports opset 16,
we can do more testing and fix any remaining bugs.

Co-authored-by: BowenBao <bowbaomicrosoft.com>
Co-authored-by: neginraoof <neginmrutexas.edu>

ghstack-source-id: 48155ca020dd22a932da9263d9e616678251c6af
Pull Request resolved: #73284
@BowenBao
Copy link
Collaborator Author

@malfet rebased again to resolve conflicts. Please import

Some important ops won't support optional type until opset 16,
so we can't fully test things end-to-end, but I believe this should
be all that's needed. Once ONNX Runtime supports opset 16,
we can do more testing and fix any remaining bugs.

Co-authored-by: garymm <garymiguelmicrosoft.com>
Co-authored-by: neginraoof <neginmrutexas.edu>

Differential Revision: [D34625646](https://our.internmc.facebook.com/intern/diff/D34625646)

[ghstack-poisoned]
BowenBao added a commit that referenced this pull request Apr 28, 2022
Some important ops won't support optional type until opset 16,
so we can't fully test things end-to-end, but I believe this should
be all that's needed. Once ONNX Runtime supports opset 16,
we can do more testing and fix any remaining bugs.

Co-authored-by: BowenBao <bowbaomicrosoft.com>
Co-authored-by: neginraoof <neginmrutexas.edu>

ghstack-source-id: c56814f56de2cc66ea6ed17042c60d454f33b455
Pull Request resolved: #73284
Some important ops won't support optional type until opset 16,
so we can't fully test things end-to-end, but I believe this should
be all that's needed. Once ONNX Runtime supports opset 16,
we can do more testing and fix any remaining bugs.

Co-authored-by: garymm <garymiguelmicrosoft.com>
Co-authored-by: neginraoof <neginmrutexas.edu>

Differential Revision: [D34625646](https://our.internmc.facebook.com/intern/diff/D34625646)

[ghstack-poisoned]
BowenBao added a commit that referenced this pull request May 2, 2022
Some important ops won't support optional type until opset 16,
so we can't fully test things end-to-end, but I believe this should
be all that's needed. Once ONNX Runtime supports opset 16,
we can do more testing and fix any remaining bugs.

Co-authored-by: BowenBao <bowbaomicrosoft.com>
Co-authored-by: neginraoof <neginmrutexas.edu>

ghstack-source-id: 9ef86bbec6336e5533d6cc7c960160e695fa88d6
Pull Request resolved: #73284
@malfet
Copy link
Contributor

malfet commented May 3, 2022

@malfet has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@malfet
Copy link
Contributor

malfet commented May 4, 2022

This change once again regresses some of the internal model conversion tests.

[Edit] As @BowenBao suggested, reverting torch.onnx.utils._decide_input_format make those tests to pass

torch/onnx/utils.py Outdated Show resolved Hide resolved
facebook-github-bot pushed a commit that referenced this pull request May 4, 2022
Summary:
Pull Request resolved: #73284

Some important ops won't support optional type until opset 16,
so we can't fully test things end-to-end, but I believe this should
be all that's needed. Once ONNX Runtime supports opset 16,
we can do more testing and fix any remaining bugs.

Test Plan: Imported from OSS

Reviewed By: albanD

Differential Revision: D34625646

Pulled By: malfet

fbshipit-source-id: 537fcbc1e9d87686cc61f5bd66a997e99cec287b

Co-authored-by: BowenBao <[email protected]>
Co-authored-by: neginraoof <[email protected]>
Co-authored-by: Nikita Shulga <[email protected]>
@github-actions
Copy link
Contributor

github-actions bot commented May 4, 2022

Hey @BowenBao.
You've committed this PR, but it does not have both a 'release notes: ...' and 'topics: ...' label. Please add one of each to the PR. The 'release notes: ...' label should represent the part of PyTorch that this PR changes (fx, autograd, distributed, etc) and the 'topics: ...' label should represent the kind of PR it is (not user facing, new feature, bug fix, perf improvement, etc). The list of valid labels can be found here for the 'release notes: ...' and here for the 'topics: ...'.
For changes that are 'topic: not user facing' there is no need for a release notes label.

@garymm garymm added release notes: onnx torch.onnx related changes that should show up in the release notes topic: improvements topic category labels May 4, 2022
@facebook-github-bot facebook-github-bot deleted the gh/BowenBao/148/head branch May 8, 2022 14:16
@datumbox
Copy link
Contributor

datumbox commented May 12, 2022

@BowenBao @malfet @eellison This PR is likely to have broken TorchVision. Please see pytorch/vision#5971 for details. @pmeier has done a bisection and confirmed that this commit is responsible. Can you please revert?

atalman added a commit to atalman/pytorch that referenced this pull request May 12, 2022
@garymm
Copy link
Collaborator

garymm commented May 12, 2022

I'll look at this today. It took us 3 months to get this PR merged so even though it's generally bad practice, I'd really like to fix forward if possible.

@datumbox
Copy link
Contributor

@garymm Thanks for coming back to me. I understand it, if you want to explore fixing the issue rather than reverting the whole PR. Just please prioritise this because TorchVision's ONNX export is broken for the detection models and we are dangerous close to the release. I'm also concerned that the longer we leave this in, the harder it will be to revert it if a fix can't be completed soon.

@malfet @eellison Any thoughts/concerns on your side?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla signed oncall: jit Add this issue/PR to JIT oncall triage queue onnx-needs-import This PR is related to ONNX, but touches files outside of merge rule patterns, and hence needs import open source release notes: onnx torch.onnx related changes that should show up in the release notes topic: improvements topic category
Projects
None yet
Development

Successfully merging this pull request may close these issues.