#include <limits> fails on Windows
Robadob opened this issue · 0 comments
Robadob commented
Visual Studio 2019
CUDA 11.2
Adding #include <limits>
to any RTC kernel causes a compilation error at runtime.
---------------------------------------------------
--- JIT compile log for my_program ---
---------------------------------------------------
limits(124): error: invalid narrowing conversion from "int" to "wchar_t": constant value does not fit in destination type
limits(124): error: invalid narrowing conversion from "int" to "wchar_t": constant value does not fit in destination type
2 errors detected in the compilation of "my_program".
---------------------------------------------------
Appears to be unhappy about this line:
Line 1628 in 5f8f0a1
Update: Based on further debugging in #86. There are two issues at play.
- Jitify defines
WCHAR_MIN
/WCHAR_MAX
as signed short rather than unsigned on windows. - CUDA versions prior to 11.0.x do not predefine
_WIN64
during NVRTC compilation. (So these CUDA versions use the Linux defines ofWCHAR_MIN
/WCHAR_MAX
)