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

Made exception message for torch.LongTensor() legacy constructor more readable #46147

Closed
wants to merge 1 commit into from

Conversation

partypyro
Copy link
Contributor

Fixes #46085

Made exception message for torch.LongTensor() legacy constructor more
readable

exception_screenshot

Made exception message for torch.LongTensor() legacy constructor more 
readable
@codecov
Copy link

codecov bot commented Oct 11, 2020

Codecov Report

Merging #46147 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #46147   +/-   ##
=======================================
  Coverage   68.20%   68.20%           
=======================================
  Files         410      410           
  Lines       53453    53453           
=======================================
  Hits        36458    36458           
  Misses      16995    16995           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4c87d33...47cb3a4. Read the comment docs.

" was passed device type: ", device.value().type(),
", but device type must be: ", computeDeviceType(dispatch_key));
"legacy constructor expects device type: ", computeDeviceType(dispatch_key),
"but device type: ", device.value().type(), " was passed");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: "but" -> ", but"

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.

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

@facebook-github-bot
Copy link
Contributor

@mrshenli merged this pull request in 8d5256e.

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.

Confusing error message for torch.LongTensor([1], device = 'cuda')
4 participants