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] Fix scalar type cast for comparison ops #37787

Closed
wants to merge 7 commits into from

Conversation

BowenBao
Copy link
Collaborator

@BowenBao BowenBao commented May 4, 2020

Always promote type casts for comparison operators, regardless if the input is tensor or scalar. Unlike arithmetic operators, where scalars are implicitly cast to the same type as tensors.

@BowenBao BowenBao requested a review from apaszke as a code owner May 4, 2020 19:19
@dr-ci
Copy link

dr-ci bot commented May 4, 2020

💊 CI failures summary and remediations

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


  • 3/3 failures introduced in this PR

🕵️ 3 new failures recognized by patterns

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

See CircleCI build pytorch_macos_10_13_py3_test (1/3)

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

Aug 03 16:30:17 clang: error: linker command failed with exit code 1 (use -v to see invocation)
Aug 03 16:30:17      
Aug 03 16:30:17     creating build/temp.macosx-10.9-x86_64-3.8/numba/cext 
Aug 03 16:30:17     compile options: '-I/Users/distiller/workspace/miniconda3/lib/python3.8/site-packages/numpy/core/include -I/Users/distiller/workspace/miniconda3/include/python3.8 -c' 
Aug 03 16:30:17     extra options: '-g' 
Aug 03 16:30:17     clang: numba/_helpermod.cclang: numba/cext/utils.c 
Aug 03 16:30:17      
Aug 03 16:30:17     clang: numba/cext/dictobject.c 
Aug 03 16:30:17     clang: numba/cext/listobject.c 
arch x86_64 -L/Users/distiller/workspace/miniconda3/lib -arch x86_64 -arch x86_64 build/temp.macosx-10.9-x86_64-3.8/numba/_helpermod.o build/temp.macosx-10.9-x86_64-3.8/numba/cext/utils.o build/temp.macosx-10.9-x86_64-3.8/numba/cext/dictobject.o build/temp.macosx-10.9-x86_64-3.8/numba/cext/listobject.o -L/Users/distiller/workspace/miniconda3/lib/python3.8/site-packages/numpy/core/lib -lnpymath -o build/lib.macosx-10.9-x86_64-3.8/numba/_helperlib.cpython-38-darwin.so -headerpad_max_install_names 
Aug 03 16:30:17     ld: in /Users/distiller/workspace/miniconda3/lib/python3.8/site-packages/numpy/core/lib/libnpymath.a(npy_math.o), could not parse object file /Users/distiller/workspace/miniconda3/lib/python3.8/site-packages/numpy/core/lib/libnpymath.a(npy_math.o): 'Unknown attribute kind (61) (Producer: 'LLVM10.0.0' Reader: 'LLVM APPLE_1_902.0.39.2_0')', using libLTO version 'LLVM version 9.1.0, (clang-902.0.39.2)' for architecture x86_64 
Aug 03 16:30:17     clang: error: linker command failed with exit code 1 (use -v to see invocation) 
ler/workspace/miniconda3/lib -arch x86_64 -arch x86_64 build/temp.macosx-10.9-x86_64-3.8/numba/_helpermod.o build/temp.macosx-10.9-x86_64-3.8/numba/cext/utils.o build/temp.macosx-10.9-x86_64-3.8/numba/cext/dictobject.o build/temp.macosx-10.9-x86_64-3.8/numba/cext/listobject.o -L/Users/distiller/workspace/miniconda3/lib/python3.8/site-packages/numpy/core/lib -lnpymath -o build/lib.macosx-10.9-x86_64-3.8/numba/_helperlib.cpython-38-darwin.so -headerpad_max_install_names" failed with exit status 1 
Aug 03 16:30:17     ---------------------------------------- 
d3j9r52rv80000gn/T/pip-install-yj_02lny/numba/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/gk/lkr9pm5x039fx6d3j9r52rv80000gn/T/pip-record-fbpx2lik/install-record.txt --single-version-externally-managed --compile --install-headers /Users/distiller/workspace/miniconda3/include/python3.8/numba Check the logs for full command output. 
Aug 03 16:30:17 + cleanup 
Aug 03 16:30:17 + retcode=1 
Aug 03 16:30:17 + set +x 

