Skip to content

[ONNX] Enable opset 13 ORT tests#46903

Closed
neginraoof wants to merge 16 commits intopytorch:masterfrom
neginraoof:neraoof/opset13
Closed

[ONNX] Enable opset 13 ORT tests#46903
neginraoof wants to merge 16 commits intopytorch:masterfrom
neginraoof:neraoof/opset13

Conversation

@neginraoof
Copy link
Copy Markdown
Contributor

@neginraoof neginraoof commented Oct 27, 2020

Enable export of opset 13 ops.

@dr-ci
Copy link
Copy Markdown

dr-ci bot commented Oct 27, 2020

💊 CI failures summary and remediations

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



🕵️ 3 new failures recognized by patterns

The following CI failures do not appear to be due to upstream breakages (reran 1 job to discount flakiness):

See CircleCI build pytorch_linux_xenial_cuda9_2_cudnn7_py3_gcc5_4_build (1/3)

Step: "(Optional) Merge target branch" (full log | diagnosis details | 🔁 rerun) <confirmed not flaky by 2 failures>

Automatic merge failed; fix conflicts and then commit the result.
CONFLICT (add/add): Merge conflict in CONTRIBUTING.md 
Auto-merging CONTRIBUTING.md 
CONFLICT (add/add): Merge conflict in .jenkins/pytorch/win-build.sh 
Auto-merging .jenkins/pytorch/win-build.sh 
CONFLICT (add/add): Merge conflict in .github/workflows/lint.yml 
Auto-merging .github/workflows/lint.yml 
CONFLICT (add/add): Merge conflict in .clang-tidy 
Auto-merging .clang-tidy 
CONFLICT (add/add): Merge conflict in .circleci/scripts/binary_linux_test.sh 
Auto-merging .circleci/scripts/binary_linux_test.sh 
Automatic merge failed; fix conflicts and then commit the result. 

See CircleCI build pytorch_linux_xenial_py3_6_gcc5_4_build (2/3)

Step: "(Optional) Merge target branch" (full log | diagnosis details | 🔁 rerun) <confirmed not flaky by 2 failures>

Automatic merge failed; fix conflicts and then commit the result.
CONFLICT (add/add): Merge conflict in CONTRIBUTING.md 
Auto-merging CONTRIBUTING.md 
CONFLICT (add/add): Merge conflict in .jenkins/pytorch/win-build.sh 
Auto-merging .jenkins/pytorch/win-build.sh 
CONFLICT (add/add): Merge conflict in .github/workflows/lint.yml 
Auto-merging .github/workflows/lint.yml 
CONFLICT (add/add): Merge conflict in .clang-tidy 
Auto-merging .clang-tidy 
CONFLICT (add/add): Merge conflict in .circleci/scripts/binary_linux_test.sh 
Auto-merging .circleci/scripts/binary_linux_test.sh 
Automatic merge failed; fix conflicts and then commit the result. 

See CircleCI build pytorch_linux_xenial_py3_clang7_onnx_ort_test2 (3/3)

Step: "Run tests" (full log | diagnosis details | 🔁 rerun) <confirmed not flaky by 2 failures>

