Skip to content

Add --includes and --include-dir to dpnp CLI#2916

Open
vlad-perevezentsev wants to merge 7 commits into
masterfrom
add_dpnp_cli_options
Open

Add --includes and --include-dir to dpnp CLI#2916
vlad-perevezentsev wants to merge 7 commits into
masterfrom
add_dpnp_cli_options

Conversation

@vlad-perevezentsev
Copy link
Copy Markdown
Contributor

This PR adds --includes and --include-dir options to dpnp CLI (python -m dpnp)

These options return the path to dpnp/backend include directory containing dpnp4pybind11.hpp

  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to an issue with a reproducer?
  • Have you tested your changes locally for CPU and GPU devices?
  • Have you made sure that new changes do not introduce compiler warnings?
  • Have you checked performance impact of proposed changes?
  • Have you added documentation for your changes, if necessary?
  • Have you added your changes to the changelog?

@github-actions
Copy link
Copy Markdown
Contributor

View rendered docs @ https://intelpython.github.io/dpnp/pull/2916/index.html

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 15, 2026

Array API standard conformance tests for dpnp=0.21.0dev0=py313h509198e_55 ran successfully.
Passed: 1356
Failed: 4
Skipped: 16

@coveralls
Copy link
Copy Markdown
Collaborator

coveralls commented May 15, 2026

Coverage Status

coverage: 78.242%. remained the same — add_dpnp_cli_options into master

Copy link
Copy Markdown
Collaborator

@ndgrigorian ndgrigorian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Contributor

@antonwolfy antonwolfy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only concern is about documentation, but can be covered separately

Comment thread dpnp/__main__.py
Comment thread CHANGELOG.md
Comment thread dpnp/__main__.py Outdated
Comment thread doc/quick_start_guide.rst Outdated
Comment thread doc/quick_start_guide.rst

These options are useful when building pybind11 extensions that use
``dpnp4pybind11.hpp`` or libtensor kernel headers.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.so

Not sure if that works this way, based on docs/doc_sources/api_reference/dpctl_pybind11.rst from dpctl.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should at least get something to work and then add it as an example.

In theory, the above should work, we just need an extension to test with

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ndgrigorian @antonwolfy
I think it would be better to do this in PR that adds examples to dpnp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants