Alvin
Alvin

Reputation: 950

fatal error while compiling cuda program

I'm implementing a program by using dynamic parallelism. Whenever I'm compiling the code, it is throwing fatal error as follows:

ptxas fatal : Unresolved extern function 'cudaGetParameterBuffer'

Compiling as below:

nvcc -o dyn_par dyn_par.cu -arch=sm_35

How to resolve it?

Upvotes: 3

Views: 939

Answers (1)

Suhail Patel
Suhail Patel

Reputation: 13694

The cudaGetParameterBuffer is part of the cudadevrt library which you need to specify in your compiler command and specify --relocatable-device-code as true

nvcc -o dyn_par dyn_par.cu -arch=sm_35 -lcudadevrt --relocatable-device-code true

Have a look at the CUDA Dynamic Parallelism Programming Guide from Nvidia (Page 21 describes the above) for more information

Upvotes: 5

Related Questions