Closed
Conversation
This was referenced May 30, 2019
Closed
made floor/ceil return ints gh-metadata: pytorch pytorch 21124 gh/chillee/2/head
made floor/ceil return ints gh-metadata: pytorch pytorch 21124 gh/chillee/2/head
made floor/ceil return ints gh-metadata: pytorch pytorch 21124 gh/chillee/2/head
eellison
reviewed
May 30, 2019
made floor/ceil return ints gh-metadata: pytorch pytorch 21124 gh/chillee/2/head
made floor/ceil return ints gh-metadata: pytorch pytorch 21124 gh/chillee/2/head
made floor/ceil return ints gh-metadata: pytorch pytorch 21124 gh/chillee/2/head
made floor/ceil return ints gh-metadata: pytorch pytorch 21124 gh/chillee/2/head
made floor/ceil return ints gh-metadata: pytorch pytorch 21124 gh/chillee/2/head
made floor/ceil return ints gh-metadata: pytorch pytorch 21124 gh/chillee/2/head
ailzhang
reviewed
Jun 3, 2019
| if (std::isnan(a) || std::isinf(a) || | ||
| a > double(std::numeric_limits<int64_t>::max()) || | ||
| a < double(std::numeric_limits<int64_t>::min())) { | ||
| throw c10::Error( |
Contributor
There was a problem hiding this comment.
Do we have a test to trigger this error btw?
Collaborator
Author
There was a problem hiding this comment.
Not now. I don't think it's too necessary - our behavior when the user passes in an invalid input is 1. not really defined, and 2. more permissive than Python (other than with >64 bit integers). I think it's likely that any tests we write are likely to become code churn as various things change.
ailzhang
approved these changes
Jun 4, 2019
Contributor
ailzhang
left a comment
There was a problem hiding this comment.
Thanks! Please land once CI is green.
Collaborator
Author
|
It's actually green (just rate limited). Thanks! |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack from ghstack:
Differential Revision: D15563187