1

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.

Alejandro Sazo
  • 796
  • 15
  • 31

1 Answers1

2

No. See the NVCC docs.

You can check the CUDA runtime or driver version at run time as described in this answer.

Community
  • 1
  • 1
harrism
  • 26,505
  • 2
  • 57
  • 88
  • 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