-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
<cmath>
: New intrinsics broke CUDA
#1885
Comments
I believe the CI did not catch this because it only seems to happen when building device code, not host code (not familiar with CUDA but the error message seems to imply this) |
Is this related as well? I experienced that issue with other cuda as well, but the suggestion to switch from floor to floorf made it compile. |
Yes, |
Hi @StephanTLavavej, is this already on the latest Visual Studio releases? You mentioned this should be backported to v16.9, no? If not do you know when we could expect this to be released? I neither saw this on the release notes for v16.9 nor for v16.10. Thx a lot! |
Nevermind, I realized it's already in 16.10.2 at least |
@IngmarVoigt2 Yep, this shipped in 16.10.0 and was backported to 16.9.7. The VS and MSVC release notes don't contain this level of detail, but the STL's Changelog does - see https://github.com/microsoft/STL/wiki/Changelog#vs-2019-1610 and search for the PR number #1886. |
When #1336 added usage of new intrinsics to
<cmath>
, we forgot about CUDA. 🙀 (Long ago, we broke CUDA by adding new type traits intrinsics in C++14 mode, but these math functions were just different enough that I didn't remember the interaction. Oops!)I'm not exactly sure why our CUDA unit test didn't catch this, given that the affected overloads aren't templates:
STL/stl/inc/cmath
Lines 62 to 70 in f675d68
We are including
<cmath>
, so there's probably some detail of the CUDA compilation process that I don't understand:STL/stl/inc/__msvc_all_public_headers.hpp
Line 156 in f675d68
STL/tests/std/tests/GH_000639_nvcc_include_all/test.compile.pass.cpp
Lines 4 to 6 in f675d68
In any event, fixing this should be easy, we just need to backport it to VS 2019 16.9.
Originally encountered in pytorch/pytorch#54382 and tracked by Microsoft-internal VSO-1314894 / AB#1314894 .
The text was updated successfully, but these errors were encountered: