Repository navigation
cuda : pair floating routed gate/up projections - #124
Draft
GenerelSchwerz wants to merge 1 commit into
Draft
GenerelSchwerz wants to merge 1 commit into
GenerelSchwerz wants to merge 1 commit into
Conversation
Assisted-by: Codex
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.
Overview
Pair separate floating routed gate/up projections that share activation and expert IDs. One existing MMF launch addresses both weight banks, writes both original projection buffers, then runs the original GLU. Compact batches also share one route-map preparation. No weight repacking, extra projection storage, precision change or model-name rules.
Based solely on official upstream
dcd387a412ca54e172a8d60eb71ef6753850c8ca. Independent companion to #122, which handles quantized routed MMQ; this PR handles floating routed MMF. It does not depend on #117, #118, #119 or #123.Coverage
Sorted/cuBLAS routes, ragged/alignment-ineligible layouts, mixed bank types, forced F32 precision, packed producers, incompatible GLUs, intervening real operations, unsafe aliases, unsupported view ownership and concurrent streams retain upstream execution. Private allocators that bypass graph optimization still need their own dependency integration; this PR does not weaken ownership checks or add private cache/runtime behavior.
Validation and performance
RTX5070Ti, sm120, driver615.71.09, CUDA13.4.59, Release build with j18. Candidate CUDA library and sources were frozen; all other libraries match the frozen upstream control. Every suite held the shared build then GPU locks throughout. Small correctness jobs used at most2 workers; profiles, memory checks and timings ran serially.
First six cases:4 alternating pairs of1000 evaluations. K2560/T129:8 alternating pairs of10000 evaluations, replacing a shorter run with a startup outlier. Timings cover complete backend graph evaluation, including original GLU and routing preparation, rather than an isolated MMA instruction.
Two sorted control shapes were slower: M640/T513 by0.85% and M2048/T129 by0.56% over8 alternating10000-evaluation pairs. Small existing vector, packed and Q8 control timings were effectively flat in the shorter suite. This is a component optimization with a measured control-path cost, not a universal speedup.
No combined-series Flash Next speedup is established. Quantized Flash Next expert banks are covered by #122, while this path applies when the actual floating graph meets the contracts above.
Reproduction and raw source/build/output/profile bindings are preserved under
moe-cache-tests/results/upstream-kernel-series-20261001/FLOATING-EXPERT/FLOATING-ROUTED-20261003:SOURCE-FINAL-V4.json,BUILD-V7.json,EARLY-PROOF-V7.json,COMPILED-AUDIT-V7.json,BROAD-PROOF-V8.json,REMAINING-PROOF-V9.json,FOCUSED-TIMING-V1.json,MODEL-STEADY-V1.jsonandROOT-FINAL-AUDIT-V1.json. Suite JSON records contain exact commands, environment, lock scope and teardown. Historical scratch-prototype results are retained separately and are not used as final evidence.Requirements