dpctl.SyclPlatform

class dpctl.SyclPlatform(self, arg=None)

Python class representing sycl::platform class.

SyclPlatform() - create platform selected by sycl::default_selector SyclPlatform(filter_selector) - create platform selected by filter selector

Attributes:

backend

Returns the backend_type enum value for this platform

default_context

Returns the default platform context for this platform

name

Returns the name of the platform as a string

vendor

Returns the platform vendor name as a string.

version

Returns a backend-defined driver version as a string.

Public methods:

print_platform_info([verbosity])

Print information about the SYCL platform.

Attributes

SyclPlatform.backend

Returns the backend_type enum value for this platform

Returns:

The backend for the platform.

Return type:

backend_type

SyclPlatform.default_context

Returns the default platform context for this platform

Returns:

The default context for the platform.

Return type:

SyclContext

SyclPlatform.name

Returns the name of the platform as a string

SyclPlatform.vendor

Returns the platform vendor name as a string.

SyclPlatform.version

Returns a backend-defined driver version as a string.

Public methods

dpctl.SyclPlatform.print_platform_info(self, verbosity=0)

Print information about the SYCL 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.

Parameters:

verbosity (optional) – Defaults to 0. 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.