Compiling CUDA files with mexcuda in matlab2021b report error
Show older comments
I am trying to compile cuda files into mex(matlab 2021b)
mexcuda mexGPUExample.cu
The error occurs:
warning: The selected C++ compiler is not supported for CUDA compilation. Searching for a supported compiler.
> 位置:mexcuda (第 96 行)
错误使用 mex
未检测到支持的编译器。有关选项,请访问 https://www.mathworks.com/support/compilers。
出错 mexcuda (第 168 行)
[varargout{1:nargout}] = mex(mexArguments{:});
However , when I type:
mex -setup
I have tested the MinGW64 Compiler and it work properly
MEX Configured to use 'MinGW64 Compiler (C)' for C compilation.
要选择不同的语言,请从以下选项中选择一种命令:
mex -setup C++
mex -setup FORTRAN
here are my gpu configurations:
Name: 'NVIDIA GeForce RTX 3090'
Index: 1
ComputeCapability: '8.6'
SupportsDouble: 1
DriverVersion: 11.6000
ToolkitVersion: 11
MaxThreadsPerBlock: 1024
MaxShmemPerBlock: 49152
MaxThreadBlockSize: [1024 1024 64]
MaxGridSize: [2.1475e+09 65535 65535]
SIMDWidth: 32
TotalMemory: 2.5769e+10
AvailableMemory: 2.4283e+10
MultiprocessorCount: 82
ClockRateKHz: 1695000
ComputeMode: 'Default'
GPUOverlapsTransfers: 1
KernelExecutionTimeout: 1
CanMapHostMemory: 1
DeviceSupported: 1
DeviceAvailable: 1
DeviceSelected: 1
Answers (1)
Walter Roberson
on 9 Aug 2022
0 votes
In the column for GPU Coder, notice that MinGW is not supported. You need VS 2019 or VS 2017
4 Comments
zhou caiwei
on 9 Aug 2022
Edited: zhou caiwei
on 9 Aug 2022
Joss Knight
on 11 Aug 2022
Edited: Joss Knight
on 11 Aug 2022
Did you change the default compiler to VS using mex -setup?
zhou caiwei
on 15 Aug 2022
Joss Knight
on 20 Aug 2022
Can you run again with the -v option and post the output?
Categories
Find more on Deep Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!