Hi all,
I am using Matlab for GPU computing (single precision). To do so, I use a .ptx file compiled from a .cu file with nvcc. It is working well for reasonable problem sizes but errors occur when I am increasing the problem size. I will show a set of Matlab command displays describing my issue :
Here is my device properties obtained by ‘gpuDevice’ function :
gpu =
CUDADevice with properties:
Name: 'Tesla K80'
Index: 2
ComputeCapability: '3.7'
SupportsDouble: 1
DriverVersion: 7.5000
ToolkitVersion: 5.5000
MaxThreadsPerBlock: 1024
MaxShmemPerBlock: 49152
MaxThreadBlockSize: [1024 1024 64]
MaxGridSize: [2.1475e+09 65535 65535]
SIMDWidth: 32
TotalMemory: 1.2079e+10
FreeMemory: 1.1953e+10
MultiprocessorCount: 13
ClockRateKHz: 823500
ComputeMode: 'Default'
GPUOverlapsTransfers: 1
KernelExecutionTimeout: 0
CanMapHostMemory: 1
DeviceSupported: 1
DeviceSelected: 1
This is my kernel properies:
kernel =
CUDAKernel with properties:
ThreadBlockSize: [1024 1 1]
MaxThreadsPerBlock: 1024
GridSize: [12274 1 1]
SharedMemorySize: 0
EntryPoint: '_Z6kernelfffiPfS_S_iS_S_S_iS_S_S_iS_S_S_S_S_S_S_S_S_S_'
MaxNumLHSArguments: 19
NumRHSArguments: 26
ArgumentTypes: {1x26 cell}
And this is the returned errors:
Warning: An unexpected error occurred during CUDA execution. The CUDA error was:
CUDA_ERROR_UNKNOWN
...
Error using gpuArray/gather
An unexpected error occurred during CUDA execution. The CUDA error was:
CUDA_ERROR_UNKNOWN
Error in TOFcomputation_3media_FermatPrinc_GPU3 (line 89)
TOF_final = gather(g_tof);
Error in MAIN_..._3Dview (line 450)
[TOF_reco,RSU_final,samp_final] =
TOFcomputation_3media_FermatPrinc_GPU3(element_XYZ,RSU_XYZ,sample_XYZ,reco_XYZ,c1,c2,c3,precMode);
I guess it is only a size problem since it is working well with smaller GridSizes. But I do not understand because the max GridSize is 2.1475e+09 and my Grid size is only 12274…
Any idea would be appreciated !
Thanks!