Skip to content

feat: extend Python reducers with offset support (precursor to parent removal) - #3865

Merged
ianna merged 4 commits into
mainfrom
ianna/introduce_offsets_in_reducers
Feb 13, 2026
Merged

ianna merged 4 commits into
mainfrom
ianna/introduce_offsets_in_reducers

Conversation

@ianna

@ianna ianna commented Feb 11, 2026

Copy link
Copy Markdown
Member

This PR adds an offset parameter to the Python-layer reducer dispatch logic. This is the first step in moving toward offset-based kernels and away from the current parent tracking mechanism.

  • Added offset parameter to all Python reducer functions.
  • The offset is now propagated through the call stack alongside the existing parent parameter.
  • This is currently restricted to the Python dispatch logic; C++/CUDA kernels are not yet offset-aware.
  • Once kernels are updated, the parent parameter will be formally deprecated.

@maxymnaumchyk

@ianna ianna changed the title [feat] extend Python reducers with offset support (precursor to parent removal) feat: extend Python reducers with offset support (precursor to parent removal) Feb 11, 2026
@ianna ianna changed the title feat: extend Python reducers with offset support (precursor to parent removal) feat: extend Python reducers with offset support (precursor to parent removal) Feb 11, 2026
@codecov

codecov Bot commented Feb 11, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.16129% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.66%. Comparing base (12a7445) to head (82722a6).
⚠ïļ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/awkward/contents/unionarray.py 60.00% 2 Missing ⚠ïļ
src/awkward/contents/listoffsetarray.py 83.33% 1 Missing ⚠ïļ
Additional details and impacted files
Files with missing lines Coverage Δ
src/awkward/_connect/jax/reducers.py 93.87% <Ãļ> (Ãļ)
src/awkward/_do.py 84.70% <100.00%> (+0.55%) ⮆ïļ
src/awkward/_reducers.py 98.12% <100.00%> (Ãļ)
src/awkward/contents/bitmaskedarray.py 70.02% <100.00%> (Ãļ)
src/awkward/contents/bytemaskedarray.py 88.40% <100.00%> (Ãļ)
src/awkward/contents/content.py 77.12% <100.00%> (Ãļ)
src/awkward/contents/emptyarray.py 78.28% <100.00%> (Ãļ)
src/awkward/contents/indexedarray.py 85.09% <100.00%> (Ãļ)
src/awkward/contents/indexedoptionarray.py 89.65% <100.00%> (Ãļ)
src/awkward/contents/listarray.py 90.59% <100.00%> (Ãļ)
... and 6 more

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄ïļ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions

Copy link
Copy Markdown
Contributor

The documentation preview is ready to be viewed at http://preview.awkward-array.org.s3-website.us-east-1.amazonaws.com/PR3865

@ianna
ianna requested a review from maxymnaumchyk February 13, 2026 10:06

@maxymnaumchyk maxymnaumchyk left a comment

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.

Okay, looks like the kernels are unaffected. I just needed to regenerate the kernel signatures👍

@ianna
ianna merged commit 3ded3cc into main Feb 13, 2026
39 checks passed
@ianna
ianna deleted the ianna/introduce_offsets_in_reducers branch February 13, 2026 14:36
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.

2 participants