Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions docs/doc_sources/api_reference/dpctl/program.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,22 @@ execution via :py:meth:`dpctl.SyclQueue.submit`.

SyclKernelBundle
SyclKernel
SpecializationConstant

.. autosummary::
:toctree: generated
:nosignatures:

SyclKernelBundleCompilationError
Comment thread
ndgrigorian marked this conversation as resolved.

:py:mod:`dpctl.program.utils`
-----------------------------

.. py:module:: dpctl.program.utils

.. currentmodule:: dpctl.program.utils

.. autofunction:: parse_spirv_specializations

.. autoclass:: SpecializationConstantInfo
Comment thread
ndgrigorian marked this conversation as resolved.
:members:
8 changes: 7 additions & 1 deletion dpctl/_backend.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -431,12 +431,18 @@ cdef extern from "syclinterface/dpctl_sycl_context_interface.h":


cdef extern from "syclinterface/dpctl_sycl_kernel_bundle_interface.h":
ctypedef struct _spec_const "DPCTLSpecConst":
uint32_t id
size_t size
const void *value
cdef DPCTLSyclKernelBundleRef DPCTLKernelBundle_CreateFromSpirv(
const DPCTLSyclContextRef Ctx,
const DPCTLSyclDeviceRef Dev,
const void *IL,
size_t Length,
const char *CompileOpts)
const char *CompileOpts,
size_t NumSpecConsts,
const _spec_const *SpecConsts)
cdef DPCTLSyclKernelBundleRef DPCTLKernelBundle_CreateFromOCLSource(
const DPCTLSyclContextRef Ctx,
const DPCTLSyclDeviceRef Dev,
Expand Down
2 changes: 1 addition & 1 deletion dpctl/_sycl_platform.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ cdef class SyclPlatform(_SyclPlatform):
and filter string for each device is printed.
Args:
verbosity (Literal[0, 1, 2], optional):.
verbosity (Literal[0, 1, 2], optional):
The verbosity controls how much information is printed by the
function. Value ``0`` is the lowest level set by default and
``2`` is the highest level to print the most verbose output.
Expand Down
8 changes: 8 additions & 0 deletions dpctl/program/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
"""

from . import utils
from ._program import (
SpecializationConstant,
SyclKernel,
SyclKernelBundle,
SyclKernelBundleCompilationError,
Expand All @@ -41,6 +43,12 @@
"SyclKernelBundleCompilationError",
"SyclProgram",
"SyclProgramCompilationError",
"SpecializationConstant",
]

# add submodules
__all__ += [
"utils",
Comment thread
ndgrigorian marked this conversation as resolved.
]


Expand Down
5 changes: 4 additions & 1 deletion dpctl/program/_program.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ cpdef create_kernel_bundle_from_source (
SyclQueue q, unicode source, unicode copts=*
)
cpdef create_kernel_bundle_from_spirv (
SyclQueue q, const unsigned char[:] IL, unicode copts=*
SyclQueue q,
const unsigned char[:] IL,
unicode copts=*,
list specializations=*,
)
cpdef create_program_from_source (SyclQueue q, unicode source, unicode copts=*)
cpdef create_program_from_spirv (
Expand Down
Loading
Loading