Skip to content

Conversation

@BowenBao
Copy link
Collaborator

@BowenBao BowenBao commented Jul 1, 2019

This is an extension to the original PR #21765

  1. Increase the coverage of different opsets support, comments, and blacklisting.
  2. Adding backend tests for both caffe2 and onnxruntime on opset 7 and opset 8.
  3. Reusing onnx model tests in caffe2 for onnxruntime.

@pytorchbot pytorchbot added oncall: jit Add this issue/PR to JIT oncall triage queue module: build Build system issues module: onnx Related to torch.onnx labels Jul 1, 2019
@pytorchbot pytorchbot added the module: lint Issues related to our Python/C++ lint rules (run by Travis) label Jul 1, 2019
@BowenBao
Copy link
Collaborator Author

BowenBao commented Jul 2, 2019

@pytorchbot retest this please

@ifedan ifedan added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Jul 2, 2019
Copy link
Member

@houseroad houseroad left a comment

Choose a reason for hiding this comment

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

Overall direction is good. Left some comments inline.

Copy link
Member

@houseroad houseroad left a comment

Choose a reason for hiding this comment

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

We are closer, see inline comments

-g"-torch/csrc/jit/export.cpp" \
-g"-torch/csrc/jit/import.cpp" \
-g"-torch/csrc/jit/netdef_converter.cpp" \
-g"-torch/csrc/jit/passes/onnx/cast_constant.cpp" \
Copy link
Member

Choose a reason for hiding this comment

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

I prefer to let clang tidy cover as many files as possible. So let's try to remove the dependence of onnx header files in cast_constant.cpp file. Since there are only two places, hard coding with comments sounds acceptable.

@@ -0,0 +1,71 @@
#include <torch/csrc/jit/passes/onnx/cast_constant.h>
Copy link
Member

Choose a reason for hiding this comment

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

call this pass cast_all_constant_to_floating? cast_constant sounds too general.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

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

Copy link
Member

@houseroad houseroad 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, let's land it.

@facebook-github-bot
Copy link
Contributor

@houseroad merged this pull request in b3147bc.

@drnikolaev
Copy link
Contributor

@lara-hdr @BowenBao @houseroad
Folks, am I doing something wrong?
When I run ./scripts/onnx/test.sh I get:

