add multi_wave_cached rms norm#113
Merged
Merged
Conversation
…ection Add rms_norm_kernel_multi_wave_cached, a single-tile RMSNorm kernel that caches inputs in registers to avoid reloading from memory. Replace the boolean static_persistent parameter with a mode parameter for explicit kernel selection: - None: heuristic selection based on tensor shape (default) - "static_persistent": rms_norm_kernel_static_persistent - "multi_wave_reload": rms_norm_kernel_multi_wave_reload - "multi_wave_cached": rms_norm_kernel_multi_wave_cached Rename kernels for consistency: - rms_norm_kernel_gather -> rms_norm_kernel_multi_wave_reload - rms_norm_kernel_gather_regs_cached -> rms_norm_kernel_multi_wave_cached Update benchmark to compare all kernel modes side-by-side per dtype.
xjmxyt
reviewed
Apr 23, 2026
| DEVICE = triton.runtime.driver.active.get_active_torch_device() | ||
|
|
||
|
|
||
| def reference_rms_norm( |
Collaborator
There was a problem hiding this comment.
Should keep the same interface as src/tilegym/ops/ops.py
Collaborator
|
/ok to test 99c6f79 |
xjmxyt
approved these changes
Apr 29, 2026
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.
Add
rms_norm_kernel_multi_wave_cached, a single-tile RMSNorm kernel that caches inputs in registers to avoid reloading from memory.Replace the boolean
static_persistent parameterwith amodeparameter for explicit kernel selection:rms_norm_kernel_static_persistentrms_norm_kernel_multi_wave_reloadrms_norm_kernel_multi_wave_cachedRename kernels for consistency:
Update benchmark to compare all kernel modes side-by-side per dtype.
Performance on GB200 with M = 4096
Current
do_bench_cudagraphbased performance is not reliable see #82, so I doubled checked withtorch.profiler, see 3c8de12Description
CI Configuration
Checklist
./format.sh)