简体   繁体   中英

Several questions about CUDA and cuPrintf

  1. I can compile successfully my code using cuPrintf by nvcc, but cannot compile it in Visual Studio 2012 environment. It says that "volatile char *" cannot be changed to "const void *" in "cudaMemcpyToSymbol" function.

  2. cuPrintf seems doesn't work, there's no cuPrintf function executed in kernel code.

  3. How to make nvcc export pdb file?

  4. Is there any other convenient way to debug in kernel function? I have only one laptop.

1st , cuPrinft is deprecated (As far as I know it has never been released) you can print data from kernel using print command, but this is a very not recommended way of debugging your kernels.

2nd, You are compiling using CUDA nvcc compiler, there is no such thing pdb file in CUDA, Albeit watch the 'g' and 'G' flags, those may dramatically increase your running time.

3rd, The best way to debug kernels is using visual Nsight

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM