Compiling CUDA files with mexcuda in matlab2021b report error

조회 수: 15 (최근 30일)
zhou caiwei
zhou caiwei 2022년 8월 9일
댓글: Joss Knight 2022년 8월 20일
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
Joss Knight
Joss Knight 2022년 8월 20일
Can you run again with the -v option and post the output?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 MATLAB Compiler에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by