cupy icon indicating copy to clipboard operation
cupy copied to clipboard

Do not use plain thrust namespace in complex clone

Open miscco opened this issue 1 year ago • 4 comments

Thrust has introduced a wrapped versioning namespace. This is colliding with the namespace introduced in cupy/complex

To avoid that issue pull in the thrust config and use the proper thrust namespace macro

miscco avatar Mar 06 '24 13:03 miscco

/test mini

leofang avatar Mar 07 '24 23:03 leofang

There are build- and run- time compilation failures regarding missing <cstddef> include. For run-time ones it's clear, since NVRTC doesn't have it, and we weren't expected to add it without the help of Jitify. We probably need to bump the CCCL submodule so that https://github.com/NVIDIA/cccl/pull/1081 is included (but I thought it already was?). For build-time ones, it's coming from NVCC/MSVC and is really odd. @miscco any chance you know MSVC may have issues in finding cstddef?

leofang avatar Mar 08 '24 15:03 leofang

We probably need to bump the CCCL submodule so that NVIDIA/cccl#1081 is included (but I thought it already was?).

Ah I see, the submodule was pinned around last September, but that PR was merged in November, so it's not included yet.

leofang avatar Mar 08 '24 15:03 leofang

@miscco any chance you know MSVC may have issues in finding cstddef? Nope, not that I am aware of

miscco avatar Mar 08 '24 20:03 miscco

Hi,

When putting this patch together with #8412 we get the following errors:

E           cupy.cuda.compiler.CompileException: /home/scratch.ecastillo_gpu/em-cupy/cupy/_core/include/cupy/_cccl/thrust/thrust/detail/config/cpp_dialect.h(110): warning #161-D: unrecognized #pragma
E                  THRUST_COMPILER_DEPRECATION_SOFT(C++14, C++11);
E                  ^
E
E           Remark: The warnings can be suppressed with "-diag-suppress <warning-number>"
E
E           /home/scratch.ecastillo_gpu/em-cupy/cupy/_core/include/cupy/_cccl/cub/cub/util_cpp_dialect.cuh(121): warning #161-D: unrecognized #pragma
E                  CUB_COMPILER_DEPRECATION_SOFT(C++14, C++11);
E                  ^
E
E           /home/scratch.ecastillo_gpu/em-cupy/cupy/_core/include/cupy/_cccl/thrust/thrust/detail/type_deduction.h(24): catastrophic error: cannot open source file "utility"
E             #include <utility>
E                               ^
E
E           1 catastrophic error detected in the compilation of "/tmp/tmp2fkhyeil/55f612cd56d79848fd91480a5789a2f2d0164e5b.cubin.cu".
E           Compilation terminated.

Seems like the headers here are not nvrtc friendly :(

emcastillo avatar Jul 03 '24 04:07 emcastillo

Added a fix to #8412 basically it disables including the thrust headers for nvrtc, cupy also compiles with the most recent CCCL commit

emcastillo avatar Jul 03 '24 06:07 emcastillo

Note: This is included as part of #8412.

leofang avatar Aug 07 '24 06:08 leofang

and will be backported to CuPy v13 in #8459.

kmaehashi avatar Aug 07 '24 11:08 kmaehashi