Repository navigation
Implement kernels for median and paritition functions - #3138
Open
ndgrigorian wants to merge 4 commits into
Open
ndgrigorian wants to merge 4 commits into
ndgrigorian wants to merge 4 commits into
Conversation
Contributor
|
View rendered docs @ https://intelpython.github.io/dpnp/pull/3138/index.html |
Contributor
|
Array API standard conformance tests for dpnp=0.22.0dev0=np2py314h8d9cdd5_27 ran successfully. |
ndgrigorian
force-pushed
the
feature/implement-median-partition-fns
branch
2 times, most recently
from
November 2, 2026 06:38
0f57805 to
8667696
Compare
ndgrigorian
force-pushed
the
feature/refactor-dpnp-backend-to-libtensor
branch
from
November 2, 2026 15:06
e24ca7b to
2df1e76
Compare
ndgrigorian
force-pushed
the
feature/implement-median-partition-fns
branch
from
November 2, 2026 15:07
8667696 to
58ce933
Compare
ndgrigorian
marked this pull request as ready for review
November 2, 2026 16:00
ndgrigorian
requested review from
antonwolfy and
vlad-perevezentsev
as code owners
November 2, 2026 16:00
Collaborator
ndgrigorian
force-pushed
the
feature/refactor-dpnp-backend-to-libtensor
branch
2 times, most recently
from
November 2, 2026 21:41
236c2e1 to
43ca63d
Compare
ndgrigorian
force-pushed
the
feature/implement-median-partition-fns
branch
from
November 2, 2026 22:19
58ce933 to
89cc1d4
Compare
Base automatically changed from
feature/refactor-dpnp-backend-to-libtensor
to
master
November 3, 2026 16:31
ndgrigorian
force-pushed
the
feature/implement-median-partition-fns
branch
from
November 3, 2026 20:40
89cc1d4 to
bb19ca4
Compare
partition.cpp is a dpnp source, built with the coverage flags, but gen_coverage.py treated _tensor_sorting_impl as libtensor-only and left it out of the default report. List it first in the module like the other dpnp sources, so the linker keeps its instrumented copies of shared inline functions.
The device coverage counters of partition.cpp and median.cpp reach the sort and top_k kernels through the shared inline helpers, about 500 device globals per kernel image. Their init events make the OpenCL CPU runtime use a freed command, so the coverage tests segfaulted at random in top_k, sort and unique_all.
With n=1 the signed-zero row was all NaN, so NumPy and dpnp warned. test_all_nan_rows covers that case.
ndgrigorian
force-pushed
the
feature/implement-median-partition-fns
branch
from
November 3, 2026 22:08
74de517 to
c7864b9
Compare
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 proposes the addition of updates to radix selection algorithms to generalize for cases of
medianandpartitionrelated functions, which allows the removal ofdpnp_partition_cfrom the DPNP backendThe median and partition functions can pass through either a sorting or a radix selection path, based on input types (and in the case of partition, always when
kthis multiple elements)Supersedes #2423