Repository navigation
[executorch][muse] Fix the DFlash final-block draft counts test - #24050
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/24050
Note: Links to docs will display an error until the docs builds have been completed. This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
|
caf7d3a to
6e13047
Compare
6e13047 to
7d911c2
Compare
This PR needs a
|
CudaDFlashNative.FinalWholeBlockFitsExactlyAndPreservesAllPrefillRows has failed in unittest-cuda-muse-glimmer-batching since #24043 added draft forward count checks to it: Expected: (drained.draft_forwards - drain.draft_forwards) > (drained.static_draft_forwards - drain.static_draft_forwards), actual: 1 vs 1 The test expected the decode at position 78 to drain the 79 hidden rows dynamically before the static draft. But run_target drains every owner it touches right after appending hidden rows (#24042), so the 78-row prefill already drains down to the fresh context (32). The decode then holds at most one block of rows and takes a single static draft, and the dynamic forwards fall before the window the test measured. Measure from before the prefill instead: the prefill drains through dynamic drafts only, and the decode runs exactly one static draft.
7d911c2 to
03e2b91
Compare
…r warnings (#24052) Stacked on #24050. Every CUDA method load that binds FQN weights next to an off-graph KV cache printed one AOTI warning line per KV buffer: ``` [WARNING] Found constant or module state buffer or empty module state parameter __et_offgraph_kv_layer_0_k in model, but not provided by user! ``` The `unittest-cuda-muse-glimmer-batching` log contains 1672 of these lines, out of 11650 lines total. **Why it happens.** `CudaWeightCache::load` binds the weights with `validate_full_update=true` and intentionally leaves the off-graph KV buffers unbound, because the KV pool binds them later. AOTI's full-update check (`assert_all_constants`) allows absent buffers, but it writes a warning to stderr for each absent buffer on every load. **Fix.** - When the AOTI library exports `AOTInductorModelContainerGetConstantType` and `AOTInductorModelContainerGetConstantFromFolded`, ExecuTorch runs the same completeness rule itself. Folded constants, buffers, tensor constants, and empty parameters may be absent. Every other constant must be bound, otherwise `load` fails with `InvalidProgram`. - Binding then runs with `validate_full_update=false`. In AOTI that flag only gates `assert_all_constants`, so nothing else about binding changes. - If the library does not export those two APIs, `load` keeps `validate_full_update=true` as before. Test plan: - `g++ -fsyntax-only` on `cuda_weight_cache.cpp` and `cuda_backend.cpp` against the CUDA 12.6 headers. - CI: the CUDA unittest jobs and the muse-glimmer batching job should pass, and their logs should no longer contain the `__et_offgraph_kv_` warnings.
Récupère pytorch#24050 et pytorch#24137, qui réparent unittest-cuda-muse-glimmer-batching et test-muse-glimmer-cuda-e2e-kquant-17gb-solo-text-batching, rouges sur main à la base précédente de la PR (d1f7f1f). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Stacked on #24047.
CudaDFlashNative.FinalWholeBlockFitsExactlyAndPreservesAllPrefillRowshas failed inunittest-cuda-muse-glimmer-batchingsince #24043. It failed on that PR's own CI and onmainat 8d9eec3:The test expected the decode at position 78 to drain the 79 hidden rows through the dynamic draft before running the static draft. But
run_targetdrains every owner it touches right after it appends hidden rows (added in #24042). So the 78-row prefill already drains down to the fresh context (32 in this fixture). The decode then holds at most one block (16) of rows and runs a single static draft. The dynamic forwards happen during the prefill, before the stats snapshot the test took.This is a bug in the test's measurement window, not in the executor. The fix takes the first snapshot before the prefill and checks two things:
Test plan:
clang-formatis clean on the changed lines.unittest-cuda-muse-glimmer-batchingon this PR should pass.