torch.mode when input has nans #46225
Labels
module: docs
Related to our documentation, both in docs/ and docblocks
module: NaNs and Infs
Problems related to NaN and Inf handling in floating point
module: numpy
Related to numpy support, and also numpy compatibility of our operators
module: reductions
module: sorting and selection
triaged
This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Uh oh!
There was an error while loading. Please reload this page.
🐛 Bug
torch.mode
has inconsisent behavior when the input contains nans:torch.mode
acts like scipy'snan_policy="omit"
To Reproduce
When running
test("cpu")
, both lines always give the expected result:whereas when running
test("cuda")
, the first line always gives the expected result, but the second line gives something seemingly random:Expected behavior
Environment
Output of
collect_env.py
:cc @brianjo @mruberry @rgommers @heitorschueroff @ezyang @gchanan @zou3519 @bdhirsh @ejguan @jlin27
The text was updated successfully, but these errors were encountered: