Repository navigation
Commit 08e033f
authored
[executorch][muse] Fix the DFlash final-block draft counts test (#24050)
Stacked on #24047.
`CudaDFlashNative.FinalWholeBlockFitsExactlyAndPreservesAllPrefillRows`
has failed in `unittest-cuda-muse-glimmer-batching` since #24043. It
failed on that PR's own CI and on `main` at 8d9eec3:
```
cuda_dflash_native_test.cpp:612: Failure
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
through the dynamic draft before running the static draft. But
`run_target` drains 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:
- the prefill runs only dynamic draft forwards (at least one);
- the decode runs exactly one draft forward, and it is static.
Test plan:
- `clang-format` is clean on the changed lines.
- No local GPU, so the test relies on CI:
`unittest-cuda-muse-glimmer-batching` on this PR should pass.1 parent 82fbe45 commit 08e033f
1 file changed
Lines changed: 10 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
598 | 598 | | |
599 | 599 | | |
600 | 600 | | |
| 601 | + | |
601 | 602 | | |
602 | 603 | | |
603 | 604 | | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
604 | 610 | | |
605 | | - | |
606 | 611 | | |
607 | 612 | | |
608 | 613 | | |
609 | | - | |
610 | | - | |
611 | | - | |
612 | | - | |
613 | | - | |
614 | | - | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
615 | 618 | | |
616 | 619 | | |
617 | 620 | | |
| |||
0 commit comments