Add --includes and --include-dir to dpnp CLI#2916
Open
vlad-perevezentsev wants to merge 5 commits into
Open
Conversation
7 tasks
Contributor
|
View rendered docs @ https://intelpython.github.io/dpnp/pull/2916/index.html |
Contributor
|
Array API standard conformance tests for dpnp=0.21.0dev0=py313h509198e_38 ran successfully. |
Collaborator
antonwolfy
approved these changes
May 18, 2026
Contributor
antonwolfy
left a comment
There was a problem hiding this comment.
The only concern is about documentation, but can be covered separately
antonwolfy
reviewed
May 18, 2026
|
|
||
| * Added C API functions for `dpnp.tensor.usm_ndarray` setters and getters to avoid ABI breakage if `dpnp.tensor.usm_ndarray` is modified [gh-2866](https://github.com/IntelPython/dpnp/pull/2866) | ||
| * Added `--includes` and `--include-dir` options to the `dpnp` CLI [#2916](https://github.com/IntelPython/dpnp/pull/2916) | ||
|
|
Contributor
There was a problem hiding this comment.
extra blank line
Suggested change
|
|
||
|
|
||
| def get_tensor_include_dir() -> str: | ||
| """Prints path to dpnp libtensor include directory""" |
Contributor
There was a problem hiding this comment.
Suggested change
| """Prints path to dpnp libtensor include directory""" | |
| """Returns path to dpnp libtensor include directory""" |
Comment on lines
+221
to
+222
| The ``python -m dpnp`` command provides options to query include paths | ||
| needed for building C++ extensions against dpnp: |
Contributor
There was a problem hiding this comment.
Suggested change
| The ``python -m dpnp`` command provides options to query include paths | |
| needed for building C++ extensions against dpnp: | |
| The ``python -m dpnp`` command provides options to query the include paths | |
| needed when building C++ extensions with dpnp: |
|
|
||
| These options are useful when building pybind11 extensions that use | ||
| ``dpnp4pybind11.hpp`` or libtensor kernel headers. | ||
|
|
Contributor
There was a problem hiding this comment.
might be helpful to add an examples:
For example, to compile a C++ extension using dpnp header using the Intel(R) oneAPI DPC++ compiler:
.. code-block:: bash
icpx -fsycl myextension.cpp $(python -m dpnp --includes) -o myextension.soNot sure if that works this way, based on docs/doc_sources/api_reference/dpctl_pybind11.rst from dpctl.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR adds
--includesand--include-diroptions todpnpCLI (python -m dpnp)These options return the path to
dpnp/backendinclude directory containingdpnp4pybind11.hpp