Hello,
I want to know if there’s a way that I can print out the thrust library version and cub library version in .cu program in runtime?
Get the information I am actually using for these two libraries.
Hello,
I want to know if there’s a way that I can print out the thrust library version and cub library version in .cu program in runtime?
Get the information I am actually using for these two libraries.
The libraries define version macros.
For example cub: cccl/cub/cub/version.cuh at 4a0addc88c74475d71d2dee198b972fb37f23052 · NVIDIA/cccl · GitHub
The thing I want to confirm is:
In CMakeLists.txt, I only need to find cuda package or enable_language(CUDA)
,
then I can directly use cub/thrust apis and include their headers in my .cu program without writing path of the libraries in cmake, right?
If yes, does the path of cub library and thrust library are in the cuda toolkit SDK path?
So if I export the path of different version of cuda toolkit(e.g., cuda-12.0/ cuda-12.1/), then after compiling the program, I will call different version of cub/thrust functions from different path, right?
yes, they are both in the CUDA toolkit path for an ordinary install. Both are template/header libraries, and they are in the include directory off of the CUDA toolkit root directory.
Yes, if you specify a CUDA toolkit path, you can use the thrust/cub directly, associated with that path.
Yes, if you use a different toolkit path, you will get the cub/thrust versions associated with that path. This is for relatively recent versions of the CUDA toolkit, like CUDA 11.0 and newer. If you go back to e.g. CUDA 8.0, things were different.