[BUG]: Libcudaxx headers such as <cuda/stream_ref> should compile even without CUDA compilers #3372
Closed
1 task done
Labels
bug
Something isn't working right.
Is this a duplicate?
Type of Bug
Compile-time Error
Component
libcu++
Describe the bug
When using non CUDA compilers on the <cuda/stream_ref> header from libcudacxx, the
::cuda::__throw_cuda_error(__result, "Failed to query stream.");
call is not compiling becauselibcudacxx/include/cuda/std/__exception/cuda_error.h
only defines__throw_cuda_error
for CUDA compilers.This issue is raised in practice when compiling cuGraph with a recent version of CCCL.
One strategy could be to implement
::cuda::__throw_cuda_error
for non CUDA compilers (#3369 ) but the first argument is a cudaError_t which is not necessarily defined (eg. in Thrust with a host backend). Pretending we did implement it by simply throwing away the cuda error is also a suspicious strategy.The other strategy is to adapt call sites (<cuda/stream_ref> in this case) to avoid
::cuda::__throw_cuda_error
. This is what #3370 implements, but does a lot of code bloating to replace::cuda::__throw_cuda_error(__result, "Failed to query stream.");
in the "unlikely" situation where we have a non CUDA compiler.How to Reproduce
Compile the cpp lib for that branch which updates CCCL in cuGraph rapidsai/cugraph#4833
Expected behavior
::cuda::__throw_cuda_error
can be used without a CUDA compilerInfrastructure :
Reproduction link
No response
Operating System
No response
nvidia-smi output
No response
NVCC version
No response
The text was updated successfully, but these errors were encountered: