dpctl.program.create_kernel_bundle_from_spirv¶
- dpctl.program.create_kernel_bundle_from_spirv(q, IL, copts='')¶
Creates a Sycl interoperability kernel bundle from an SPIR-V binary.
We use the
DPCTLKernelBundle_CreateFromOCLSpirv()C API function to create asycl::kernel_bundle<sycl::bundle_state::executable>object from an compiled SPIR-V binary file.- Parameters:
q (
dpctl.SyclQueue) – Thedpctl.SyclQueuefor which theSyclKernelBundleis going to be built.IL (bytes) – SPIR-V binary IL file for an OpenCL program.
copts (str, optional) – Optional compilation flags that will be used when compiling the kernel bundle. Default:
"".
- Returns:
- kernel_bundle (
SyclKernelBundle) A
SyclKernelBundleobject wrapping thesycl::kernel_bundle<sycl::bundle_state::executable>returned by the C API.
- kernel_bundle (
- Raises:
SyclKernelBundleCompilationError – If a SYCL kernel bundle could not be created.