Dec 18 21:36:15 test/onnx/test_pytorch_onnx_onnxruntime.py::TestONNXRuntime_opset13::test_prelu Fatal Python error: Segmentation fault
Dec 18 21:36:11 test/onnx/test_pytorch_onnx_onnxruntime.py::TestONNXRuntime_opset13::test_numel_empty FAILED [ 77%] 
Dec 18 21:36:11 test/onnx/test_pytorch_onnx_onnxruntime.py::TestONNXRuntime_opset13::test_one_hot PASSED [ 77%] 
Dec 18 21:36:11 test/onnx/test_pytorch_onnx_onnxruntime.py::TestONNXRuntime_opset13::test_ones_bool SKIPPED [ 78%] 
Dec 18 21:36:11 test/onnx/test_pytorch_onnx_onnxruntime.py::TestONNXRuntime_opset13::test_onnx_proto_checker PASSED [ 78%] 
Dec 18 21:36:11 test/onnx/test_pytorch_onnx_onnxruntime.py::TestONNXRuntime_opset13::test_optional_inputs_with_all_optionals PASSED [ 78%] 
Dec 18 21:36:12 test/onnx/test_pytorch_onnx_onnxruntime.py::TestONNXRuntime_opset13::test_optional_inputs_with_mixed_optionals FAILED [ 78%] 
Dec 18 21:36:12 test/onnx/test_pytorch_onnx_onnxruntime.py::TestONNXRuntime_opset13::test_optional_inputs_with_no_optionals PASSED [ 78%] 
Dec 18 21:36:12 test/onnx/test_pytorch_onnx_onnxruntime.py::TestONNXRuntime_opset13::test_pad_types SKIPPED [ 79%] 
Dec 18 21:36:13 test/onnx/test_pytorch_onnx_onnxruntime.py::TestONNXRuntime_opset13::test_pixel_shuffle FAILED [ 79%] 
Dec 18 21:36:14 test/onnx/test_pytorch_onnx_onnxruntime.py::TestONNXRuntime_opset13::test_pow FAILED [ 79%] 
Dec 18 21:36:15 test/onnx/test_pytorch_onnx_onnxruntime.py::TestONNXRuntime_opset13::test_prelu Fatal Python error: Segmentation fault 
Dec 18 21:36:15  
Dec 18 21:36:15 Current thread 0x00007f69928eb700 (most recent call first): 
Dec 18 21:36:15   File "/opt/conda/lib/python3.6/site-packages/_pytest/_io/saferepr.py", line 58 in repr_instance 
Dec 18 21:36:15   File "/opt/conda/lib/python3.6/reprlib.py", line 65 in repr1 
Dec 18 21:36:15   File "/opt/conda/lib/python3.6/reprlib.py", line 55 in repr 
Dec 18 21:36:15   File "/opt/conda/lib/python3.6/site-packages/_pytest/_io/saferepr.py", line 49 in repr 
Dec 18 21:36:15   File "/opt/conda/lib/python3.6/site-packages/_pytest/_io/saferepr.py", line 88 in saferepr 
Dec 18 21:36:15   File "/opt/conda/lib/python3.6/site-packages/_pytest/_code/code.py", line 686 in repr_args 
Dec 18 21:36:15   File "/opt/conda/lib/python3.6/site-packages/_pytest/_code/code.py", line 776 in repr_traceback_entry 
Dec 18 21:36:15   File "/opt/conda/lib/python3.6/site-packages/_pytest/_code/code.py", line 825 in repr_traceback 

1 failure confirmed as flaky and can be ignored:

  • pytorch_windows_vs2019_py36_cuda10.1_test1

🚧 1 fixed upstream failure:

These were probably caused by upstream breakages that were already fixed.

Please rebase on the viable/strict branch (expand for instructions)

Since your merge base is older than viable/strict, run these commands:

git fetch https://github.com/pytorch/pytorch viable/strict
git rebase FETCH_HEAD

Check out the recency history of this "viable master" tracking branch.


Extra GitHub checks: 4 failed


This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions on the GitHub issue tracker or post in the (internal) Dr. CI Users group.

See how this bot performed.

This comment has been revised 63 times.

@neginraoof neginraoof changed the title Enable opset 13 ORT tests [ONNX][WIP] Enable opset 13 ORT tests Oct 28, 2020
@neginraoof neginraoof marked this pull request as ready for review December 2, 2020 18:15
@neginraoof neginraoof changed the title [ONNX][WIP] Enable opset 13 ORT tests [ONNX] Enable opset 13 ORT tests Dec 2, 2020
@heitorschueroff heitorschueroff added the module: onnx Related to torch.onnx label Dec 3, 2020
@heitorschueroff heitorschueroff added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Dec 3, 2020
Copy link
Copy Markdown
Collaborator

@BowenBao BowenBao left a comment

Choose a reason for hiding this comment

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

Looks good, thanks! Some minor comments

if torch.cuda.is_available():
torch.cuda.manual_seed_all(0)
np.random.seed(seed=0)
os.environ['ALLOW_RELEASED_ONNX_OPSET_ONLY'] = '0'
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

curious why we need this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is to enable opset 13 in ORT before official release.


# opset 13 tests, with keep_initializers_as_inputs=False for
# IR version 4 style export.
TestONNXRuntime_opset13_IRv4 = type(str("TestONNXRuntime_opset13_IRv4"),
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

actually not sure if there is still the need of separate tests on IR versions, since sequence proto requires IR version > 4 anyways ...


_default_onnx_opset_version = 9
_onnx_master_opset = 10
_onnx_main_opset = 13
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for fixing this!

import torch.onnx.symbolic_helper as sym_help
from torch.onnx.symbolic_helper import parse_args, _unimplemented

block_listed_operators = ['embedding_bag']
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

is it due to loop that embedding_bag not supported?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, exactly

@neginraoof neginraoof closed this Dec 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla signed module: onnx Related to torch.onnx open source triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants