Why `gpucoder.profile` example failed?

2 visualizaciones (últimos 30 días)
wei zhang
wei zhang el 31 de Mayo de 2021
Comentada: wei zhang el 22 de Jun. de 2021
I am trying to profile the gpu code. At first, I tried the example in gpucoder.profile. But it always gives an error with something of SIL ServerPort as below. My gpu device is NVIDIA GeForce RTX 2060 SUPER. The host system is windows10 64bits. My Matlab version is 2021a. What's wrong with my gpu device? Could anyone give me some suggestions?
At first, build a gpu_fftn function file in the current directory.
function [Y] = gpu_fftn(X)
coder.gpu.kernelfun();
Y = fftn(X);
end
Then ran the commands below in Matlab prompts window.
cfg = coder.gpuConfig('exe');
cfg.GpuConfig.MallocMode = 'discrete';
gpucoder.profile('gpu_fftn',{rand(2,4500,4)},'CodegenConfig',cfg, ...
'CodegenArguments','-d profilingdir','Threshold',0.001);
The error came in several minutes.
### Starting SIL execution for 'gpu_fftn'
To terminate execution: clear gpu_fftn_sil
UnknownServerPort_Diagnostics - 0
UnknownServerPort_Diagnostics - 1
UnknownServerPort_Diagnostics - 2
Error using gpucoder.profile (line 41)
Could not parse server port number from application output:
To manually test launching the executable run the command line:
C:\Users\psylab706\Documents\MATLAB\ZW\GPU\coder\profilingdir\sil\gpu_fftn.exe -port 0
-blocking 1.
gpuDevice
>> gpuDevice
ans =
CUDADevice with properties:
Name: 'GeForce RTX 2060 SUPER'
Index: 1
ComputeCapability: '7.5'
SupportsDouble: 1
DriverVersion: 11.3000
ToolkitVersion: 11
MaxThreadsPerBlock: 1024
MaxShmemPerBlock: 49152
MaxThreadBlockSize: [1024 1024 64]
MaxGridSize: [2.1475e+09 65535 65535]
SIMDWidth: 32
TotalMemory: 8.5899e+09
AvailableMemory: 7.3862e+09
MultiprocessorCount: 34
ClockRateKHz: 1650000
ComputeMode: 'Default'
GPUOverlapsTransfers: 1
KernelExecutionTimeout: 1
CanMapHostMemory: 1
DeviceSupported: 1
DeviceSelected: 1
checkGpuInstall
gpuEnvObj = coder.gpuEnvConfig;
gpuEnvObj.GpuId = 0; % the device number is 0, no other device
gpuEnvObj.BasicCodegen = 1;
gpuEnvObj.BasicCodeexec = 1;
results = coder.checkGpuInstall(gpuEnvObj);
result of checkGpuInstall:
Compatible GPU : PASSED
CUDA Environment : PASSED
Runtime : PASSED
cuFFT : PASSED
cuSOLVER : PASSED
cuBLAS : PASSED
Basic Code Generation : PASSED
Basic Code Execution : PASSED
results =
struct with fields:
gpu: 1
cuda: 1
cudnn: 0
tensorrt: 0
basiccodegen: 1
basiccodeexec: 1
deepcodegen: 0
deepcodeexec: 0
tensorrtdatatype: 0
profiling: 0
To enable GPU performance counters to be used by all users, I had set the options as Nvidia link.
My had update my nvidia driver to latest version.

Respuesta aceptada

wei zhang
wei zhang el 22 de Jun. de 2021
I should thank Matlab team first, especially Hu Halley and Erik. It is all about cupti library including as below.
setenv('PATH', [getenv('PATH') ';cudapath\extras\CUPTI\lib64']);

Más respuestas (0)

Categorías

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

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by