8000 Fix some tensor operators to return `NotImplemented` for invalid inputs by asi1024 · Pull Request #58216 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content
8000

Fix some tensor operators to return NotImplemented for invalid inputs #58216

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

Closed
wants to merge 4 commits into from

Conversation

asi1024
Copy link
Contributor
@asi1024 asi1024 commented May 13, 2021

Same as #57934. (cc/ @albanD)

@facebook-github-bot
Copy link
Contributor
facebook-github-bot commented May 13, 2021

💊 CI failures summary and remediations

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


  • 4/4 failures introduced in this PR

🕵️ 1 new failure recognized by patterns

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

See CircleCI build pytorch_xla_linux_bionic_py3_6_clang9_build (1/1)

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

May 17 23:59:42 rm: cannot remove '/var/lib/jenkins/sccache_error.log': No such file or directory
May 17 23:59:42 ++++ extract_trap_cmd
May 17 23:59:42 ++++ printf '%s\n' ''
May 17 23:59:42 +++ printf '%s\n' cleanup
May 17 23:59:42 ++ trap -- '
May 17 23:59:42 cleanup' EXIT
May 17 23:59:42 ++ [[ pytorch-xla-linux-bionic-py3.6-clang9-build != *pytorch-win-* ]]
May 17 23:59:42 ++ which sccache
May 17 23:59:42 ++ sccache --stop-server
May 17 23:59:42 ++ true
May 17 23:59:42 ++ rm /var/lib/jenkins/sccache_error.log
May 17 23:59:42 rm: cannot remove '/var/lib/jenkins/sccache_error.log': No such file or directory
May 17 23:59:42 ++ true
May 17 23:59:42 ++ [[ -n '' ]]
May 17 23:59:42 ++ [[ pytorch-xla-linux-bionic-py3.6-clang9-build == *rocm* ]]
May 17 23:59:42 ++ SCCACHE_ERROR_LOG=/var/lib/jenkins/sccache_error.log
May 17 23:59:42 ++ SCCACHE_IDLE_TIMEOUT=1200
May 17 23:59:42 ++ RUST_LOG=sccache::server=error
May 17 23:59:42 ++ sccache --start-server
May 17 23:59:42 sccache: Starting the server...
May 17 23:59:43 ++ sccache --zero-stats
May 17 23:59:43 Compile requests                      0

3 failures not recognized by patterns:

Job Step Action
CircleCI binary_linux_libtorch_3_7m_cpu_devtoolset7_shared-with-deps_test Checkout pytorch/builder repo 🔁 rerun
CircleCI binary_linux_libtorch_3_7m_cpu_gcc5_4_cxx11-abi_shared-with-deps_test Checkout pytorch/builder repo 🔁 rerun
CircleCI binary_linux_manywheel_3_7m_cu102_devtoolset7_test Checkout pytorch/builder repo 🔁 rerun

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 to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

@albanD
Copy link
Collaborator
albanD commented May 13, 2021

Hi thanks for the new PR
I don't see any difference with the previous one though wrt to the rmatmul test?

@ejguan ejguan added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label May 13, 2021
@asi1024 asi1024 force-pushed the fix-operator branch 2 times, most recently from 27f4daa to d083d47 Compare May 14, 2021 08:13
@asi1024
Copy link
Contributor Author
asi1024 commented May 14, 2021

@albanD Sorry, I have forgotten to make a change skipping bfloat16 test. 🙇
I fixed OpInfo('__rmatmul__') to skip bfloat16 test in d083d47, and rebased onto master branch.

@albanD
Copy link
Collaborator
albanD commented May 14, 2021

I think there are some formatting issue (missing parenthesis)?
Also you can check in the issue you opened for ideas how to avoid disabling all these tests if you want.

@asi1024
Copy link
Contributor Author
asi1024 commented May 14, 2021

@albanD Sorry, I have accidentally deleted the comma at the end of the line before I committed. Now I fixed it!

@albanD
Copy link
Collaborator
albanD commented May 14, 2021

I would like to get the windows cuda test to run here before merging to make sure we don't have to revert again. It might take a few days as we are changing this process right now.

@albanD
Copy link
Collaborator
albanD commented May 17, 2021

Ok, it should be ready now. Could you rebase on top of master please so that we can run all the CI?

@albanD albanD removed the ci/master label May 17, 2021
@asi1024
Copy link
Contributor Author
asi1024 commented May 17, 2021

@albanD Rebased!

@codecov
Copy link
codecov bot commented May 17, 2021

Codecov Report

Merging #58216 (41af3ca) into master (a3b3313) will increase coverage by 6.01%.
The diff coverage is 84.61%.

@@            Coverage Diff             @@
##           master   #58216      +/-   ##
==========================================
+ Coverage   70.46%   76.47%   +6.01%     
==========================================
  Files        1969     1992      +23     
  Lines      197141   199899    +2758     
==========================================
+ Hits       138909   152867   +13958     
+ Misses      58232    47032   -11200     

@facebook-github-bot
Copy link
Contributor

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

@asi1024 asi1024 mentioned this pull request May 18, 2021
1 task
@facebook-github-bot
Copy link
Contributor

@albanD merged this pull request in 3113a1d.

@asi1024
Copy link
Contributor Author
asi1024 commented May 19, 2021

@albanD Thanks!

@asi1024 asi1024 deleted the fix-operator branch May 19, 2021 22:33
facebook-github-bot pushed a commit that referenced this pull request Jun 5, 2021
Summary:
Fixes #58035.

This PR implements `torch.Tensor.__rmod__` and `torch.remainder(scalar, tensor)` for the compatibility with NumPy’s interface.
(cc: mruberry, rgommers, emcastillo, kmaehashi)

TODO:
  - [x] Update `tensor_binary_op` in test/test_binary_ufuncs.py after #58216 is merged.

Pull Request resolved: #58476

Reviewed By: ngimel

Differential Revision: D28776810

Pulled By: mruberry

fbshipit-source-id: 74f8aea80f439ef2cc370333524e39971eeb7bf4
deniskokarev pushed a commit to deniskokarev/pytorch that referenced this pull request Jun 9, 2021
Summary:
Fixes pytorch#58035.

This PR implements `torch.Tensor.__rmod__` and `torch.remainder(scalar, tensor)` for the compatibility with NumPy’s interface.
(cc: mruberry, rgommers, emcastillo, kmaehashi)

TODO:
  - [x] Update `tensor_binary_op` in test/test_binary_ufuncs.py after pytorch#58216 is merged.

Pull Request resolved: pytorch#58476

Reviewed By: ngimel

Differential Revision: D28776810

Pulled By: mruberry

fbshipit-source-id: 74f8aea80f439ef2cc370333524e39971eeb7bf4
@pmeier pmeier added the module: python array api Issues related to the Python Array API label Jun 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla signed Merged module: python array api Issues related to the Python Array API 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
0