gpuinfo

PURPOSE ^

GPUINFO get basic details about the GPU being used

SYNOPSIS ^

function info = gpuinfo()

DESCRIPTION ^

GPUINFO  get basic details about the GPU being used

   GPUINFO() gets hold of some basic info about the GPU device being used.

   See also: CPUINFO

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function info = gpuinfo()
0002 %GPUINFO  get basic details about the GPU being used
0003 %
0004 %   GPUINFO() gets hold of some basic info about the GPU device being used.
0005 %
0006 %   See also: CPUINFO
0007 
0008 %   Copyright 2011-2012 The MathWorks, Inc.
0009 
0010 if parallel.gpu.GPUDevice.isAvailable()
0011     gpu = gpuDevice();
0012 info = struct( ...
0013     'Name', gpu.Name, ...
0014     'Clock', sprintf( '%u MHz', gpu.ClockRateKHz/1e3 ), ...
0015     'NumProcessors', gpu.MultiprocessorCount, ...
0016     'ComputeCapability', gpu.ComputeCapability, ...
0017     'TotalMemory', sprintf( '%1.2f GB', gpu.TotalMemory/2^30 ), ...
0018     'CUDAVersion', gpu.DriverVersion, ...
0019     'DriverVersion', parallel.internal.gpu.CUDADriverVersion );
0020 else
0021     % No GPU, so create an empty structure
0022 info = struct( ...
0023     'Name', '<no GPU available>', ...
0024     'Clock', '', ...
0025     'NumProcessors', 0, ...
0026     'ComputeCapability', '', ...
0027     'TotalMemory', 0, ...
0028     'CUDAVersion', '', ...
0029     'DriverVersion', '' );
0030 end
0031

Community support and wiki are available on Redmine. Last update: 18-Apr-2019.