-
Notifications
You must be signed in to change notification settings - Fork 757
NVBug 2341455: reduce
fails to compile with complex
in CUDA 9.2
#928
Comments
Hi, there's not enough information in this bug for it to be actionable. Please provide a minimal and self contained test case. See also: https://github.com/brycelelbach/cpp_bug_reporting_guidelines |
Sorry about that. Is this ok now ? |
Pretty sure this is the same as #919 |
reduce
fails to compile with complex
in CUDA 9.2
@4rzael: yep. @FilipeMaia I think it is indeed a duplicate. |
@4rzael Can you please check if what you are trying to do works on the version of Thrust shipped with CUDA 10.0? |
Fixed as of CUDA 10.0. Please re-open if it's still an issue. |
Seeing this issue in CUDA 10.1 |
I also see this in CUDA 10.1, it only appears when I set -arch to anything other than sm_30 when compiling my stuff. |
This is still an issue when cub or thrust code is compiled in a separate library in CUDA 10.1 or CUDA 10.2. Attached is a minimal self reproducible example for Linux. (Requires cmake 3.10 and CUDA 10.1+) As @ianrgraham commented, this happens when -arch is set to anything other than the default. After extracting the attached, the cub_bug.sh script will use cmake to build/compile the code with Note that there is a standalone thrust::complex reduction done in the exec() function in the test_cuda.cu file that is NOT affected, since it is not part of the library. Removing the -arch statement will permit the compilation of the reduction of thrust::complex from the library, but this is not desirable. |
When you try to call the `Reduce` operation in the CUDA device adapter with a sufficently complex interator type, you get a compile error that says `error: cannot pass an argument with a user-provided copy-constructor to a device-side kernel launch`. This appears to be a bug in either nvcc or Thrust. I believe it is related to the following reported issues: * NVIDIA/thrust#928 * NVIDIA/thrust#1044 Work around this problem by making a special condition for calling `Reduce` with an `ArrayHandleMultiplexer` that calls the generic algorithm in `DeviceAdapterAlgorithmGeneral` instead of the algorithm in Thrust.
Hello,
I have been trying to implement some code requiring to call reduce on thrust::complexes, and the compiler fires me an error saying:
Here is the code:
And the compilation line:
nvcc test.cu -std=c++14 -arch=sm_61 --device-c
Cuda 9.2, ubuntu 18.04, nvcc host compiler: gcc
No compilation error
The transform compiles and run perfectly, however.
Am I doing something wrong ?
The text was updated successfully, but these errors were encountered: