Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add stack & cat support for CPU Half#16389

Closed
ssnl wants to merge 3 commits into
pytorch:masterfrom
ssnl:half_stack
Closed

Add stack & cat support for CPU Half#16389
ssnl wants to merge 3 commits into
pytorch:masterfrom
ssnl:half_stack

Conversation

@ssnl
Copy link
Copy Markdown
Collaborator

@ssnl ssnl commented Jan 25, 2019

Fixes #6968

Needed for #14705

Comment thread test/common_utils.py
# 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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown

I'm confused - why is this closed?

@soumith
Copy link
Copy Markdown
Collaborator

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

laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
Summary:
Fixes pytorch#6968

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

Differential Revision: D13861446

Pulled By: gchanan

fbshipit-source-id: 7b8700b95aaf252d9669693dbddccb2302e58409
laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
Summary:
gchanan pointed out in pytorch#16389 that `allow_inf` is treating `-inf` and `inf` as equal. This fixes it.

Also fixing pytorch#16448 since it's near and 2.1 has released.
Pull Request resolved: pytorch#16959

Differential Revision: D14025297

Pulled By: gchanan

fbshipit-source-id: 95348309492e7ab65aa4d7aabb5a1800de66c5d6
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