Main Content

gpuDeviceTable

Table of properties of GPU devices

    Description

    example

    tbl= gpuDeviceTablereturns a table of properties of all GPU devices detected in your system. The table displays the value of theIndex,Name,ComputeCapability,DeviceAvailable, andDeviceSelectedproperties of each GPU device detected in your system. Each row of the table contains the properties of a single GPU device.

    example

    tbl= gpuDeviceTable(props)returns a customized table of properties. Each element ofpropsmust be one of the properties returned bygpuDevice. Use this syntax to query and compare specific properties of the GPU devices in your system, such asAvailableMemory.

    Examples

    collapse all

    UsegpuDeviceTableto query and compare the properties of all GPUs in your system at a glance.

    tbl = gpuDeviceTable
    tbl = 2×5 table Index Name ComputeCapability DeviceAvailable DeviceSelected _____ _____________ _________________ _______________ ______________ 1 "TITAN RTX" "7.5" true true 2 "Quadro K620" "5.0" true false

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

    UsegpuDeviceTableto 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 "7.5" 2.577e+10 72 true 2 "5.0" 2.1475e+09 3 true

    Input Arguments

    collapse all

    GPU device properties, specified as a string array or a cell array of character vectors. Each element ofpropsmust be one of the properties returned bygpuDevice.

    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 oftblareIndex,Name,ComputeCapability,DeviceAvailable, andDeviceSelected. If you specify thepropsargument, then the output table contains only the specified properties.

    Version History

    Introduced in R2021a