Main Content

gpuDeviceTable

Table of properties of GPU devices

    Description

    example

    tbl = gpuDeviceTable returns a table of properties of all GPU devices detected in your system. The table displays the value of the Index, 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 = gpuDeviceTable(props) 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 as AvailableMemory.

    Examples

    collapse all

    Use gpuDeviceTable to 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 index 1, has a higher compute capability than the device with index 2.

    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            "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 of props must be one of the properties returned by gpuDevice.

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

    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.

    Introduced in R2021a