Skip to content

Adding gather reduce sparse core kernel.#3573

Open
clee1994 wants to merge 1 commit intoAI-Hypercomputer:mainfrom
clee1994:gather_red
Open

Adding gather reduce sparse core kernel.#3573
clee1994 wants to merge 1 commit intoAI-Hypercomputer:mainfrom
clee1994:gather_red

Conversation

@clee1994
Copy link
Copy Markdown
Contributor

@clee1994 clee1994 commented Apr 4, 2026

PiperOrigin-RevId: 889292646

Description

This PR introduces a Sparse Core (SC) kernel for MoE gather-reduce operations and provides runtime configurability via centralized environment variables. It replaces the standard JAX-based indexing and reduction logic with a low-level MLIR-based SC kernel to improve end-to-end performance on TPU when handling large token batches (especially useful since it will free up the TensorCore).

Tests

added test for kernel

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 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.

PiperOrigin-RevId: 889292646
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants