-
Notifications
You must be signed in to change notification settings - Fork 161
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
Fix invalid _CCCL_CUDACC
definition for clang cuda
#1656
Conversation
@@ -685,7 +685,7 @@ __constexpr_isfinite(_A1 __lcpp_x) noexcept | |||
return isfinite(__lcpp_x); | |||
} | |||
|
|||
#if defined(_MSC_VER) || defined(__CUDACC_RTC__) || defined(_CCCL_CUDA_COMPILER_CLANG) | |||
#if defined(_CCCL_COMPILER_MSVC) || defined(_CCCL_COMPILER_NVRTC) |
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 in case it was an oversight: This change removed || defined(_CCCL_CUDA_COMPILER_CLANG)
, but in further changes below, you left 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.
That is correct. For whatever reason ptxas
does not find the function definitions of logb
and scalbn
if we use the builtin
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.
ptxas fatal : Unresolved extern function 'scalbn'
clang: error: ptxas command failed with exit code 255 (use -v to see invocation)
Ubuntu clang version 16.0.6 (++20231112100510+7cbf1a259152-1~exp1~20231112100554.106)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
clang: note: diagnostic msg:
********************
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.
Alright, thx for confirming!
@@ -17,7 +17,9 @@ | |||
|
|||
// check that binder typedefs exit | |||
|
|||
// #include <cuda/std/functional> | |||
#define _LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS |
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.
suggestion: To assist future maintenance, add a comment saying what deprecated APIs this is suppressing.
Or better yet, use a more fine-grained self-documenting warning suppression if it exists (e.g. _LIBCUDACXX_IGNORE_DEPRECATED_[SOME_API]
), but this is probably beyond the scope of this PR.
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.
I am strongly in favor of adding more fine grained espace hatches, but we do not have them yet.
Given that everything we deprecated is because of the standard deprecating things, I would not want to add something here, but change it to a fine grained control soon^TM
clang-cuda does not implement the
__CUDACC_VER_MAJOR__
macrosConsequently the currently the _CCCL_CUDACC_VER was 0 which made clang-cuda fail all our
_CCCL_CUDACC_BELOW_MEOW
checks.We can fix this by synthesizing the information from
CUDA_VERSION