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

Add stack & cat support for CPU Half #16389

Closed
wants to merge 3 commits into from
Closed

Conversation

ssnl
Copy link
Collaborator

@ssnl ssnl commented Jan 25, 2019

Fixes #6968

Needed for #14705

# inf check if allow_inf=True
if allow_inf:
inf_mask = torch.isinf(a)
self.assertTrue(torch.equal(inf_mask, torch.isinf(b)), message)
Copy link
Contributor

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?

Copy link
Collaborator Author

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 :)

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.

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

@ssnl ssnl deleted the half_stack branch January 29, 2019 21:10
zdevito pushed a commit to zdevito/ATen that referenced this pull request Jan 29, 2019
Summary:
Fixes pytorch/pytorch#6968

Needed for #14705
Pull Request resolved: pytorch/pytorch#16389

Differential Revision: D13861446

Pulled By: gchanan

fbshipit-source-id: 7b8700b95aaf252d9669693dbddccb2302e58409
facebook-github-bot pushed a commit that referenced this pull request Feb 12, 2019
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
@TimZaman
Copy link

I'm confused - why is this closed?

@soumith
Copy link
Member

soumith commented Apr 26, 2019

@TimZaman it got merged into master. our bot closes a PR that got merged into master instead of a "github merge" purple color

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

Successfully merging this pull request may close these issues.

[feature request] Implement torch.stack() / _cat() for also for torch.HalfTensor
6 participants