GPU coder check fail for deep learning cuDNN code generation and execution
이전 댓글 표시
I run gpu checks on r2024a/b over Nvidia RTX4080 Laptop with all combinations of VS2017/2019/2022 + Cuda11.8-12.2/cuDNN8.7-9.2/TensorRT8.5.1.7-8.6.1.6, and always got the deepcodegen & deepcodeexec fails as below :
>>gpuEnvObj = coder.gpuEnvConfig('host');
gpuEnvObj.BasicCodegen = 1;
gpuEnvObj.BasicCodeexec = 1;
gpuEnvObj.DeepLibTarget = 'cudnn';
gpuEnvObj.DeepCodegen = 1;
gpuEnvObj.DeepCodeexec = 1;
results = coder.checkGpuInstall(gpuEnvObj)
Compatible GPU : PASSED
CUDA Environment : PASSED
Runtime : PASSED
cuFFT : PASSED
cuSOLVER : PASSED
cuBLAS : PASSED
cuDNN Environment : PASSED
Host Compiler : PASSED
Basic Code Generation : PASSED
Basic Code Execution : PASSED
Deep Learning (cuDNN) Code Generation: FAILED (GPU code generation failed with an error. View report for further information: View report)
results =
struct with fields:
gpu: 1
cuda: 1
cudnn: 1
tensorrt: 0
hostcompiler: 1
basiccodegen: 1
basiccodeexec: 1
deepcodegen: 0
tensorrtdatatype: 0
deepcodeexec: 0
The Error Report always shows as below :

답변 (1개)
Hariprasad Ravishankar
2024년 12월 5일
Hello,
I suspect that that the "GPU Coder Interface for Deep Learning Libraries" support package is not installed in your support package root.
Can you please inspect your support package root by executing:
installDir = matlabshared.supportpkg.getSupportPackageRoot
Can we try updating your support package root using the command
matlabshared.supportpkg.setSupportPackageRoot(installDir)
You can then try to reinstall the support package and rerun the coder.checkGpuInstall command.
댓글 수: 8
wtg Wtg
2024년 12월 6일
Hariprasad Ravishankar
2024년 12월 16일
I couldn't reproduce this in R2024b.
Can you please reply with the output of
>> which coder.internal.DeepLearningNetwork
wtg Wtg
2024년 12월 17일
Hariprasad Ravishankar
2024년 12월 17일
Thanks for your response. I don't see any issue with your setup.
I noticed that your mldatx is located inside C:\ProgramData\Matlab\SupportPackages\R2024b, so I assume you're attempting to generate code from that directory. Can you please try generating code from another directory?
Otherwise, I would recommend reaching our to Technical Support to assist you better.
wtg Wtg
2024년 12월 17일
Hariprasad Ravishankar
2024년 12월 17일
To be sure, do you see the same error when running gpu codegen outside of coder.checkGpuInstall?
For example
function out = foo()
net = imagePretrainedNetwork('squeezenet');
out = predict(net, dlarray(ones(227,227,3,'single'), 'SSC'));
end
codegen -config coder.gpuConfig foo
wtg Wtg
2024년 12월 18일
Hariprasad Ravishankar
2024년 12월 18일
That's unfortunate. We need to take a closer look at your setup. I definitely recommend creating a ticket with Technical Support.
카테고리
도움말 센터 및 File Exchange에서 Get Started with GPU Coder에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
