필터 지우기
필터 지우기

Error using gpucoder.profile (line 41)

조회 수: 1 (최근 30일)
Emiliano Rosso
Emiliano Rosso 2022년 11월 2일
댓글: Emiliano Rosso 2022년 11월 8일
I have a problem running:
cfg = coder.gpuConfig('exe');
cfg.GpuConfig.MallocMode = 'discrete';
gpucoder.profile('tvd_sim2_MEX',ARGS{1},'CodegenConfig',cfg,...
'CodegenArguments','-d profilingdir','Threshold',0.001);
I get error:
Error using gpucoder.profile (line 41)
Incorrect class for expression 'x': expected 'double' but found 'coder.PrimitiveType'.
What to do?
I have NVIDIA GPU Computing Toolkit\CUDA\v10.2
Microsoft Visual C++ 2019 (C)
Matlab R2020b
CUDA 5.2 compute capability
Thanks!
  댓글 수: 6
Justin Hontz
Justin Hontz 2022년 11월 7일
The code generated for profiling is roughly the same as the code generated from usual SIL codegen, though with some additional profiling API calls inserted in some places to enable the profiling to work as expected.
The error was occurring because the profiler was trying to pass the codegen input specification value (e.g. produced by coder.typeof) to the SIL executable, which is not valid as a runtime input.
The 'Gpu' option of coder.typeof simply controls whether the input of the generated entry-point function will be passed on GPU or not. This can improve performance by eliminating cudaMemcpy calls each time the entry-point function is executed in the case the input comes from GPU (e.g. a GPU array input for MEX).
Emiliano Rosso
Emiliano Rosso 2022년 11월 8일
Thanks for all! I finished.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB Algorithm Acceleration에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by