pytorch / extension-cpp

C++ extensions in PyTorch
1.02k stars 214 forks source link

how to debug cuda code #4

Closed AceCoooool closed 6 years ago

AceCoooool commented 6 years ago

hi, @goldsborough , Is there a good way to debug .cu code ? From your great tutorial, I write a extension of ROI Align&ROI Pool. The cpp code is pretty easy to debug (just as the pure c++ code), however, i find it "troublesome" to debug of the cuda code (run python setup.py install again and again), and nvcc will raise error about cannot find ATen library.

Would you have any advice for debug cuda code?

Thank you ! (I find there are little discussions about c++ extension in Forums, so i pull an issue here. )

goldsborough commented 6 years ago

Hi, can you post the error you received here? Maybe I can help. Can you also fill out the issue template you were presented with? Thanks!

AceCoooool commented 6 years ago

Thanks for response, I did not find error yet. ~ I just curious about how to debug cuda code efficiently (Maybe it's inappropriate to discuss this topic here). I will close this issue. However, if anyone have good advice, can share it~ :smile:

Txusheng commented 4 years ago

Thanks for response, I did not find error yet. ~ I just curious about how to debug cuda code efficiently (Maybe it's inappropriate to discuss this topic here). I will close this issue. However, if anyone have good advice, can share it~ 😄

Hi, do you find an efficient way to debug cuda code now?