gpuDeviceTable - Table of properties of GPU devices - MATLAB (original) (raw)

Table of properties of GPU devices

Since R2021a

Syntax

Description

[tbl](#mw%5F66ff4237-cb5c-4a7e-a2c2-f169ae2cc0e9) = gpuDeviceTable returns a table of properties of all GPU devices detected in your system. The table displays the value of theIndex, Name, ComputeCapability,DeviceAvailable, and DeviceSelected properties of each GPU device detected in your system. Each row of the table contains the properties of a single GPU device.

example

[tbl](#mw%5F66ff4237-cb5c-4a7e-a2c2-f169ae2cc0e9) = gpuDeviceTable([props](#mw%5Fd85aa3aa-9982-4c20-b584-ad35e0ef7a3c)) returns a customized table of properties. Each element of props must be one of the properties returned by gpuDevice. Use this syntax to query and compare specific properties of the GPU devices in your system, such asAvailableMemory.

example

Examples

collapse all

Use gpuDeviceTable to query and compare the properties of all GPUs in your system at a glance.

tbl =

2×5 table

Index           Name           ComputeCapability    DeviceAvailable    DeviceSelected
_____    __________________    _________________    _______________    ______________

  1      "NVIDIA RTX A5000"          "8.6"               true              true      
  2      "Quadro P620"               "6.1"               true              false       

Both devices are available for use in this MATLAB® session. The selected GPU device, with index 1, has a higher compute capability than the device with index 2.

Alternatively, you can determine how many GPU devices are available, inspect some of their properties, and select a device to use from the MATLAB® desktop. On theHome tab, in the Environment area, select > .

The Parallel menu, including the Select GPU Environment pane showing two GPU devices. A tick next to the first device indicates that it is the selected device.

Use gpuDeviceTable to query and compare the specific properties of all GPUs in your system.

Compare the compute capability, total memory, multiprocessor count, and availability of the GPU devices in your system.

tbl = gpuDeviceTable(["Index","ComputeCapability",... "TotalMemory","MultiprocessorCount","DeviceAvailable"])

tbl =

2×5 table

Index    ComputeCapability    TotalMemory    MultiprocessorCount    DeviceAvailable
_____    _________________    ___________    ___________________    _______________

  1            "8.6"          2.5553e+10             64                  true      
  2            "6.1"          2.1473e+09              4                  true      

Input Arguments

collapse all

GPU device properties, specified as a string array or a cell array of character vectors. Each element of props must be one of the properties returned by gpuDevice.

The variables of the output table are the properties specified byprops, in the same order as provided inprops.

Example: ["Name","ComputeCapability","AvailableMemory"]

Data Types: char | string | cell

Output Arguments

collapse all

Table of GPU device properties, returned as a table.

The default variables of tbl are Index,Name, ComputeCapability,DeviceAvailable, and DeviceSelected. If you specify the props argument, then the output table contains only the specified properties.

Extended Capabilities

Version History

Introduced in R2021a