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
Add stack & cat support for CPU Half #16389
Conversation
# inf check if allow_inf=True | ||
if allow_inf: | ||
inf_mask = torch.isinf(a) | ||
self.assertTrue(torch.equal(inf_mask, torch.isinf(b)), message) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the old code did this too, but won't this allow +inf and -inf to be equal?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right. I can submit a PR later to test CI and see if this is an easy fix, but I prefer to merge this first :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gchanan has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary: Fixes pytorch/pytorch#6968 Needed for #14705 Pull Request resolved: pytorch/pytorch#16389 Differential Revision: D13861446 Pulled By: gchanan fbshipit-source-id: 7b8700b95aaf252d9669693dbddccb2302e58409
Summary: gchanan pointed out in #16389 that `allow_inf` is treating `-inf` and `inf` as equal. This fixes it. Also fixing #16448 since it's near and 2.1 has released. Pull Request resolved: #16959 Differential Revision: D14025297 Pulled By: gchanan fbshipit-source-id: 95348309492e7ab65aa4d7aabb5a1800de66c5d6
I'm confused - why is this closed? |
@TimZaman it got merged into master. our bot closes a PR that got merged into master instead of a "github merge" purple color |
Fixes #6968
Needed for #14705