我正在尝试分析嵌入在mex文件中的CUDA代码,该代码来自MATLAB.在win7 x64机器上运行,MATLAB r2014b
代码结构如下:
MATLAB test.m
->contains some standard code generating variables (and calling 1 or 2 minor own MATLAB fucntions)
-> calls testcuda.mex
->contains small, standard, no library C++ code
-> calls either test1.cu or test2.cu
->.cu files end in cudaDeviceReset();
Run Code Online (Sandbox Code Playgroud)
我做了以下,如互联网上的几个地方所述:
exit在test.m结束时添加.C:\Program Files\MATLAB\R2014b\bin\matlab.exeC:\CUDA_MATLABtests\MyToolbox-nojvm -nosplash -r test但是,当我运行探查器时,我得到了
======== Warning: No CUDA application was profiled, exiting
Run Code Online (Sandbox Code Playgroud)
仅此而已.
我错过了一些指示?
是否有任何特定的代码结构会导致探查器无法分析?
Matlab安装附带两个二进制文件,一个启动器<matlabroot>\bin和主应用程序<matlabroot>\bin\<arch>.后者是可执行文件,它还在其地址空间中执行mex函数.
<matlabroot>\bin\<arch>.<matlabroot>\bin设置-wait参数时启动二进制文件就足够了.看到启动器应用程序终止,调试工具经常停止.<matlabroot>\bin\<arch>除非必须,否则不要直接使用二进制文件.