Skip to content

Conversation

@Chillee
Copy link
Collaborator

@Chillee Chillee commented May 30, 2019

Stack from ghstack:

Differential Revision: D15563187

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
@pytorchbot pytorchbot added module: custom-operators custom operators, custom ops, custom-operators, custom-ops module: docs Related to our documentation, both in docs/ and docblocks module: internals Related to internal abstractions in c10 and ATen module: onnx Related to torch.onnx module: operators module: tests Issues related to tests (not the torch.testing module) labels May 30, 2019
@Chillee Chillee removed caffe2 module: build Build system issues module: ci Related to continuous integration module: cpp Related to C++ API module: custom-operators custom operators, custom ops, custom-operators, custom-ops module: docs Related to our documentation, both in docs/ and docblocks module: internals Related to internal abstractions in c10 and ATen module: onnx Related to torch.onnx module: operators module: tests Issues related to tests (not the torch.testing module) labels May 30, 2019
Chillee added 3 commits May 30, 2019 15:37
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(
Copy link
Contributor

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?

Copy link
Collaborator Author

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.

Copy link
Contributor

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

@Chillee
Copy link
Collaborator Author

Chillee commented Jun 4, 2019

It's actually green (just rate limited). Thanks!

@zou3519 zou3519 deleted the gh/chillee/2/head branch June 4, 2019 17:35
@facebook-github-bot
Copy link
Contributor

@Chillee merged this pull request in 6938de8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merged module: bc-breaking Related to a BC-breaking change oncall: jit Add this issue/PR to JIT oncall triage queue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants