Repository navigation
feat: add NineToothed fused_add_rms_norm - #1014
Merged
Merged
Conversation
voltjia
force-pushed
the
feat/ninetoothed-fused-add-rms-norm
branch
23 times, most recently
from
October 29, 2026 22:11
cd25a15 to
9cd53bc
Compare
voltjia
force-pushed
the
feat/ninetoothed-fused-add-rms-norm
branch
from
October 30, 2026 05:19
9cd53bc to
2da8e95
Compare
fused_add_rms_norm
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
FusedAddRmsNormat implementation index 9.WITH_NINETOOTHEDin NVIDIA CI with pinned NineToothedbf8d7c42f86cf5feafe4a3ad443f1df151016886and ntops82cba6cfrevisions.emitters/ssa.py, while the proxy intermittently returned 401/403/522.Castas an automatic-default operator so strided inputs can fall back from native slot 0 to Torch slot 8.Motivation
The NineToothed row kernel is faster than the native CUDA implementation for the Qwen prefill residual-norm shape. This provides the reusable operator backend needed by InfiniLM without the temporary interposer used during the experiment.
InfiniOps' existing opt-in TuningManager can benchmark implementations and persist the selected index. A default-call validation with auto-tuning enabled benchmarked both implementations and selected index 9. Native InfiniLM runtimes need InfiniLM PR #605 to initialize this manager; Python bindings already initialize it on import.
Closes #.
Type of Change
feat— new feature / new operator / new platformfix— bug fixbuild/ci— build system or CI configurationPlatforms Affected
WITH_CPU)WITH_NVIDIA)WITH_ILUVATAR)WITH_METAX)WITH_CAMBRICON)WITH_MOORE)WITH_ASCEND)WITH_TORCH)Smoke Test Result
Test Results on Supported Platforms
WITH_NINETOOTHED=ONpassed; focused suite passed; full native/Torch/Flash/Marlin install build passed/usr/lib/x86_64-linux-gnu/libmusa.so.4is too shortSet up jobbefore checkout/buildFocused
FusedAddRmsNormsuite:Strided
Castsmoke previously selected native slot 0 and failed; slot 8 handles the case.kAutomaticDefaultrestores the supported-provider fallback path.Benchmark / Performance Impact
A100, CUDA graph-free CUDA-event benchmark,
(8192, 1024)bf16, 20 warmups and 100 timed launches:With
INFINI_OPS_ENABLE_AUTO_TUNING=1, the same default Python call benchmarked both active implementations and emitted:The resulting tuning cache recorded
best_implementation: 9; a subsequent trace selected implementation 9 without an explicit index.Notes for Reviewers
The kernel intentionally handles at most 1024 elements per row. Wider rows remain eligible for the native implementation; explicit index-9 tests skip those cases.