Is there a CUDA macro that may be used on host code to print which version of nvcc I am using? I know that nvcc -V should be enough by typing it on a terminal (linux) or in a harder way make the syscall with that line inside the code.
Asked
Active
Viewed 312 times
1
-
http://stackoverflow.com/questions/518995/cuda-compiler-nvcc-macro?rq=1 This was not helpful for me. – Alejandro Sazo Jun 15 '13 at 02:48
1 Answers
2
No. See the NVCC docs.
You can check the CUDA runtime or driver version at run time as described in this answer.
-
The function cudaRuntimeGetVersion() is what I am looking for. The question should have been how to get the compiler that I am using while running a cuda program. Thanks for your references. – Alejandro Sazo Jun 15 '13 at 20:12
-
Great, thanks for accepting. `cudaRuntimeGetVersion()` gives you the version of the CUDA Runtime Library, *not* the version of the compiler. – harrism Jun 16 '13 at 23:02
-
Then I will have to do a backtracking of my concepts before ask what I said I should haha. – Alejandro Sazo Jun 16 '13 at 23:10