-
Notifications
You must be signed in to change notification settings - Fork 26.3k
torch.finfo and torch.iinfo to mimic the numpy equivalent #12472
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
Conversation
facebook-github-bot
left a comment
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.
benoitsteiner has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
colesbury
left a comment
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.
Thanks for adding these functions.
The torch.finfo and torch.iinfo probably deserve some documentation. You should be able to add the docstrings in torch/_torch_docs.py and reference them in docs/source/torch.rst.
|
@benoitsteiner Thanks a lot! Is it possible to set the default parameter of |
facebook-github-bot
left a comment
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.
benoitsteiner has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
facebook-github-bot
left a comment
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.
benoitsteiner has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
facebook-github-bot
left a comment
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.
benoitsteiner has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
colesbury
left a comment
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.
Looks good.
The latest version of the PR includes formatting changes to other files (torch/csrc/Module.cpp). I would prefer not including those as part of this PR.
facebook-github-bot
left a comment
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.
benoitsteiner has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary: This pull request intends to provide the functionality requested in pytorch/pytorch#10742 by adding a new torch.finfo and torch.iinfo API. Pull Request resolved: pytorch/pytorch#12472 Differential Revision: D10250829 Pulled By: benoitsteiner fbshipit-source-id: eb22ca55d5b0064bef381fa7f1eb75989977df30
This pull request intends to provide the functionality requested in #10742 by adding a new torch.finfo and torch.iinfo API.