Skip to content

add ragged gather reduce v2#4460

Closed
NuojCheng wants to merge 1 commit into
mainfrom
chengnuojin-rgr-v2
Closed

add ragged gather reduce v2#4460
NuojCheng wants to merge 1 commit into
mainfrom
chengnuojin-rgr-v2

Conversation

@NuojCheng

@NuojCheng NuojCheng commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Description

Onboard the ragged_gather_reduce_v2 kernel to MaxText.

Performance Evaluation

Synthetic Data (Random Routing, EP=8)

  • Before: xids/271201875 | xprof
  • After: xids/271194893 | xprof

Observations:

  • Step time improved, dropping from 14.24s to 13.17s.
  • Unsort kernel time per layer dropped significantly from 13.97ms to 4.9ms.
  • Sort kernel time remained unchanged.

Real Data (Without Random Routing, EP=4)

  • Before: xids/271240396 | xprof
  • After: xids/271240858 | xprof

Observations:

  • Step time improved slightly, dropping from 17.8s to 17.5s.
  • Unsort kernel time remained unchanged.

Tests

  • Convergence: Tested in xids/271420711. The loss decreases normally.

Checklist

Before submitting this PR, please make sure (put X in square brackets):

  • I have performed a self-review of my code. For an optional AI review, add the gemini-review label.
  • I have necessary comments in my code, particularly in hard-to-understand areas.
  • I have run end-to-end tests and provided workload links above if applicable.
  • I have made or will make corresponding changes to the doc if needed, including adding new documentation pages to the relevant Table of Contents (toctree directive) as explained in our documentation.

@NuojCheng NuojCheng force-pushed the chengnuojin-rgr-v2 branch from add2f6c to 98cf071 Compare July 14, 2026 19:11
@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.75258% with 24 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
.../maxtext/kernels/ragged/ragged_gather_reduce_v2.py 91.72% 14 Missing and 10 partials ⚠️

📢 Thoughts on this report? Let us know!

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.

1 participant