Repository navigation
Run dpnp.tensor tests in coverage workflow - #3094
Open
antonwolfy wants to merge 2 commits into
Open
antonwolfy wants to merge 2 commits into
antonwolfy wants to merge 2 commits into
Conversation
Run dpnp.tensor tests in a separate pytest session that appends to the coverage data of the main dpnp session, and merge the LLVM profiles of both sessions. Add --skip-tensor-tests option to keep the previous behavior, and --tensor-cpp-coverage option to build dpnp.tensor pybind11 extensions with coverage instrumentation and include them into C++ coverage. Raise coverage workflow timeouts to account for the extra session.
Contributor
|
View rendered docs @ https://intelpython.github.io/dpnp/pull/3094/index.html |
Contributor
|
Array API standard conformance tests for dpnp=0.21.0dev13=np2py314h8d9cdd5_7 ran successfully. |
Collaborator
antonwolfy
marked this pull request as ready for review
October 12, 2026 17:21
antonwolfy
requested review from
ndgrigorian and
vlad-perevezentsev
as code owners
October 12, 2026 17:21
This branch has not been deployed
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 extends the coverage workflow to also run
dpnp.tensortests, which are currently excluded bySKIP_TENSOR_TESTS=1.Because of that,
dpnp/tensorcode is measured only through what dpnp tests happen to reach, and some lines end up covered by chance.For example, line 809 of
dpnp/tensor/_elementwise_common.pyis reached deterministically only bydpnp/tests/tensor/elementwise/test_add.py::test_add_order. In the coverage run it is reached only byTestDotFor0Dimin the third-party tests, and only when the random dtype-pair sampling offor_all_dtypes_combinationhappens to include afloat32xint32/int64pair. The line is missed in about 1/3 of runs (251 of 744 Coveralls builds sincedpnp.tensorwas introduced in #2856), which shows up as ±0.003% coverage noise on PRs without any source changes.Note, enabling
--tensor-cpp-coveragein CI is left for a follow-up. It may also need-ignore-filename-regexrules forlibtensorkernel headers, similar to the existing ones forbackend/kernels.