Basic Code Generation : FAILED

13 visualizaciones (últimos 30 días)
yifan
yifan el 31 de Oct. de 2025
Respondida: yifan el 12 de Nov. de 2025
My MATLAB environment is 2025b, CUDA version is 12.2, and VS version is 17.0 Community Edition my GPU is RTX 2080ti, which fully meets the official compatibility requirements. However, the execution of `gpucoderSetup` failed.
Compatible GPU : PASSED
CUDA Environment : PASSED
Runtime : PASSED
cuFFT : PASSED
cuSOLVER : PASSED
cuBLAS : PASSED
Host Compiler : PASSED
Basic Code Generation : FAILED (GPU code generation failed with an error. View report for further information: View report)
  2 comentarios
yifan
yifan el 31 de Oct. de 2025
plus, i can compile the mexGPUExample.cu file by mexcuda mexGPUExample.cu without error
Abhipsa
Abhipsa el 3 de Nov. de 2025
Hi @yifan, It looks like your CUDA and compiler setup are fine since mexcuda works — the failure in gpucoderSetup usually comes from GPU Coder using a slightly different toolchain.
You can try:
mex -setup C++
mex -setup C++ -client coder
coder.checkGpuInstall('full')
to confirm both MATLAB and GPU Coder are using the same Visual Studio compiler.

Iniciar sesión para comentar.

Respuestas (1)

yifan
yifan el 12 de Nov. de 2025
I have identified the cause of the issue: cl was not added to the system's environment path.
I add the following path to environment path:
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\bin\Hostx64\x64
C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE

Categorías

Más información sobre Get Started with GPU Coder en Help Center y File Exchange.

Productos


Versión

R2025b

Community Treasure Hunt

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

Start Hunting!

Translated by