Repository navigation
[Perf] Cache uniform ragged-verify layout for DSpark verify-all compact - #31434
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces performance optimizations in dspark_planner.py by caching uniform layouts under specific verification modes and utilizing pinned memory for asynchronous host-to-device transfers of verification lengths. The feedback suggests improving the caching logic to correctly handle cases where the layout is None to avoid repeated cache misses, and refining the device check to prevent unnecessary memory pinning when the target device is a CPU.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
/rerun-test test_basic_sanity_dspark.py test_ragged_verify.py test_dspark_scheduler.py test_dspark_sps_table.py |
|
Results for 🚀 🚀 |
Cross-reference from #31023: verify-all layout caching vs. the residual compact Graph faultThis PR is directly relevant to one half of the current DSpark stability investigation because it formalizes the distinction between: The original #31023 reproducer stressed the first path beyond the bs=1 blog trace: A later stronger reproducer used the second path: On the tested earlier development snapshot, the residual failure was an asynchronous illegal-memory access in target verification. A strong Graph-OFF control survived. Completed diagnostics did not find an actionable error in the covered host-visible metadata, explicit covered index bounds, translated Important version boundaryThose positive results were collected from a v0.5.14-series base environment importing A1 source Questions specific to this cacheFor the verify-all path, the source audit indicates each
Also, please confirm that this optimization is intentionally limited to Related: #31023, diagnostic Draft PR #31455, cross-TP planning fix #31195. |
Without an SPS table, DSpark compact mode degenerates to verify-all, but the planner still reruns the per-step budget/topk schedule and rebuilds a constant uniform layout every step, with host<->device round-trips that act as per-step stream syncs. Serve a cached uniform layout keyed by (bs, tier) instead.
Validation: bs=1 dense-draft deployment in verify-all compact, decode forward occupancy 0.72 -> 0.90 (kernel-union).
CI States
Latest PR Test (Base): ❌ Run #29483474432
Latest PR Test (Extra): ❌ Run #29483474300