Open nvibd opened 3 years ago
The libcu++ version is the one included with CUDA 11.2.
cl.exe version:
Microsoft (R) C/C++ Optimizing Compiler Version 19.28.29336 for x64
nvcc.exe version:
Cuda compilation tools, release 11.2, V11.2.67
There currently isn't a guarantee that libcu++ can be compiled solely by a host compiler. See https://github.com/NVIDIA/cccl/issues/940
Thanks for bringing awareness to that previous ticket. I've added a comment there.
As a minimal example, save the following as
main.cpp
and compile with MSVC /cl.exe
, e.g.:cl main.cpp -I "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2\include"
The same code will compile fine with nvcc (given arch >= 70 flags), but it will generate a bunch of errors and one warning when compiled with MSVC. I've added them at the end of the post.
This seems in conflict with libcu++'s claim: "It provides a heterogeneous implementation of the C++ Standard Library that can be used in and between CPU and GPU code". In our application, this creates a problem as we include
<cuda/std/atomic>
indirectly together with pybind for Python bindings, which itself cannot be compiled withnvcc
for unrelated reasons.