[Bug][Frontend][ONNX] Failure of test_forward.test_aten unit test after upgrade to PyTorch 1.12.0 #13146
Labels
needs-triage
PRs or issues that need to be investigated by maintainers to find the right assignees to address it
type: bug
As described in the discussion forum thread the test below fails after the upgrade to the PyTorch 1.12.0:
tvm/tests/python/frontend/onnx/test_forward.py
Lines 5471 to 5507 in 458ca81
The test fails in the line:
tvm/tests/python/frontend/onnx/test_forward.py
Line 5488 in 458ca81
The problem lies due to improper model conversion from PyTorch to ONNX with PyTorch 1.12.0. It looks like that argument below is ignored:
tvm/tests/python/frontend/onnx/test_forward.py
Line 5485 in 458ca81
and ATen PyTorch operators are substituted with native ONNX operators (instead of being exported as ATen ops in ONNX). This behaviour fail an assert above.
I have created an appropriate bug report in the PyTorch repo: pytorch/pytorch#87313
One possible quick solution will be to remove an assert above in
_convert_to_onnx
function (since the test produces correct results and satisfies all other asserts). However, it will reduce coverage of the test becauseonnx_model
(in the code below) will not contain ATen operators, and the possibility to consume ONNX graph with such operators by TVM will not be tested.tvm/tests/python/frontend/onnx/test_forward.py
Lines 5497 to 5503 in 458ca81
Environment
Steps to reproduce
With
Torch 1.12.0
andTorchvision 0.13.0
environment, run:python -m pytest tests/python/frontend/onnx/test_forward.py
Triage
The text was updated successfully, but these errors were encountered: