Skip to content

Conversation

@benoitsteiner
Copy link
Contributor

This pull request intends to provide the functionality requested in #10742 by adding a new torch.finfo and torch.iinfo API.

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.

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

Copy link
Member

@colesbury colesbury left a 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.

@sytrus-in-github
Copy link
Contributor

@benoitsteiner Thanks a lot! Is it possible to set the default parameter of torch.finfo to the default dtype of pytorch for 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.

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

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.

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

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.

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

Copy link
Member

@colesbury colesbury left a 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.

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.

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

zdevito pushed a commit to zdevito/ATen that referenced this pull request Oct 15, 2018
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
@ezyang ezyang added the merged label Jun 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants