dpctl.SyclPlatform

class dpctl.SyclPlatform(self, arg=None)

Python class representing sycl::platform class.

There are two ways of creating a SyclPlatform instance:

  • Invoking the constructor with no arguments creates a platform using the default selector.

Example:
import dpctl

# Create a SyclPlatform for default-selected device
pl = dpctl.SyclPlatform()
print(pl.name, pl.version)
  • Invoking the constructor with specific filter selector string that creates a queue for the device corresponding to the filter string.

Example:
import dpctl

# Create a SyclPlatform for device selected by
# filter-selector string
pl = dpctl.SyclPlatform("opencl:cpu")
print(pl.name, pl.version)

Methods

print_platform_info([verbosity])

Print information about the SYCL platform.

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.