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

[1.5 cherrypick] Fix torch.mm in ONNX exporter #35416

Merged

Conversation

houseroad
Copy link
Member

Original PR: #34661

Summary:
torch.mm is exported as Gemm operator in ONNX and both have an optional input: out.
out is considered as broadcastable in Gemm and during graph optimization the optional input (out) would get selected. Since out is optional, in case when it is not defined in torch.mm that would result in the following exception:
IndexError: vector::_M_range_check: __n (which is 2) >= this->size() (which is 2)
Pull Request resolved: pytorch#34661

Reviewed By: hl475

Differential Revision: D20496398

Pulled By: houseroad

fbshipit-source-id: e677aef0a6aefb1f83a54033153aaabe5c23bc0f
@houseroad houseroad requested a review from apaszke as a code owner March 25, 2020 20:41
@houseroad houseroad requested a review from gchanan March 25, 2020 20:42
@facebook-github-bot facebook-github-bot added the oncall: jit Add this issue/PR to JIT oncall triage queue label Mar 25, 2020
@dr-ci
Copy link

dr-ci bot commented Mar 25, 2020

💊 CircleCI build failures summary and remediations

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


  • 3/3 failures introduced in this PR

🕵️ 2 new failures recognized by patterns

The following build failures do not appear to be due to upstream breakages (reran 2 jobs to discount flakiness):

See CircleCI build pytorch_linux_xenial_py3_6_gcc5_4_test (1/2)

Step: "Test" (full log | pattern match details) <confirmed not flaky by 2 failures>

Mar 25 22:05:09 AssertionError: 11 not less than or equal to 1e-05 :
Mar 25 22:05:09 ---------------------------------------------------------------------- 
Mar 25 22:05:09 Traceback (most recent call last): 
Mar 25 22:05:09   File "/opt/conda/lib/python3.6/site-packages/torch/testing/_internal/common_distributed.py", line 175, in wrapper 
Mar 25 22:05:09     self._join_processes(fn) 
Mar 25 22:05:09   File "/opt/conda/lib/python3.6/site-packages/torch/testing/_internal/common_distributed.py", line 285, in _join_processes 
Mar 25 22:05:09     self._check_return_codes(elapsed_time) 
Mar 25 22:05:09   File "/opt/conda/lib/python3.6/site-packages/torch/testing/_internal/common_distributed.py", line 328, in _check_return_codes 
Mar 25 22:05:09     self.assertEqual(first_process.exitcode, 0) 
Mar 25 22:05:09   File "/opt/conda/lib/python3.6/site-packages/torch/testing/_internal/common_utils.py", line 915, in assertEqual 
Mar 25 22:05:09     super(TestCase, self).assertLessEqual(abs(x - y), prec, message) 
Mar 25 22:05:09 AssertionError: 11 not less than or equal to 1e-05 :  
Mar 25 22:05:09  
Mar 25 22:05:09 ---------------------------------------------------------------------- 
Mar 25 22:05:09 Ran 27 tests in 32.861s 
Mar 25 22:05:09  
Mar 25 22:05:09 FAILED (failures=1) 
Mar 25 22:05:09  
Mar 25 22:05:09 Generating XML reports... 
Mar 25 22:05:09 Traceback (most recent call last): 
Mar 25 22:05:09   File "test/run_test.py", line 674, in <module> 
Mar 25 22:05:09     main() 

See CircleCI build pytorch_linux_xenial_cuda10_2_cudnn7_py3_gcc7_test (2/2)

Step: "Test" (full log | pattern match details) <confirmed not flaky by 2 failures>

Mar 25 22:40:55 AssertionError: 11 not less than or equal to 1e-05 :
Mar 25 22:40:55 ---------------------------------------------------------------------- 
Mar 25 22:40:55 Traceback (most recent call last): 
Mar 25 22:40:55   File "/opt/conda/lib/python3.6/site-packages/torch/testing/_internal/common_distributed.py", line 175, in wrapper 
Mar 25 22:40:55     self._join_processes(fn) 
Mar 25 22:40:55   File "/opt/conda/lib/python3.6/site-packages/torch/testing/_internal/common_distributed.py", line 285, in _join_processes 
Mar 25 22:40:55     self._check_return_codes(elapsed_time) 
Mar 25 22:40:55   File "/opt/conda/lib/python3.6/site-packages/torch/testing/_internal/common_distributed.py", line 328, in _check_return_codes 
Mar 25 22:40:55     self.assertEqual(first_process.exitcode, 0) 
Mar 25 22:40:55   File "/opt/conda/lib/python3.6/site-packages/torch/testing/_internal/common_utils.py", line 915, in assertEqual 
Mar 25 22:40:55     super(TestCase, self).assertLessEqual(abs(x - y), prec, message) 
Mar 25 22:40:55 AssertionError: 11 not less than or equal to 1e-05 :  
Mar 25 22:40:55  
Mar 25 22:40:55 ---------------------------------------------------------------------- 
Mar 25 22:40:55 Ran 27 tests in 22.071s 
Mar 25 22:40:55  
Mar 25 22:40:55 FAILED (failures=1) 
Mar 25 22:40:55  
Mar 25 22:40:55 Generating XML reports... 
Mar 25 22:40:55 Traceback (most recent call last): 
Mar 25 22:40:55   File "test/run_test.py", line 674, in <module> 
Mar 25 22:40:55     main() 

1 job timed out:

  • pytorch_macos_10_13_py3_test

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.

See how this bot performed.

This comment has been revised 5 times.

@gchanan gchanan merged commit 9e3c577 into pytorch:release/1.5 Mar 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
oncall: jit Add this issue/PR to JIT oncall triage queue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants