-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG]: Current main
branch breaks host compiler when Thrust headers are included
#1373
Comments
@leofang I'm afraid this is not a supported use case. The default thrust device system has always been CUDA. If you want to get this working, you need to specify |
@leofang I'm a little confused. I wouldn't have expected |
@gevtushenko So should I take it as a happy coincidence that it just happened to work in the past few years? Also, is there any Thrust header that's guaranteed safe to be compiled by a host compiler (for the purpose of helping an autotool-like build system, where the host compiler checks if the header is present in the search path via compiling a snippet)? Just wanna know the expectation to plan ahead. |
(To be clear, it's not a blocker to CuPy, we live at head so it's a fairly simple fix on our side if it is deemed as NAB. I just want to 1. raise for awareness, and 2. confirm the team's expectation so that I can work on the fix to CuPy.) |
This is a very good question that I don't think has a satisfactory answer today. The safest and most restrictive answer is that no Thrust header can be included in a host-only TU unless the device system is set to CPP/OMP/TBB. However, there are definitely Thrust headers today that can be included/used in a host-only TU. I don't believe this was done intentionally, but just a coincidence of the implementation. That said, as a user, I'd reasonably expect things like So clearly there is a gap here that needs a closer look. |
Thanks, @gevtushenko @jrhemstad for quick turnaround! |
Maybe |
Is this a duplicate?
Type of Bug
Compile-time Error
Component
Thrust
Describe the bug
CuPy cannot be built due to this compiler error, which does not exist at all. I think this might be due to a missing compiler guard that used to exist somewhere and shielded the device APIs from the host path.
How to Reproduce
Two ways:
git clone --recursive https://github.com/cupy/cupy.git; cd cupy
cd third_party/cccl/; git checkout main; git pull origin main; cd ../..
pip install --no-deps --no-build-isolation -v -e .
Expected behavior
Module configuration works without error (no extra lines after
-------- Configuring Module: thrust --------
).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: