Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

gpu coder get wrong results in multiple functions with coder.varsize

조회 수: 6 (최근 30일)
liu jibao
liu jibao 2023년 2월 17일
마감: liu jibao 2023년 3월 3일
The following code is an example, when I use gpu coder to compile to mex file, the result is only output = 0, rather than a required vector array, I do not know how to modify and find other related samples.
function output=main_test(input)
%#codegen
% Map computation to GPU.
coder.gpu.kernelfun;
output=0;
coder.varsize('output');
output = varfun(input, output);
end
function out_var = varfun(in_var, out_var)
for i=1:10
out_var = [out_var, in_var +2];
end
end
  댓글 수: 2
Chao Luo
Chao Luo 2023년 2월 21일
Hi Jibao,
Thanks for reporting the issue. Can you provide us more information list here to reproduce the issue?
  1. MATLAB script for reproduction with input, codegen command or GPU Coder project file
  2. MATLAB version
  3. Operating system, Windows or Linux? Which version?
  4. GPU device
Thanks,
Chao
liu jibao
liu jibao 2023년 3월 3일
Hi Chao, I use my friend's matlab software, the version is R2021b, the Operating system is Windows 10, the GPU device is NVIDIA Quadro k2200.
when I upgraded the matlab version to r2022b update3, the results is right.
Thanks!

답변 (0개)

이 질문은 마감되었습니다.

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by