필터 지우기
필터 지우기

Can I step in .cu file when doing GPU parallel computing in MATLAB

조회 수: 1 (최근 30일)
To do GPU parallel computing with MATLAB, one needs to write a .cu function, or kernel, which is called by MATLAB script.
I am wondering is there anyway I can step in the .cu file when the code is running? Because I think when debugging the code, it is not enough to just step into the MATLAB code, we need to know what happens in the .cu file.
I am right now using a NOTEPAD to write a .cu file, and guess all the possibilities when there are errors. That is not good, so irritating. There is gotta be a way to looking into the .cu code when it's running.
Could someone please give me a pointer on how to debug the .cu file step by step? Any information is appreciated. Thanks!

채택된 답변

Edric Ellis
Edric Ellis 2012년 3월 21일
Running MATLAB under a CUDA debugger is possible, but rather difficult. You first need to ensure you can use the debugger on a standalone CUDA program. It is almost certainly going to be much simpler to write a simple standalone CUDA program and use the debugger on that.
One other approach is to "debug" by modifying your kernel. Start with the simplest part, ensure that works correctly (probably by having your kernel return early), and then incrementally include more and more of your kernel.
  댓글 수: 1
Nick Tsui
Nick Tsui 2012년 3월 21일
The second approach is the one I am using.
Can you explain a little bit more on:
"It is almost certainly going to be much simpler to write a simple standalone CUDA program and use the debugger on that."
What debugger I can use for that? What IDE should I install? If I am using a windows 7, and if I am using a mac os? Thanks alot!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 GPU Computing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by