-
Notifications
You must be signed in to change notification settings - Fork 37
Move and deprecate dpctl program #2317
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ndgrigorian
wants to merge
7
commits into
feature/specialization-constants
Choose a base branch
from
move-and-deprecate-dpctl-program
base: feature/specialization-constants
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
3ccd0e4
deprecate dpctl program in favor of dpctl compiler
ndgrigorian 2c8b5a3
update docs to contain dpctl.compiler
ndgrigorian 99f007d
remove star import in dpctl.compiler
ndgrigorian d5ad068
move deprecated APIs into program submodule
ndgrigorian cadb8e5
_program.pyx to _compiler.pyx
ndgrigorian af0d7f8
remove program from CMake
ndgrigorian c82fa86
remove remaining references to dpctl.program
ndgrigorian File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| .. _dpctl_compiler_pyapi: | ||
|
|
||
| :py:mod:`dpctl.compiler` | ||
| ======================== | ||
|
|
||
| :py:mod:`dpctl.compiler` provides a way to create a SYCL kernel | ||
| from either an OpenCL* program source code represented as a string | ||
| or a SPIR-V binary file. | ||
|
|
||
| It implements creation of interoperability | ||
| ``sycl::kernel_bundle<sycl::bundle_state_executable>`` (a collection of kernels), | ||
| as well as creation of individual ``sycl::kernel``, suitable for submission for | ||
| execution via :py:meth:`dpctl.SyclQueue.submit`. | ||
|
|
||
| .. py:module:: dpctl.compiler | ||
|
|
||
| .. currentmodule:: dpctl.compiler | ||
|
|
||
| .. autosummary:: | ||
| :toctree: generated | ||
| :nosignatures: | ||
|
|
||
| create_kernel_bundle_from_source | ||
| create_kernel_bundle_from_spirv | ||
|
|
||
| .. autosummary:: | ||
| :toctree: generated | ||
| :nosignatures: | ||
|
|
||
| SyclKernelBundle | ||
| SyclKernel | ||
| SpecializationConstant | ||
|
|
||
| .. autosummary:: | ||
| :toctree: generated | ||
| :nosignatures: | ||
|
|
||
| SyclKernelBundleCompilationError | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -125,6 +125,7 @@ | |
| # add submodules | ||
| __all__ += [ | ||
| "memory", | ||
| "compiler", | ||
| "program", | ||
| "utils", | ||
| ] | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,6 @@ | ||
|
|
||
| file(GLOB _cython_sources *.pyx) | ||
| foreach(_cy_file ${_cython_sources}) | ||
| get_filename_component(_trgt ${_cy_file} NAME_WLE) | ||
| build_dpctl_ext(${_trgt} ${_cy_file} "dpctl/program" RELATIVE_PATH "..") | ||
| build_dpctl_ext(${_trgt} ${_cy_file} "dpctl/compiler" RELATIVE_PATH "..") | ||
| target_link_libraries(DpctlCAPI INTERFACE ${_trgt}_headers) | ||
| endforeach() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| # Data Parallel Control (dpctl) | ||
| # | ||
| # Copyright 2020-2025 Intel Corporation | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| # distutils: language = c++ | ||
| # cython: language_level=3 | ||
|
|
||
| """Declares the extension types and functions for the Cython API | ||
| implemented in dpctl.compiler._compiler.pyx. | ||
| """ | ||
|
|
||
|
|
||
| from dpctl.compiler._compiler cimport ( | ||
| SyclKernel, | ||
| SyclKernelBundle, | ||
| create_kernel_bundle_from_source, | ||
| create_kernel_bundle_from_spirv, | ||
| create_program_from_source, | ||
| create_program_from_spirv, | ||
|
Comment on lines
+30
to
+31
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These functions have been removed according to https://github.com/IntelPython/dpctl/pull/2317/changes#diff-a37c9a5fefbe1e0d6b42a2039127ab8e44233f8b67976d271e47cea5ce6fedbdL557 |
||
| ) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| # Data Parallel Control (dpctl) | ||
| # | ||
| # Copyright 2020-2025 Intel Corporation | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| """ | ||
| **Data Parallel Control Compiler** provides a way to create a SYCL kernel | ||
| from either an OpenCL program represented as a string or a SPIR-V binary | ||
| file. | ||
|
|
||
| """ | ||
|
|
||
| from dpctl.compiler._compiler import ( | ||
| SpecializationConstant, | ||
| SyclKernel, | ||
| SyclKernelBundle, | ||
| SyclKernelBundleCompilationError, | ||
| create_kernel_bundle_from_source, | ||
| create_kernel_bundle_from_spirv, | ||
| ) | ||
|
|
||
| __all__ = [ | ||
| "create_kernel_bundle_from_source", | ||
| "create_kernel_bundle_from_spirv", | ||
| "SyclKernel", | ||
| "SyclKernelBundle", | ||
| "SyclKernelBundleCompilationError", | ||
| "SpecializationConstant", | ||
| ] | ||
|
|
||
| # add submodules | ||
| __all__ += [ | ||
| "utils", | ||
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be
https://github.khronos.org/SYCL_Reference/iface/kernel-bundles.html#sycl-bundle-state-executable