test/onnx/test_pytorch_onnx_caffe2.py::TestCaffe2BackendEmbed_opset9::test_densenet FAILED                                                                                      [  6%]
test/onnx/test_pytorch_onnx_caffe2.py::TestCaffe2BackendEmbed_opset9::test_traced_ints FAILED                                                                                   [ 15%]
test/onnx/test_pytorch_onnx_caffe2.py::TestCaffe2Backend_opset7::test__dim_arange FAILED                                                                                        [ 16%]
test/onnx/test_pytorch_onnx_caffe2.py::TestCaffe2Backend_opset7::test_densenet FAILED                                                                                           [ 17%]
test/onnx/test_pytorch_onnx_caffe2.py::TestCaffe2Backend_opset7::test_dynamic_loop FAILED                                                                                       [ 17%]
test/onnx/test_pytorch_onnx_caffe2.py::TestCaffe2Backend_opset7::test_loop FAILED                                                                                               [ 24%]
test/onnx/test_pytorch_onnx_caffe2.py::TestCaffe2Backend_opset7::test_resnet FAILED                                                                                             [ 26%]
test/onnx/test_pytorch_onnx_caffe2.py::TestCaffe2Backend_opset7::test_while_cond FAILED                                                                                         [ 28%]
test/onnx/test_pytorch_onnx_caffe2.py::TestCaffe2BackendEmbed_opset7::test_densenet FAILED                                                                                      [ 29%]
test/onnx/test_pytorch_onnx_caffe2.py::TestCaffe2BackendEmbed_opset7::test_traced_ints FAILED                                                                                   [ 39%]
test/onnx/test_pytorch_onnx_caffe2.py::TestCaffe2Backend_opset8::test__dim_arange FAILED                                                                                        [ 40%]
test/onnx/test_pytorch_onnx_caffe2.py::TestCaffe2Backend_opset8::test_alexnet FAILED                                                                                            [ 40%]
test/onnx/test_pytorch_onnx_caffe2.py::TestCaffe2Backend_opset8::test_densenet FAILED                                                                                           [ 41%]
test/onnx/test_pytorch_onnx_caffe2.py::TestCaffe2Backend_opset8::test_dynamic_loop FAILED                                                                                       [ 41%]
test/onnx/test_pytorch_onnx_caffe2.py::TestCaffe2Backend_opset8::test_loop FAILED                                                                                               [ 47%]
test/onnx/test_pytorch_onnx_caffe2.py::TestCaffe2Backend_opset8::test_resnet FAILED                                                                                             [ 50%]
test/onnx/test_pytorch_onnx_caffe2.py::TestCaffe2Backend_opset8::test_while_cond FAILED                                                                                         [ 51%]
test/onnx/test_pytorch_onnx_caffe2.py::TestCaffe2BackendEmbed_opset8::test_densenet FAILED                                                                                      [ 53%]
test/onnx/test_pytorch_onnx_caffe2.py::TestCaffe2BackendEmbed_opset8::test_traced_ints FAILED                                                                                   [ 63%]
test/onnx/test_pytorch_onnx_caffe2.py::TestCaffe2Backend_opset10::test__dim_arange FAILED                                                                                       [ 63%]
test/onnx/test_pytorch_onnx_caffe2.py::TestCaffe2Backend_opset10::test_alexnet FAILED                                                                                           [ 64%]
test/onnx/test_pytorch_onnx_caffe2.py::TestCaffe2Backend_opset10::test_densenet FAILED                                                                                          [ 65%]
test/onnx/test_pytorch_onnx_caffe2.py::TestCaffe2Backend_opset10::test_dynamic_loop FAILED                                                                                      [ 65%]
test/onnx/test_pytorch_onnx_caffe2.py::TestCaffe2Backend_opset10::test_loop FAILED                                                                                              [ 71%]
test/onnx/test_pytorch_onnx_caffe2.py::TestCaffe2Backend_opset10::test_nested_loops FAILED                                                                                      [ 73%]
test/onnx/test_pytorch_onnx_caffe2.py::TestCaffe2Backend_opset10::test_resnet FAILED                                                                                            [ 74%]
test/onnx/test_pytorch_onnx_caffe2.py::TestCaffe2Backend_opset10::test_topk FAILED                                                                                              [ 74%]
test/onnx/test_pytorch_onnx_caffe2.py::TestCaffe2Backend_opset10::test_topk_script FAILED                                                                                       [ 74%]
test/onnx/test_pytorch_onnx_caffe2.py::TestCaffe2Backend_opset10::test_while FAILED                                                                                             [ 75%]
test/onnx/test_pytorch_onnx_caffe2.py::TestCaffe2Backend_opset10::test_while_cond FAILED                                                                                        [ 75%]
test/onnx/test_pytorch_onnx_caffe2.py::TestCaffe2BackendEmbed_opset10::test_densenet FAILED                                                                                     [ 76%]
test/onnx/test_pytorch_onnx_caffe2.py::TestCaffe2BackendEmbed_opset10::test_traced_ints FAILED                                                                                  [ 86%]
test/onnx/test_pytorch_onnx_caffe2.py::TestCaffe2Backend_opset9::test__dim_arange FAILED                                                                                        [ 87%]
test/onnx/test_pytorch_onnx_caffe2.py::TestCaffe2Backend_opset9::test_alexnet FAILED                                                                                            [ 87%]
test/onnx/test_pytorch_onnx_caffe2.py::TestCaffe2Backend_opset9::test_densenet FAILED                                                                                           [ 88%]
test/onnx/test_pytorch_onnx_caffe2.py::TestCaffe2Backend_opset9::test_dynamic_loop FAILED                                                                                       [ 88%]
test/onnx/test_pytorch_onnx_caffe2.py::TestCaffe2Backend_opset9::test_loop FAILED                                                                                               [ 94%]
test/onnx/test_pytorch_onnx_caffe2.py::TestCaffe2Backend_opset9::test_nested_loops FAILED                                                                                       [ 97%]
test/onnx/test_pytorch_onnx_caffe2.py::TestCaffe2Backend_opset9::test_while FAILED                                                                                              [ 98%]
test/onnx/test_pytorch_onnx_caffe2.py::TestCaffe2Backend_opset9::test_while_cond FAILED 

@BowenBao
Copy link
Collaborator Author

@drnikolaev I'm not able to repro this locally, could you share the error message that you are seeing?
Please also check if your ONNX version is up to date as the one being submoduled in PyTorch. There were required fixes that went in ONNX after 1.5 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merged module: build Build system issues module: lint Issues related to our Python/C++ lint rules (run by Travis) module: onnx Related to torch.onnx oncall: jit Add this issue/PR to JIT oncall triage queue 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.

8 participants