Issues with TensorRT execution
조회 수: 5 (최근 30일)
이전 댓글 표시
Currently I create a Simulink model that calls a mexw64 file that was generated for deep learning with TensorRT, I have no issues to generate the mex file but when I try to execute I have the following message:
Invalid MEX-file 'D:\PhD\ITESO\Clases\10._Semestre_7\IDI_X\Simulation\resNet18SemanticSegmentationRT_mex.mexw64': No se puede
encontrar el módulo especificado.
But the file is present on the same folder. Also when I execute the verification of the setup as follows:
gpuEnvObj = coder.gpuEnvConfig;
gpuEnvObj.BasicCodegen = 1;
gpuEnvObj.BasicCodeexec = 1;
gpuEnvObj.DeepLibTarget = 'tensorrt';
gpuEnvObj.DeepCodeexec = 1;
gpuEnvObj.DeepCodegen = 1;
results = coder.checkGpuInstall(gpuEnvObj)
I have the following:
Compatible GPU : PASSED
CUDA Environment : PASSED
Runtime : PASSED
cuFFT : PASSED
cuSOLVER : PASSED
cuBLAS : PASSED
cuDNN Environment : PASSED
TensorRT Environment : PASSED
Basic Code Generation : PASSED
Basic Code Execution : PASSED
Deep Learning (TensorRT) Code Generation: PASSED
Deep Learning (TensorRT) Code Execution: FAILED (Generated GPU code failed to execute properly with the following error 'Invalid MEX-file 'C:\Users\alis\AppData\Local\Temp\tp22472ee1_cce8_43cd_b782_e5b03357a893\dlEntryPointTest_mex.mexw64': No se puede encontrar el módulo especificado.')
results =
struct with fields:
gpu: 1
cuda: 1
cudnn: 1
tensorrt: 1
basiccodegen: 1
basiccodeexec: 1
deepcodegen: 1
deepcodeexec: 0
tensorrtdatatype: 1
profiling: 0
This is on a Windows 10 machine.
Any idea of waht can be the issue?
댓글 수: 0
답변 (3개)
Mikaël LE GRAND
2020년 10월 23일
Hello,
I also encounter the same problem :
gpuEnvObj = coder.gpuEnvConfig;
gpuEnvObj.BasicCodegen = 1;
gpuEnvObj.BasicCodeexec = 1;
gpuEnvObj.DeepLibTarget = 'tensorrt';
gpuEnvObj.DeepCodeexec = 1;
gpuEnvObj.DeepCodegen = 1;
results = coder.checkGpuInstall(gpuEnvObj)
Compatible GPU : PASSED
CUDA Environment : PASSED
Runtime : PASSED
cuFFT : PASSED
cuSOLVER : PASSED
cuBLAS : PASSED
cuDNN Environment : PASSED
TensorRT Environment : PASSED
Basic Code Generation : PASSED
Basic Code Execution : PASSED
Deep Learning (TensorRT) Code Generation: PASSED
Deep Learning (TensorRT) Code Execution: FAILED (Generated GPU code failed to execute properly with the following error 'Invalid MEX-file 'C:\Users\adm.mle_grand\AppData\Local\Temp\tp05f76285_6ff4_4487_8fca_16965e73b665\dlEntryPointTest_mex.mexw64': Le module spécifié est introuvable.')
results =
struct with fields:
gpu: 1
cuda: 1
cudnn: 1
tensorrt: 1
basiccodegen: 1
basiccodeexec: 1
deepcodegen: 1
deepcodeexec: 0
tensorrtdatatype: 1
profiling: 0
However the specified function (dlEntryPointTest_mex.mexw64) is present in the directory. Is it a problem of TensorRT release problem ?!? For my part, I use TensorRT-5.1.2.2 release :
I tried other releases of TensorRT but the result is always the same via gpucoderSetup command :
Can someone from the staff of Mathworks help us solve this annoying problem ?
댓글 수: 0
Mikaël LE GRAND
2020년 11월 5일
Hello,
i finally resolve the problem by reading more accuratly the MATLAB documentation. So :
1/ I have installed CUDA Toolkit 10.1 (R2020a compatible) https://developer.nvidia.com/cuda-10.1-download-archive-update2?target_os=Windows&target_arch=x86_64&target_version=10&target_type=exelocal
2/ I have installed CudNN 7.5.0.56 (R2020a compatible) https://developer.nvidia.com/compute/machine-learning/cudnn/secure/v7.5.0.56/prod/10.1_20190225/cudnn-10.1-windows10-x64-v7.5.0.56.zip
3/ I have installed TensorRT 5.1.2.2 (R2020a compatible) https://developer.nvidia.com/nvidia-tensorrt-5x-download (choose TensorRT 5.1 RC version)
4/ I have setted up the environment variables that MATLAB need :
CUDA_PATH : C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1
CUDA_PATH_V10_1 : C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1
NVIDIA_CUDNN : C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\cuda
NVIDIA_TENSORRT : C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\TensorRT-5.1.2.2
NVTOOLSEXT_PATH : C:\Program Files\NVIDIA Corporation\NvToolsExt\
To finish, I add those path to the PATH variable :
- C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin
- C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\libnvvp
- C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\cuda\bin
- C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\TensorRT-5.1.2.2\lib
In MATLAB, it gives :
>> gpuEnvObj = coder.gpuEnvConfig('host');
gpuEnvObj.BasicCodegen = 1;
gpuEnvObj.BasicCodeexec = 1;
gpuEnvObj.DeepLibTarget = 'tensorrt';
gpuEnvObj.DeepCodeexec = 1;
gpuEnvObj.DeepCodegen = 1;
gpuEnvObj.Profiling = 1;
coder.checkGpuInstall(gpuEnvObj)
Compatible GPU : PASSED
CUDA Environment : PASSED
Runtime : PASSED
cuFFT : PASSED
cuSOLVER : PASSED
cuBLAS : PASSED
cuDNN Environment : PASSED
TensorRT Environment : PASSED
Profiling Environment : PASSED
Basic Code Generation : PASSED
Basic Code Execution : PASSED
Deep Learning (TensorRT) Code Generation: PASSED
Deep Learning (TensorRT) Code Execution: PASSED
ans =
struct with fields:
gpu: 1
cuda: 1
cudnn: 1
tensorrt: 1
basiccodegen: 1
basiccodeexec: 1
deepcodegen: 1
deepcodeexec: 1
tensorrtdatatype: 1
profiling: 1
>>
I hope this could help...
댓글 수: 0
참고 항목
카테고리
Help Center 및 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!