How to debug CUDA code in MEX function

Hi Guys,
I am currently writing a Matlab GUI for doing MRI image reconstruction. This GUI uses a MEX function running as a calculation kernel, and I have managed to add some CUDA GPU functions in order to speed up the performance. I have no problem for compiling the MEX c source code within Matlab using mex or using Visual Studio 2008 itself. However, I do have a big problem for debugging my code. Especially I had a hard time trying to figure out a way to get into GPU function for debugging, for instance, checking variables, which is very important for me since I am a beginner for CUDA programming. I am wondering if anyone has any experience for debugging CUDA GPU code in MEX function. Any thought of how to do this will be highly appreciated. Thanks a lot!

回答 (2 件)

JackOLantern
JackOLantern 2013 年 10 月 8 日

1 投票

You can follow the procedure in Debugging CUDA Matlab Mex file codes.
Joss Knight
Joss Knight 2013 年 10 月 11 日
編集済み: Joss Knight 2013 年 10 月 11 日

0 投票

Some instructions for Windows and Visual Studio can be found in the answer to this question.

カテゴリ

ヘルプ センター および File ExchangeGPU Computing についてさらに検索

質問済み:

2012 年 8 月 14 日

編集済み:

2013 年 10 月 11 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by