-
Notifications
You must be signed in to change notification settings - Fork 157
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
Move definitions of execution space macros into cccl
#1199
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
miscco
force-pushed
the
unify_execution_space_macros
branch
from
December 8, 2023 20:42
4ca643c
to
f3d7f4f
Compare
miscco
commented
Dec 11, 2023
gevtushenko
reviewed
Dec 11, 2023
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.
Please, make sure that there's no internal macro in docs and comments. I can also see __host__ __device__
in barrier header.
We want to avoid redefining or undefing `__host__`, `__device__` or `__forceinline__` To make this error proof, we define our own macros when we know they are available Fixes NVIDIA#1173
miscco
force-pushed
the
unify_execution_space_macros
branch
from
December 12, 2023 13:29
5273258
to
2ddf90c
Compare
gevtushenko
reviewed
Dec 13, 2023
gevtushenko
approved these changes
Dec 13, 2023
dkolsen-pgi
added a commit
to dkolsen-pgi/cccl
that referenced
this pull request
Dec 16, 2023
NVC++ stdpar mode enables CUDA support but does not define the macro `__CUDACC__`. Any code in CCCL (which is used by NVC++ stdpar under the covers) needs to check for either `__CUDACC__` or `_NVHPC_CUDA` being set. NVIDIA#1199 only checks for `__CUDACC__` when defining `_CCCL_HOST` and `_CCCL_DEVICE` and some other macros. This change completely broke `nvc++ -stdpar` because all functions became unannotated host functions. Fix this by changing several files in libcudacxx/include/cuda/std/detail/libcxx/include to check for either `__CUDACC__` or `_NVHPC_CUDA`.
Merged
miscco
pushed a commit
that referenced
this pull request
Dec 16, 2023
NVC++ stdpar mode enables CUDA support but does not define the macro `__CUDACC__`. Any code in CCCL (which is used by NVC++ stdpar under the covers) needs to check for either `__CUDACC__` or `_NVHPC_CUDA` being set. #1199 only checks for `__CUDACC__` when defining `_CCCL_HOST` and `_CCCL_DEVICE` and some other macros. This change completely broke `nvc++ -stdpar` because all functions became unannotated host functions. Fix this by changing several files in libcudacxx/include/cuda/std/detail/libcxx/include to check for either `__CUDACC__` or `_NVHPC_CUDA`.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We want to avoid redefining or undefing
__host__
,__device__
or__forceinline__
To make this error proof, we define our own macros when we know they are availableFixes #1173