-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Fix sign warnings in CUDA kernels #66753
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
CI Flow Status⚛️ CI FlowRuleset - Version:
You can add a comment to the PR and tag @pytorchbot with the following commands: # ciflow rerun, "ciflow/default" will always be added automatically
@pytorchbot ciflow rerun
# ciflow rerun with additional labels "-l <ciflow/label_name>", which is equivalent to adding these labels manually and trigger the rerun
@pytorchbot ciflow rerun -l ciflow/scheduled -l ciflow/slow For more information, please take a look at the CI Flow Wiki. |
🔗 Helpful links
💊 CI failures summary and remediationsAs of commit 4cccfbe (more details on the Dr. CI page):
🕵️ 2 new failures recognized by patternsThe following CI failures do not appear to be due to upstream breakages:
|
This pull request was exported from Phabricator. Differential Revision: D31708173 |
1 similar comment
This pull request was exported from Phabricator. Differential Revision: D31708173 |
c0742c4
to
ef76d85
Compare
This pull request was exported from Phabricator. Differential Revision: D31708173 |
ef76d85
to
e12e9a8
Compare
e12e9a8
to
4885347
Compare
This pull request was exported from Phabricator. Differential Revision: D31708173 |
This pull request was exported from Phabricator. Differential Revision: D31708173 |
4885347
to
da6c0f9
Compare
Summary: Pull Request resolved: pytorch#66753 Fixes: ``` stderr: caffe2/aten/src/ATen/native/cuda/UnarySignKernels.cu: In lambda function: caffe2/aten/src/ATen/native/cuda/UnarySignKernels.cu:49:72: error: comparison is always false due to limited range of data type [-Werror=type-limits] 49 | AT_DISPATCH_ALL_TYPES_AND2 (pytorch@44fd312604fff5244e6d4fa1b3e440dd9b9e959f)(kBFloat16, ScalarType::Half, iter.input_dtype(), "signbit_cuda", [&]() { | ~~^~~ stderr: caffe2/aten/src/ATen/native/cuda/BinaryMulDivKernel.cu: In lambda function: caffe2/aten/src/ATen/native/cuda/BinaryMulDivKernel.cu:99:86: error: comparison is always false due to limited range of data type [-Werror=type-limits] 99 | AT_DISPATCH_INTEGRAL_TYPES(dtype, "div_floor_cuda", [&]() { | ^ caffe2/aten/src/ATen/native/cuda/BinaryMulDivKernel.cu:99:97: error: comparison is always false due to limited range of data type [-Werror=type-limits] 99 | AT_DISPATCH_INTEGRAL_TYPES(dtype, "div_floor_cuda", [&]() { | ^ stderr: caffe2/aten/src/ATen/native/cuda/BinaryMulDivKernel.cu: In lambda function: caffe2/aten/src/ATen/native/cuda/BinaryMulDivKernel.cu:99:86: error: comparison is always false due to limited range of data type [-Werror=type-limits] 99 | AT_DISPATCH_INTEGRAL_TYPES(dtype, "div_floor_cuda", [&]() { | ^ ``` And also: ``` caffe2/c10/util/Half.h(461): warning: pointless comparison of unsigned integer with zero detected during instantiation of "std::enable_if<<expression>, __nv_bool>::type c10::overflows<To,From>(From) [with To=size_t, From=unsigned long]" caffe2/aten/src/ATen/native/Resize.h(45): here caffe2/c10/util/Half.h(459): warning: pointless comparison of unsigned integer with zero detected during instantiation of "std::enable_if<<expression>, __nv_bool>::type c10::overflows<To,From>(From) [with To=size_t, From=unsigned long]" caffe2/aten/src/ATen/native/Resize.h(45): here ``` I thought I'd fixed this previously using `std::is_unsigned` in D25256251 (pytorch@cff1ff7), but apparently that was insufficient. Differential Revision: D31708173 fbshipit-source-id: 6378e934d5571847d96f36623eb39aafb93eac63
This pull request was exported from Phabricator. Differential Revision: D31708173 |
da6c0f9
to
76eaf65
Compare
This pull request was exported from Phabricator. Differential Revision: D31708173 |
76eaf65
to
0177883
Compare
This pull request was exported from Phabricator. Differential Revision: D31708173 |
0177883
to
aba938b
Compare
Summary: Pull Request resolved: pytorch#66753 Fixes these Wextra compilation errors: ``` stderr: caffe2/aten/src/ATen/native/cuda/UnarySignKernels.cu: In lambda function: caffe2/aten/src/ATen/native/cuda/UnarySignKernels.cu:49:72: error: comparison is always false due to limited range of data type [-Werror=type-limits] 49 | AT_DISPATCH_ALL_TYPES_AND2 (pytorch@44fd312604fff5244e6d4fa1b3e440dd9b9e959f)(kBFloat16, ScalarType::Half, iter.input_dtype(), "signbit_cuda", [&]() { | ~~^~~ stderr: caffe2/aten/src/ATen/native/cuda/BinaryMulDivKernel.cu: In lambda function: caffe2/aten/src/ATen/native/cuda/BinaryMulDivKernel.cu:99:86: error: comparison is always false due to limited range of data type [-Werror=type-limits] 99 | AT_DISPATCH_INTEGRAL_TYPES(dtype, "div_floor_cuda", [&]() { | ^ caffe2/aten/src/ATen/native/cuda/BinaryMulDivKernel.cu:99:97: error: comparison is always false due to limited range of data type [-Werror=type-limits] 99 | AT_DISPATCH_INTEGRAL_TYPES(dtype, "div_floor_cuda", [&]() { | ^ stderr: caffe2/aten/src/ATen/native/cuda/BinaryMulDivKernel.cu: In lambda function: caffe2/aten/src/ATen/native/cuda/BinaryMulDivKernel.cu:99:86: error: comparison is always false due to limited range of data type [-Werror=type-limits] 99 | AT_DISPATCH_INTEGRAL_TYPES(dtype, "div_floor_cuda", [&]() { | ^ ``` And also these warnings: ``` caffe2/c10/util/Half.h(461): warning: pointless comparison of unsigned integer with zero detected during instantiation of "std::enable_if<<expression>, __nv_bool>::type c10::overflows<To,From>(From) [with To=size_t, From=unsigned long]" caffe2/aten/src/ATen/native/Resize.h(45): here caffe2/c10/util/Half.h(459): warning: pointless comparison of unsigned integer with zero detected during instantiation of "std::enable_if<<expression>, __nv_bool>::type c10::overflows<To,From>(From) [with To=size_t, From=unsigned long]" caffe2/aten/src/ATen/native/Resize.h(45): here ``` I thought I'd fixed this previously using `std::is_unsigned` in D25256251 (pytorch@cff1ff7), but apparently that was insufficient. Test Plan: Sandcastle Reviewed By: malfet, ngimel Differential Revision: D31708173 fbshipit-source-id: 220f0a1979c7b7c617b8b4eab97f690d3f518776
This pull request was exported from Phabricator. Differential Revision: D31708173 |
aba938b
to
f38bcf2
Compare
This pull request was exported from Phabricator. Differential Revision: D31708173 |
f38bcf2
to
4cccfbe
Compare
This pull request has been merged in 9900310. |
Summary:
Fixes:
I thought I'd fixed this previously using
std::is_unsigned
, but apparently not.Differential Revision: D31708173