Repository navigation
fix(dsv41): align prompt index blocks without a scratch copy - #8
sayyidfareed wants to merge 1 commit into
Conversation
|
Thank you @sayyidfareed — the zero-copy idea is elegant, and the alignment/coverage unit test is a nice touch. We took #4 for this (now merged): it was verified on the served lane against the actual failing prompt lengths and co-verified with the 512/513 kit fix, and it leaves the block schedule untouched. Your approach is a fine trade — it just changes the block geometry by a row, and in maintenance mode we're carrying one fix per problem, not two. Leaving this open as the clean alternative; if a maintainer ever wants the no-scratch version for the same view in the tp4 engine, this is the starting point. Thanks for the honest receipt, including the direct-IO failure you reproduced (now fixed in #9). |
|
Length sweep with the rb alignment fix — passes to 364K, exactness verified Context note: I see #4 has since been merged for this. The numbers below are on this PR's form (the round-down / stride form), kept here as corroborating evidence for the same view; happy to re-run against whichever form ships. Ran the rb round-down fix (this PR's form, implemented independently at prompt.zig:941 before we found this PR) on the recipe's 2× GB10 TP2 lane, engine at 5e10970, kit v0.6.1 whose aot.json sha256 (092b6d27…) byte-matches the kit named in #4's evidence — so these numbers are comparable with that thread's. Serve configuration, stated for reproducibility: Single stream, greedy, temperature 0, 8-token completions:
Which of the gates listed as unrun in this PR's description our evidence addresses — and which it does not:
Cross-references: #4 (merged — alternative fix; the kit-identity basis for comparability), recipe issue #15 / #14 (the missing-variant reports). |
What this changes
An odd multi-block indexer stride offsets VIS by 8 modulo 16 and can cause MissingTritonVariant on long prompts. Round only multi-block odd strides down to an even number, preserving single-block/even schedules and the memory bound. All rows remain covered.
This is an independently implemented alternative to #4, not a claim that the issue was unreported: #4 preserves block geometry by copying misaligned VIS into scratch space; this changes block geometry by at most one row and needs no scratch allocation/copy. Neither approach should be merged blindly on top of the other. Source-only comment/format cleanup separates this public revision from the deployed equivalent.
Receipt
4e80f05ecba89a4e90d16375ade2eddbdc0a10c4, Zig 0.17.0, Ubuntu 24.04.5 LTS, kernel 7.0.0-1019-nvidia, NVIDIA driver 580.178.04; Linux ARM64 CUDA environment; two NVIDIA GB10 nodes for historical live tests, SM121, Mia EXL3 2.9 bpw revision64ba41b6c916a587db06eae2e19b7845f7be6e6b, recipe v0.6.1 kit. Container ARM64 imagesha256:1ad8c1382c09861dee9c342b59f6e5e3e65fe7fde4a07b5e379bc985b66902dd.954fdb93c5869d0b155ccf2448066b4fe1682dc3; commandzig build test -j1 --summary allwith a shared Zig cache.zig fmt --checkpasses changed Zig files.test-goldenwas attempted on the pinned source but that step does not exist, despite CONTRIBUTING.md naming it.Checklist
Merge considerations
Two-way source revert. Preserve both ranks at the same source/runtime identity. This PR has not changed the default deployed upstream recipe.