[TPU][Pallas] relax tolerances and fix Pallas autotuning OOM in layer_norm#2272
Draft
yarongmu-google wants to merge 1 commit into
Draft
[TPU][Pallas] relax tolerances and fix Pallas autotuning OOM in layer_norm#2272yarongmu-google wants to merge 1 commit into
yarongmu-google wants to merge 1 commit into
Conversation
Collaborator
yarongmu-google
commented
May 5, 2026
- Fixes bfloat16 accuracy validation: Relaxes the rtol and atol from 1e-3 to 1e-2 in examples/layer_norm.py to prevent spurious validation failures caused by bfloat16 precision variations on TPUs.
- Fixes VMEM Out-of-Memory during autotuning: The autotuner's default baseline config generation (block_sizes=[32, 128]) was attempting to allocate overly large chunks of the 10,240-element feature dimension into VMEM, causing the process to crash before tuning could even begin. Bypassed this by providing autotune_baseline_fn for both the forward and backward kernels.
- Adds a safe fallback config: Added config=helion.Config(block_sizes=[32, 1024]) to the backward pass kernel to ensure a memory-safe configuration is available even if the search space fails to converge.
…st failure on bfloat16
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.