-
Notifications
You must be signed in to change notification settings - Fork 187
Conversation
f2ea8f4
to
64b2727
Compare
64b2727
to
7256707
Compare
@@ -16,166 +16,200 @@ | |||
#include <cuda/std/complex> | |||
#include <cuda/std/cassert> | |||
|
|||
#ifdef __CUDA_ARCH__ |
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.
This needs to be brought to attention, __CUDA_ARCH__
globals are not going to be supportable with NVC++. So this change serves a dual purpose in the future.
Immediately, however, NVRTC cannot initialize the testcases
constant using the dynamic floating point values from the likes of CUDART_INF_F
.
libcxx/include/cmath
Outdated
@@ -312,33 +312,19 @@ long double truncl(long double x); | |||
#pragma GCC system_header | |||
#endif | |||
|
|||
#ifdef _LIBCUDACXX_COMPILER_NVRTC | |||
#include <math_constants.h> |
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.
Just FYI: I am not sure what's the release strategy of libcu++, so maybe this can be ignored, but including this header has caused trouble in CuPy when a user runs CUDA + NVRTC + CuPy in a "runtime" environment (such as the CUDA Runtime Docker, or RAPIDS's favorite Conda env), because none of the standard CUDA headers are present there due to EULA.
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 Leo!
That's insightful, I'm recalling now similar issues with cooperative_groups being unavailable in NVRTC.
I have a more preferable solution now that I think about it.
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.
Wesley, the change in 6696f20 is cool 😄
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.
Approve pending resolution of the comments.
Changes made in this patchset to fix #101:
<cmath>
exposes a subset ofcuda::std::
math functions under NVRTC.<cmath>
creates defines forINFINITY
andNAN
when NVRTC is detected