host compiler failed but others all passed with 'coder.che​ckGpuInsta​ll('full')​'

5 次查看(过去 30 天)
Dear staff,
Greetings! I want to train some nets with matlab equipped with GPU. But some problems occurred during the configuration.
MATLAB: R2022b
Cuda: v11.2
nvidia toolkit: 12.1
GPU: RTX 4070 laptop
here's the results.
I tried many methods including MinGW, adding environmental variables, copying files into cuda path... but no useful.
My matlab also passed the vl_compilenn.m and vl_testnn.m. The mex -setup compiler was the MSVS c++2022. Also, I used gpuArray to transform data in my project and GPU likely worked and no error arised.

回答(1 个)

Joss Knight
Joss Knight 2023-5-26
MSVC 2022 was not supported by the NVIDIA CUDA compiler in R2022b. You either need to install MSVC 2019 (or 2017) or upgrade MATLAB to R2023a.
If you are actually using code generation then it is possible also to do this by installing your own version of the CUDA toolkit. However I'm not sure you are using code generation, since it does not support training. If you are using mexcuda then follow the above.

类别

Help CenterFile Exchange 中查找有关 GPU Computing 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by