You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 because libcudacxx/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.
Compile the cpp lib for that branch which updates CCCL in cuGraph rapidsai/cugraph#4833
Expected behavior
Provide a <cuda/stream_ref> which can be included from any C++ compiler
Define/Document whether ::cuda::__throw_cuda_error can be used without a CUDA compiler
Infrastructure :
Possibly add CI tests to assess whether CCCL features are available on non CUDA compilers
Automatically check in CI that all headers can be included from g++/clang even if features are disabled (generating some simple code that includes the file with an int main() {} ?)
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:
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: