-
Notifications
You must be signed in to change notification settings - Fork 26.3k
made floor/ceil return ints #21124
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 floor/ceil return ints #21124
Conversation
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
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
| 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( |
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.
Do we have a test to trigger this error btw?
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.
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
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! Please land once CI is green.
|
It's actually green (just rate limited). Thanks! |
Stack from ghstack:
Differential Revision: D15563187