dpctl.compiler.SyclKernelBundle

class dpctl.compiler.SyclKernelBundle

Wraps a sycl::kernel_bundle<sycl::bundle_state::executable> object created using SYCL interoperability layer with underlying backends. Only the OpenCL and Level-Zero backends are currently supported.

SyclKernelBundle exposes the C API from dpctl_sycl_kernel_bundle_interface.h. A SyclKernelBundle can be created from an OpenCL C source string (create_kernel_bundle_from_source()), a SPIR-V binary file (create_kernel_bundle_from_spirv()), or a SYCL source string (create_kernel_bundle_from_sycl_source()).

Creation from SYCL source uses the DPC++ kernel_compiler extension, which requires both a compiler and a device that support it. Use is_sycl_source_compilation_available() to check for compiler support.

Methods

__init__()

addressof_ref()

Returns the address of the C API DPCTLSyclKernelBundleRef pointer as a long.

get_sycl_kernel(kernel_name)

has_sycl_kernel(kernel_name)