dpctl.lsplatform

dpctl.lsplatform(verbosity=0)

Prints out the list of available SYCL platforms, and optionally extra metadata about each platform.

The level of information printed out by the function can be controlled by the optional vebosity setting.

  • Verbosity level 0: Prints out the list of platforms and their names.

  • Verbosity level 1: Prints out the name, version, vendor, backend, number of devices for each platform.

  • Verbosity level 2: At the highest level of verbosity everything in the previous levels along with the name, version, and filter string for each device is printed.

At verbosity level 2 (highest level) the following output is generated.

Example:

On a system with an OpenCL CPU driver, OpenCL GPU driver, Level Zero GPU driver, running the command:

$ python -c "import dpctl; dpctl.lsplatform(verbosity=2)"

outputs

Sample output of lsplatform(verbosity=2)
Platform 0::
    Name        Intel(R) OpenCL
    Version     OpenCL 2.1 LINUX
    Vendor      Intel(R) Corporation
    Profile     FULL_PROFILE
    Backend     opencl
    Devices     1
        Device 0::
        Name            Intel(R) Core(TM) i7-9700 CPU @ 3.00GHz
        Driver version  2020.11.11.0.13_160000
        Device type     cpu
Platform 1::
    Name        Intel(R) OpenCL HD Graphics
    Version     OpenCL 3.0
    Vendor      Intel(R) Corporation
    Profile     FULL_PROFILE
    Backend     opencl
    Devices     1
        Device 0::
        Name            Intel(R) Graphics Gen9 [0x3e98]
        Driver version  20.47.18513
        Device type     gpu
Platform 2::
    Name        Intel(R) Level-Zero
    Version     1.0
    Vendor      Intel(R) Corporation
    Profile     FULL_PROFILE
    Backend     level_zero
    Devices     1
        Device 0::
        Name            Intel(R) Graphics Gen9 [0x3e98]
        Driver version  1.0.18513
        Device type     gpu
Parameters:

verbosity (Literal[0,1,2], optional) – The verbosity controls how much information is printed by the function. 0 is the lowest level set by default and 2 is the highest level to print the most verbose output. Default: 0.