Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: IntelPython/dpnp
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: bfad54b
Choose a base ref
...
head repository: IntelPython/dpnp
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: d838583
Choose a head ref
  • 4 commits
  • 12 files changed
  • 2 contributors

Commits on Nov 3, 2026

  1. Add a bitonic sorting network to libtensor's sorting

    Batcher's bitonic network joins the merge sort and the radix sort as the
    "bitonicsort" value of the `kind` keyword of `sort` and `argsort`.
    
    Rows are padded up to a power of two with a sentinel that the active
    comparator orders last, so the network runs on its natural size without
    constraining the input. A row that fits in local memory is sorted by a
    single kernel, with several short rows batched per work group; a longer
    row is sorted by a block sort in local memory followed by a global
    compare-exchange kernel per stride.
    
    The default `kind` now reaches for the network where it is expected to
    beat the algorithm it would otherwise pick. The rule reasons about the
    padded row length, since that is the work the network actually does, and
    takes the local memory capacity from the device rather than a constant.
    Its parameters were tuned on a sweep of row lengths, row counts and data
    types on one device: over that sweep it cuts the total sorting time to
    0.74 of the previous default, against 0.73 for an oracle that always
    picks the faster algorithm.
    
    Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
    ndgrigorian and claude committed Nov 3, 2026
    Configuration menu
    Copy the full SHA
    1c7c2b4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b08f32e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3b6be5d View commit details
    Browse the repository at this point in the history
  4. Keep the default stable sort stable for floating-point values

    The bitonic network may reorder values which compare as equal, which is
    observable for floating-point and complex values such as -0.0 and 0.0.
    When a stable sort is requested, by `stable=True` or `kind="stable"`,
    `sort` now reaches for the network by default only for boolean and
    integer data types. The argsort is unaffected, since its network breaks
    ties by index.
    ndgrigorian committed Nov 3, 2026
    Configuration menu
    Copy the full SHA
    d838583 View commit details
    Browse the repository at this point in the history
Loading