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
Improve diagnostic when the (default) CUDA device system is used in non-CUDA builds. #1663
Comments
|
You're compiling |
|
Although... this raises the question - why would this be broken for the default backend? |
universal_vector::resize fails with the default non-CUDA backend
By default, Thrust selects HOST=CPP and DEVICE=CUDA. This can be changed by explicitly defining the Perhaps nvc++ should set |
|
NVC++ shouldn't set |
|
Allison - regardless of how Thrust got into that mode, `universal_vector`
should work with all backends, so this is probably a bug of some sort.
…On Fri, Apr 22, 2022 at 12:32 PM David Olsen ***@***.***> wrote:
NVC++ shouldn't set THRUST_DEVICE_SYSTEM or related macros when neither
CUDA nor stdpar modes are enabled. When NVC++ is in normal C++ mode, it
should treat Thrust the same as any other compiler (that is not NVCC).
—
Reply to this email directly, view it on GitHub
<#1663 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADBG4QSP6ON4WTYER4OZCLVGLIB3ANCNFSM5T3WIMPQ>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
--
Bryce Adelstein Lelbach aka wash (he/him/his)
US Programming Language Standards (PL22) Chair
ISO C++ Library Evolution Chair
HPC Programming Models Architect @ NVIDIA
--
|
This is exactly how it works with other C++ compilers. Trying to build the above reproducer with g++ fails in the exact same way, unless the device system is explicitly set to CPP. The only way to fix that on our side is to change the default system, which would be very disruptive.
|
|
I was conflating the nvc++ stdpar usage of Thrust with the actual issue here, which is trying to use Thrust functionality in user code when building with nvc++. I agree that nvc++ shouldn't be modifying any Thrust configs in this case, as it's the user's responsibility to configure this. @jeffhammond There are two ways to fix this, depending on what you need:
Let me know if there's anything I missed or if we can close this. |
|
Why isn't not setting CUDA mode sufficient to enable a non-CUDA back end, or, at the very least, trigger a warning that it creates a scenario where Thrust doesn't work? |
It's up to the user to pick the system that they want to use -- we can't predict whether they want to use serial, OpenMP, or TBB for non-CUDA builds.
It does emit a diagnostic stating that functionality is missing for a currently selected system: I agree that this could be improved. I'll update this issue to reflect that we need a better diagnostic in this case. |
universal_vector::resize fails with the default non-CUDA backend
Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

I can't tell where the problem is. Why does the version of Thrust that I get with
stdpar=gpuwork, whereas the version from GitHub doesn't?Thanks
MCVE
It works with stdpar=gpu
It fails with 25547a4
The text was updated successfully, but these errors were encountered: