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

[BUG]: Fix MSVC build of CUB tests with RDC=true #462

Closed
1 task done
gevtushenko opened this issue Sep 20, 2023 · 0 comments · Fixed by #469
Closed
1 task done

[BUG]: Fix MSVC build of CUB tests with RDC=true #462

gevtushenko opened this issue Sep 20, 2023 · 0 comments · Fixed by #469
Assignees
Labels
bug Something isn't working right.

Comments

@gevtushenko
Copy link
Collaborator

Is this a duplicate?

Type of Bug

Compile-time Error

Component

CUB

Describe the bug

Recently, we've fixed an issue related to nvcc being unable to compile Catch2 main function. The fix consisted of separating Catch2 main function into a CXX target. This might've introduced a different issue. When building with MSVC / RDC=true, the following error occurs:

error LNK2019: unresolved external symbol __cudaRegisterLinkedBinary referenced in function 
"void __cdecl __nv_cudaEntityRegisterCallback(void * *)"

It looks like CXX linker is being selected. Apart from fixing this issue, we might want to separate Batch2 binaries into cub.cpp14.catch2_test.cdp_0 and cub.cpp14.catch2_test.cdp_1. This change should simplify tests development. Currently, it's easy to violate ODR when writing a CDP test. Developer should ensure that all of the test functions have internal visibility. Separating Catch2 binaries removes this requirement.

How to Reproduce

cmake -DCCCL_ENABLE_CUB=YES -DCCCL_ENABLE_THRUST=NO -DCCCL_ENABLE_LIBCUDACXX=NO -DCMAKE_CUDA_ARCHITECTURES=89 -DCUB_ENABLE_RDC_TESTS=YES ..
cmake --build . -j --target cub.cpp14.catch2_test

Expected behavior

Successful build of CUB tests with / without RDC.

Reproduction link

No response

Operating System

No response

nvidia-smi output

No response

NVCC version

No response

@gevtushenko gevtushenko added the bug Something isn't working right. label Sep 20, 2023
@gevtushenko gevtushenko self-assigned this Sep 20, 2023
@gevtushenko gevtushenko mentioned this issue Sep 20, 2023
2 tasks
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.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant