How to debug cuda thrust functions in visual studio 2010 with parallel nsight

后端 未结 1 478
执笔经年
执笔经年 2021-01-19 03:05

I am using visual studio 2010, parallel nsight 2.2 and cuda 4.2 for learning. My system is Windows 8 pro x64. I opened the radix sort project which included by cuda computin

相关标签:
1条回答
  • 2021-01-19 03:49

    Normally, to debug device code in CUDA, it's necessary to pass the:

    -G -g
    

    switches to nvcc. However this modality is not supported with thrust code. You can get an idea of how thrust code gets dispatched to the device by following the structure in the thrust include files. Since thrust is entirely templatized code, there are no libraries to worry about. However that's a challenging proposition. You can also tell the compiler to generate ptx:

    -ptx
    

    which is one of the intermediate code types that cuda code gets compiled to. However that is not a trivial thing to parse either. This link gives some alternate ideas for debugging with Thrust.

    0 讨论(0)
提交回复
热议问题