Replies: 6 comments 6 replies
-
Hi! Thrust is part of CCCL so you can and should only install the entire CCCL library (Thrust needs libcu++ and CUB internally for example).
I would agree that installing Thrust without a CUDA compiler would be convenient. Maybe @alliepiper can help whether this is possible and if not, how hard it would be to make it possible. |
Beta Was this translation helpful? Give feedback.
-
Try using the installation instructions here: https://github.com/NVIDIA/cccl?tab=readme-ov-file#installation If you still have issues with those, please open an issue and ping me on it. |
Beta Was this translation helpful? Give feedback.
-
Thank you @alliepiper , I will try that. In the meantime this workflow is working with Old Thrust:
This allows me to test Thrust with OMP in Mac (not that it is my main platform, but it helps). |
Beta Was this translation helpful? Give feedback.
-
Thank you again @alliepiper , The instructions at https://github.com/NVIDIA/cccl?tab=readme-ov-file#installation worked! CCCL is a bit more download than Thrust, but other than that it worked (on Mac).
|
Beta Was this translation helpful? Give feedback.
-
Just wanted to add that I needed to add some more things to my CML to make it work. namely,
|
Beta Was this translation helpful? Give feedback.
-
Further improvement, Since I compile my project with warnings to the max (clang-tidy), I had do find_package(Thrust REQUIRED CONFIG)
thrust_create_target(Thrust)
thrust_create_target(ThrustOMP DEVICE OMP)
add_executable(omp.cpp.x omp.cpp)
target_include_directories(omp.cpp.x SYSTEM PRIVATE ${_THRUST_INCLUDE_DIR})
target_link_libraries(omp.cpp.x PRIVATE multi Boost::boost OpenMP::OpenMP_CXX ThrustOMP) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I know Thurst is a header only library, however it is convenient for it still to work with Cmake.
In turn, to cmake-install Thrust it requires CUDA (CUDA compiler).
That is, if I do
mkdir build; cd build; cmake ..;
it will complain that CUDA is not present.Is there a way to install Thrust without CUDA?
This is of course to use Thrust in a system without CUDA, but where the idea is to use Thrust-OMP or Thrust-TBB. (It is also a Mac).
Beta Was this translation helpful? Give feedback.
All reactions