Compiling CUDA files with mexcuda in matlab2021b report error

8 次查看(过去 30 天)
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

回答(1 个)

Walter Roberson
Walter Roberson 2022-8-9
In the column for GPU Coder, notice that MinGW is not supported. You need VS 2019 or VS 2017
  4 个评论

请先登录,再进行评论。

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by