Skip to content
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

Rework our system header approach to be more error proof #661

Merged
merged 3 commits into from
Nov 8, 2023

Conversation

miscco
Copy link
Collaborator

@miscco miscco commented Nov 6, 2023

No description provided.

@miscco miscco requested review from a team as code owners November 6, 2023 18:21
@miscco miscco requested review from griwes, elstehle, gevtushenko, jrhemstad and wmaxey and removed request for a team November 6, 2023 18:21
@jrhemstad jrhemstad added the backport branch/2.3.x For backporting to the 2.3.x release branch label Nov 6, 2023
@miscco miscco force-pushed the resurrect_use_implicit_system_header branch from cac49bb to cfb9b7c Compare November 7, 2023 08:21
@miscco miscco added nvbug Has an associated internal NVIDIA NVBug. thrust For all items related to Thrust. cub For all items related to CUB libcu++ For all items related to libcu++ bug Something isn't working right. labels Nov 7, 2023
@miscco
Copy link
Collaborator Author

miscco commented Nov 7, 2023

I have taken that PR to fix nvbug4367604

@miscco miscco changed the title Resurrect bad typo Rework our system header approach to be more error proof Nov 7, 2023
@miscco miscco force-pushed the resurrect_use_implicit_system_header branch from 3d29df7 to b07b147 Compare November 7, 2023 09:07
Unfortunately nvcc has some issues with properly handling `_Pragma` for some host compilers

Rather than putting another bandaid on just move the `#pragma` into the respective header file
@miscco miscco force-pushed the resurrect_use_implicit_system_header branch from b07b147 to ba66bbd Compare November 7, 2023 09:09
@@ -22,6 +22,10 @@
# define _CCCL_COMPILER_MSVC
#elif defined(__IBMCPP__)
# define _CCCL_COMPILER_IBM
#elif defined(__INTEL_LLVM_COMPILER)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Funnily enough we were also missing intel compiler in our list

@@ -47,46 +51,44 @@
#endif

// Enforce that cccl headers are treated as system headers
#if defined(_CCCL_COMPILER_GCC)
# define _CCCL_FORCE_SYSTEM_HEADER _Pragma("GCC system_header")
#if defined(_CCCL_COMPILER_GCC) || defined(_CCCL_COMPILER_NVHPC) || defined(_CCCL_COMPILER_ICC) \
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the real change. We filter compilers and use the appropriate #pragma depending on the define

Co-authored-by: Georgii Evtushenko <[email protected]>
@miscco miscco merged commit 774a2a5 into NVIDIA:main Nov 8, 2023
515 checks passed
@miscco miscco deleted the resurrect_use_implicit_system_header branch November 8, 2023 08:33
Copy link
Contributor

github-actions bot commented Nov 8, 2023

Backport failed for branch/2.3.x, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally.

git fetch origin branch/2.3.x
git worktree add -d .worktree/backport-661-to-branch/2.3.x origin/branch/2.3.x
cd .worktree/backport-661-to-branch/2.3.x
git checkout -b backport-661-to-branch/2.3.x
ancref=$(git merge-base a9d7d8e26cbab2894d09d086e290b5960c823c62 86815971aaf966cb4e6ab5f67b8176fc5403f4aa)
git cherry-pick -x $ancref..86815971aaf966cb4e6ab5f67b8176fc5403f4aa

@jrhemstad
Copy link
Collaborator

/backport

Copy link
Contributor

github-actions bot commented Nov 8, 2023

Backport failed for branch/2.3.x, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally.

git fetch origin branch/2.3.x
git worktree add -d .worktree/backport-661-to-branch/2.3.x origin/branch/2.3.x
cd .worktree/backport-661-to-branch/2.3.x
git checkout -b backport-661-to-branch/2.3.x
ancref=$(git merge-base a9d7d8e26cbab2894d09d086e290b5960c823c62 86815971aaf966cb4e6ab5f67b8176fc5403f4aa)
git cherry-pick -x $ancref..86815971aaf966cb4e6ab5f67b8176fc5403f4aa

@jrhemstad
Copy link
Collaborator

@miscco will manually backport this PR by cherry-picking 774a2a5

miscco added a commit to miscco/cccl that referenced this pull request Nov 8, 2023
jrhemstad pushed a commit to miscco/cccl that referenced this pull request Nov 10, 2023
jrhemstad pushed a commit that referenced this pull request Nov 13, 2023
@jrhemstad jrhemstad removed the backport branch/2.3.x For backporting to the 2.3.x release branch label Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working right. cub For all items related to CUB libcu++ For all items related to libcu++ nvbug Has an associated internal NVIDIA NVBug. thrust For all items related to Thrust.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

6 participants