-
Notifications
You must be signed in to change notification settings - Fork 188
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]: __assert_fail redefinition conflict with LibTorch #2571
Comments
technically, the issue is more on the LibTorch side. We could potentially handle |
Actually, I believe the issue is the missing host device attribute |
@osayamenja could you check whether just adding |
@miscco fix works! Thanks! |
Is this a duplicate?
Type of Bug
Compile-time Error
Component
libcu++
Describe the bug
We redefine
__assert_fail()
here but this causes a linkage conflict/error when built with LibTorch that also defines the assertion.See error below:
My current workaround is to add a header guard condition eliding the definition in torch. I decided to mention this here, since this issue would probably get missed among the many other open issues at PyTorch GitHub.
How to Reproduce
Make a cpp project linking both LibTorch and CCCL, this can be done easily with CMake.
Suggested CMakeLists.txt
example-app.cu
Expected behavior
Code should compile, but this might be a tricky to resolve with torch.
Reproduction link
No response
Operating System
Ubuntu Linux 22.04
nvidia-smi output
NVCC version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2024 NVIDIA Corporation
Built on Wed_Aug_14_10:10:22_PDT_2024
Cuda compilation tools, release 12.6, V12.6.68
Build cuda_12.6.r12.6/compiler.34714021_0
The text was updated successfully, but these errors were encountered: