dpctl.program.create_program_from_spirv(q, IL, copts='')

Creates a Sycl interoperability program from an SPIR-V binary.

We use the DPCTLKernelBundle_CreateFromOCLSpirv() C API function to create a sycl::kernel_bundle<sycl::bundle_state::executable> object from an compiled SPIR-V binary file.

  • q (dpctl.SyclQueue) – The dpctl.SyclQueue for which the SyclProgram is 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 program. Default: "".


program (SyclProgram)

A SyclProgram object wrapping the sycl::kernel_bundle<sycl::bundle_state::executable> returned by the C API.


SyclProgramCompilationError – If a SYCL kernel bundle could not be created.