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

Fix internal assert for torch.heaviside with cuda tensor and cpu scalar tensor #46831

Closed
wants to merge 2 commits into from

Conversation

Kiyosora
Copy link
Contributor

@Kiyosora Kiyosora commented Oct 26, 2020

Fixed #46681

>>> x = torch.randn(10, device='cuda')
>>> y = torch.tensor(1.)
>>> torch.heaviside(x, y)
tensor([0., 1., 0., 1., 1., 0., 1., 1., 1., 0.], device='cuda:0')

@Kiyosora Kiyosora changed the title [WIP] Fix internal assert for torch.heaviside with cuda tensor and cpu scalar tensor Fix internal assert for torch.heaviside with cuda tensor and cpu scalar tensor Oct 26, 2020
@Kiyosora Kiyosora marked this pull request as ready for review October 26, 2020 09:43
@izdeby izdeby requested a review from zou3519 October 26, 2020 17:24
@izdeby
Copy link
Contributor

izdeby commented Oct 26, 2020

@Kiyosora, can you, please, add some test cases?

@izdeby izdeby added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Oct 26, 2020
@izdeby izdeby self-requested a review October 26, 2020 17:26
@Kiyosora
Copy link
Contributor Author

@izdeby, Sure, I've appended some test cases for the cross device heaviside, please take a look in your convenience.

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.

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

@facebook-github-bot
Copy link
Contributor

@izdeby merged this pull request in 53839ac.

@Kiyosora Kiyosora deleted the fix_heaviside_assert branch October 28, 2020 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Merged 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.

torch.heaviside internal assert for cuda tensor and cpu scalar tensor
5 participants