[Pallas] Add fused_linear_jsd and grpo_loss to TPU benchmark sweep#2421
Merged
Conversation
Both kernels already pass test_examples.py on Pallas (no @xfailIfPallas) but were missing from benchmarks/run_tpu.py's KERNEL_MAPPINGS, so they weren't exercised by the full-coverage TPU sweep. This wires both into KERNEL_MAPPINGS with a baseline + shape generator: - fused_linear_jsd: bench fused_linear_jsd_kernel (JSD-only on logits) against a local PyTorch baseline. The example's autograd-wrapped fused_linear_jsd_fwd path uses jsd_kernel internally and fails Pallas accuracy check, so this PR covers only the test-passing JSD-only path. - grpo_loss: bench helion_grpo_loss against torch_grpo_loss from the example file. Logits cast to fp32 in the baseline to match the kernel's internal upcast. The backward kernel is xfailIfPallas, so this row covers forward only.
AmesingFlank
approved these changes
May 15, 2026
norx1991
added a commit
that referenced
this pull request
May 16, 2026
…ernel list Picks up the two kernels landed via #2421. The benchmark_dispatch workflow will now exercise all 27 KERNEL_MAPPINGS entries when this wrapper is triggered.
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.
Summary
fused_linear_jsdandgrpo_losstobenchmarks/run_tpu.py::KERNEL_MAPPINGSso they can be exercised by the full-coverage TPU sweep. The slim 9-kernel dashboard nightly is unchanged.Scope (what works on Pallas today)
fused_linear_jsd: benches the JSD-onlyfused_linear_jsd_kernel(the test-covered path) against a new PyTorch baseline defined inrun_tpu.pythat mirrors the JSD-only math. The example file'sfused_linear_jsd_pytorchdoes the full linear+JSD computation and takes inputs+weights, so it doesn't match the JSD-only kernel's logits-only signature.grpo_loss: bencheshelion_grpo_lossforward only, against the example's existingtorch_grpo_loss(with a small wrapper to upcast logits to fp32, matching the kernel's internal precision). The backward kernel is@xfailIfPallas("InductorLoweringError")intest_examples.py, so this row tracks only what works today.Autotune results (TPUv7, full effort)
fused_linear_jsdfused_linear_jsdgrpo_lossgrpo_loss