See CircleCI build pytorch_linux_xenial_py3_6_gcc5_4_build (2/3)

Step: "(Optional) Merge target branch" (full log | diagnosis details | 🔁 rerun)

Automatic merge failed; fix conflicts and then commit the result.
CONFLICT (add/add): Merge conflict in .circleci/config.yml 
Auto-merging .circleci/config.yml 
CONFLICT (add/add): Merge conflict in .circleci/cimodel/data/windows_build_definitions.py 
Auto-merging .circleci/cimodel/data/windows_build_definitions.py 
CONFLICT (add/add): Merge conflict in .circleci/cimodel/data/simple/binary_smoketest.py 
Auto-merging .circleci/cimodel/data/simple/binary_smoketest.py 
CONFLICT (add/add): Merge conflict in .circleci/cimodel/data/pytorch_build_definitions.py 
Auto-merging .circleci/cimodel/data/pytorch_build_definitions.py 
CONFLICT (add/add): Merge conflict in .circleci/cimodel/data/binary_build_data.py 
Auto-merging .circleci/cimodel/data/binary_build_data.py 
Automatic merge failed; fix conflicts and then commit the result. 

See CircleCI build pytorch_xla_linux_bionic_py3_6_clang9_build (3/3)

Step: "(Optional) Merge target branch" (full log | diagnosis details | 🔁 rerun)

Automatic merge failed; fix conflicts and then commit the result.
CONFLICT (add/add): Merge conflict in .circleci/config.yml 
Auto-merging .circleci/config.yml 
CONFLICT (add/add): Merge conflict in .circleci/cimodel/data/windows_build_definitions.py 
Auto-merging .circleci/cimodel/data/windows_build_definitions.py 
CONFLICT (add/add): Merge conflict in .circleci/cimodel/data/simple/binary_smoketest.py 
Auto-merging .circleci/cimodel/data/simple/binary_smoketest.py 
CONFLICT (add/add): Merge conflict in .circleci/cimodel/data/pytorch_build_definitions.py 
Auto-merging .circleci/cimodel/data/pytorch_build_definitions.py 
CONFLICT (add/add): Merge conflict in .circleci/cimodel/data/binary_build_data.py 
Auto-merging .circleci/cimodel/data/binary_build_data.py 
Automatic merge failed; fix conflicts and then commit the result. 

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 32 times.

@BowenBao
Copy link
Collaborator Author

BowenBao commented May 4, 2020

cc @jacky82226

@facebook-github-bot facebook-github-bot added the oncall: jit Add this issue/PR to JIT oncall triage queue label May 4, 2020
@ngimel ngimel requested a review from houseroad May 5, 2020 01:22
@ngimel ngimel added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label May 5, 2020
@BowenBao
Copy link
Collaborator Author

BowenBao commented May 5, 2020

Test TestONNXRuntime_opset11.test_mask_rcnn failing with

E       onnxruntime.capi.onnxruntime_pybind11_state.NotImplemented: [ONNXRuntimeError] : 9 : NOT_IMPLEMENTED : Could not find an implementation for the node Greater_1611:Greater(9)

This PR is currently blocked due to that Greater[double] is not supported in onnxruntime.

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.

Any update on this PR?

@BowenBao
Copy link
Collaborator Author

Any update on this PR?

Will submit a fix to ONNXRuntime to unblock this.

Copy link
Contributor

@bzinodev bzinodev left a comment

Choose a reason for hiding this comment

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

Need Microsoft approvers

Copy link
Contributor

@neginraoof neginraoof left a comment

Choose a reason for hiding this comment

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

Thanks. Had a couple comments.

@neginraoof neginraoof mentioned this pull request Jul 24, 2020
@BowenBao
Copy link
Collaborator Author

The CI failure needs a fix from ONNXRuntime, which is already in master and will be reflected in 7.29's nightly build.

Copy link
Contributor

@neginraoof neginraoof left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@BowenBao
Copy link
Collaborator Author

BowenBao commented Aug 7, 2020

@bzinodev Can you import this PR for merge? Thanks.

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.

@facebook-github-bot
Copy link
Contributor

@houseroad merged this pull request in 55ac240.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Merged 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