Internal error in deep neural network quantification?

조회 수: 2 (최근 30일)
cui,xingxing . 2020년 8월 5일
댓글: Hanumanth Hanumantharayappa . 2020년 8월 21일
my env:
  • win10 x64
  • matlab2020a
  • cuda version:11.0
nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2020 NVIDIA Corporation
Built on Wed_May__6_19:10:02_Pacific_Daylight_Time_2020
Cuda compilation tools, release 11.0, V11.0.167
Build cuda_11.0_bu.relgpu_drvr445TC445_37.28358933_0
  • cudnn version:8.0.0
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0\include\cudnn_version.h
#define CUDNN_MAJOR 8
#define CUDNN_MINOR 0
#endif /* CUDNN_VERSION_H */
repruduce error:
When I use the "dlquantizer" function, the following unexpected error occurs. Why?
Unable to resolve the name dltargets.cudnn.SupportedLayerImpl.m_sourceFiles.
Error in coder.internal.getSupportedLayerTypes
Error in dlquantization.internal.utils.datavalidators.NetworkValidator/checkUnsupportedLayers
Error in dlquantization.internal.utils.datavalidators.NetworkValidator/validate
Error in dlquantizer (line 95)
check my env:
Compatible GPU : PASSED
CUDA Environment : PASSED
Runtime : PASSED
cuDNN Environment : PASSED (Warning: Deep learning code generation has been tested with cuDNN v7.5. The provided cuDNN library v8.0 may not be fully compatible.)
TensorRT Environment : FAILED (Unable to find the 'NVIDIA_TENSORRT' environment variable. Set 'NVIDIA_TENSORRT' to point to the root directory of a TensorRT installation.)
Profiling Environment : PASSED
Basic Code Generation : FAILED (Test GPU code generation failed with the error 'emlc:compilationError'. View report for further information: View report)
ans =
struct with fields:
gpu: 1
cuda: 1
cudnn: 1
tensorrt: 0
basiccodegen: 0
basiccodeexec: 0
deepcodegen: 0
deepcodeexec: 0
tensorrtdatatype: 0
profiling: 1
Then I open the above wrong report:
Do I have to install the old version of cuda10?

답변 (1개)

MathWorks Fixed Point Team
MathWorks Fixed Point Team 2020년 8월 7일
To avoid a ‘coder.internal.getSupportedLayerTypes’ error on creation of a dlquantizer object, install the ‘GPU Coder Interface for Deep Learning Libraries’.
You can verify that the addon is installed and enabled by executing in the MATLAB command window:
addons = matlab.addons.installedAddons
  댓글 수: 2
cui,xingxing 2020년 8월 20일
After installing the "GPU Coder interface for Deep Learning Libraries" above, there is no error, but I followed another tutorial step, and finally quantified an error. The screenshot is as follows. Why?
cfg = coder.gpuConfig('mex');
cfg.TargetLang = 'C++';
cfg.GpuConfig.ComputeCapability = '6.1';
cfg.DeepLearningConfig = coder.DeepLearningConfig('cudnn');
cfg.DeepLearningConfig.AutoTuning = true;
cfg.DeepLearningConfig.CalibrationResultFile = './myquantObj.mat';
cfg.DeepLearningConfig.DataType = 'int8';
codegen -config cfg -args {coder.Constant('mynet.mat'),ones(imageSize)} predict_int8 % ??? Invalid CUDA toolkit version found in system path for MEX compilation. CUDA v11 was found, but CUDA v10 is required for MEX builds.
??? Invalid CUDA toolkit version found in system path for MEX compilation. CUDA v11 was found, but CUDA v10 is required for MEX builds.
Code generation failed: View Error Report
Error using codegen
Error in quantizeModel (line 83)
codegen -config cfg -args {coder.Constant('mynet.mat'),ones(imageSize)} predict_int8
Is the essential problem caused by the CUDA version?
Hanumanth Hanumantharayappa
Hanumanth Hanumantharayappa 2020년 8월 21일
Hi Cui,
Yes, this problem is caused by the CUDA and CuDNN version you are using . You need CUDA v10.1 and and CuDNN 7.5. Let me know if this resolves your issue.

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


Help CenterFile 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!

Translated by