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

Extend CUB/Thrust magic namespace with NVHPC #2770

Closed
bernhardmgruber opened this issue Nov 12, 2024 · 0 comments · Fixed by #2771
Closed

Extend CUB/Thrust magic namespace with NVHPC #2770

bernhardmgruber opened this issue Nov 12, 2024 · 0 comments · Fixed by #2771
Assignees
Labels
cub For all items related to CUB thrust For all items related to Thrust.

Comments

@bernhardmgruber
Copy link
Contributor

bernhardmgruber commented Nov 12, 2024

Recently, in #2664 we also introduced different behavior depending on the compiler used to translate CUDA kernels. This can get us into similar troubles when object files with device code from different compilers are linked together, because depending on how the linker chooses between the available weak symbols, the host side kernel setup might not match what the device-side entry point expects.

Because mixing object files with device code from different compilers is a supported scenario, we should guard Thrust/CUB symbols against such a mix. CUB and Thrust already use an inline namespace containing the list of SM architectures we compile for. This avoids/detects errors when object files compiled for different architectures are linked together. This list should be extended by whether NVHPC is used or not.

@github-project-automation github-project-automation bot moved this to Todo in CCCL Nov 12, 2024
@bernhardmgruber bernhardmgruber added cub For all items related to CUB thrust For all items related to Thrust. labels Nov 12, 2024
@bernhardmgruber bernhardmgruber self-assigned this Nov 12, 2024
bernhardmgruber added a commit to bernhardmgruber/cccl that referenced this issue Nov 12, 2024
The new Thrust namespace is `thrust::THRUST_200800_SM_860_NVHPC_NS` if NVHPC is used, otherwise `thrust::THRUST_200800_SM_860_NS`. CUB works analogous.

Fixes: NVIDIA#2770
@cccl-authenticator-app cccl-authenticator-app bot moved this from Todo to In Review in CCCL Nov 12, 2024
bernhardmgruber added a commit to bernhardmgruber/cccl that referenced this issue Nov 13, 2024
The new Thrust namespace is `thrust::THRUST_200800_SM_860_NVHPC_NS` if NVHPC is used, otherwise `thrust::THRUST_200800_SM_860_NS`. CUB works analogous.

Fixes: NVIDIA#2770
@github-project-automation github-project-automation bot moved this from In Review to Done in CCCL Nov 19, 2024
trxcllnt pushed a commit to trxcllnt/cccl that referenced this issue Nov 23, 2024
The new Thrust namespace is `thrust::THRUST_200800_SM_860_NVHPC_NS` if NVHPC is used, otherwise `thrust::THRUST_200800_SM_860_NS`. CUB works analogous.

Fixes: NVIDIA#2770
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cub For all items related to CUB thrust For all items related to Thrust.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant