Open wrvsrx opened 8 months ago
Any update/follow-up on this?
Hi! We are sorry this causes problems on your end! Unfortunately, this is expected. See also this issue: #1374. Here is the relevant snippet:
thrust/
header is supported in host-only TUs when THRUST_DEVICE_SYSTEM=CUDA
. [...]thrust/
headers are supported in host-only TUs when THRUST_DEVICE_SYSTEM={CPP, OMP, TBB}
Is this a duplicate?
Type of Bug
Compile-time Error
Component
Thrust
Describe the bug
If
thrust/reduce.h
is inclued in host code, following cpp file can't be compiled using g++ 12.3.According to git bisect, this bug is caused by 7395463758994ff95f2d583fb7d537fbbbf1c262. According to https://github.com/NVIDIA/cccl/blob/7395463758994ff95f2d583fb7d537fbbbf1c262/cub/cub/util_device.cuh#L34,
cub/cub/util_device.cuh
should only contain host function. However, this commit introduce device function and<cub/util_ptx.cuh>
into it, which cause the bug.How to Reproduce
main.cpp
with following contents:g++ -Ithrust -Ilibcudacxx/include -Icub main.cpp -o main
Expected behavior
It compiles succesfully.
Reproduction link
No response
Operating System
NixOS 24.05pre-git (Uakari) x86_64
nvidia-smi output
It's not related to nvidia driver.
NVCC version
It's not related to nvcc.