Repository navigation
perf(rdna2): batch expert copies and reduce cache planning overhead - #147
Merged
Merged
Conversation
Co-authored-by: Codex <noreply@openai.com> Signed-off-by: BlivionIaG <kev29lt@gmail.com>
…e-offload-improvements
Exercise 12- and 24-row split K2 with changing routes and capacity-three eviction passes for TP2/EP2 and TP4/EP4 geometry. Co-authored-by: Codex <noreply@openai.com> Signed-off-by: BlivionIaG <kev29lt@gmail.com>
Preserve the six persistent payload pools and cache fencing while submitting misses in one native call. Keep tensor copies as the default pending model-level qualification. Co-authored-by: Codex <noreply@openai.com> Signed-off-by: BlivionIaG <kev29lt@gmail.com>
Alternate quiescent backend switches in one server, reset prefix state before each cell and retain cache demand, miss and submission counters alongside performance results. Co-authored-by: Codex <noreply@openai.com> Signed-off-by: BlivionIaG <kev29lt@gmail.com>
Preserve both serving arms, quality gates and forced-output warnings. Gate 24 regressed both c8 cells; leave the default at 8. Record native copy and forced-fallback receipts without claiming a model speedup. Co-authored-by: Codex <noreply@openai.com> Signed-off-by: BlivionIaG <kev29lt@gmail.com>
Check readiness through worker RPC and require a successful prefix-reset acknowledgement before measuring requests. Existing long-probe defaults retain their initial client ready check. Co-authored-by: Codex <noreply@openai.com> Signed-off-by: BlivionIaG <kev29lt@gmail.com>
Keep strict transfer-counter requirements for KV-boundary qualification. Expert-copy A/B retains missing KV transfer counters as unavailable, while still requiring server metric boundaries and preemption accounting. Co-authored-by: Codex <noreply@openai.com> Signed-off-by: BlivionIaG <kev29lt@gmail.com>
Preserve 119 focused GPU test results, full-model native quality gates and per-rank pool/copy counters. Explicitly retain the failed client-hook receipt without claiming completed A/B performance. Co-authored-by: Codex <noreply@openai.com> Signed-off-by: BlivionIaG <kev29lt@gmail.com>
Reject the native long response at 810 of 1024 tokens after NaN logits. Preserve short observed results with cache/MTP caveats and isolated actual-copy distributions; keep native copies opt-in and qualification blocked. Co-authored-by: Codex <noreply@openai.com> Signed-off-by: BlivionIaG <kev29lt@gmail.com>
The isolated offload launcher accepted zero but still selected a connector without its required CPU byte budget. Omit both KV options at zero and preserve positive-budget flags. Dry-run zero/16 GiB checks and shell hooks passed. Co-authored-by: Codex <noreply@openai.com> Signed-off-by: BlivionIaG <kev29lt@gmail.com>
Reuse TP-wide async fail-stop for the shared model-offload arena, preserving resident routes and MTP fallback behavior. Read detailed local headers only on error. Add quiescent debug toggling and external-prefix counter receipts for joint expert/KV diagnosis. All 153 focused remote tests passed. Co-authored-by: Codex <noreply@openai.com> Signed-off-by: BlivionIaG <kev29lt@gmail.com>
Replace overflowing Q32 squared sums with fixed-order FP32 tile partials. Add opt-in device diagnostics and reject invalid accepted indices before state reads. Validate default recurrence/state repeatability and diagnostic graph replay on HIP GPU 7. Co-authored-by: Codex <noreply@openai.com> Signed-off-by: BlivionIaG <kev29lt@gmail.com>
Expose development-only collective, wait and off controls for post-step fault monitoring. Restrict the offload launcher to the current GPU 6–7 allocation and record current NaN investigation limits. Co-authored-by: Codex <noreply@openai.com> Signed-off-by: BlivionIaG <kev29lt@gmail.com>
Preserve completed KV-disabled and KV-enabled long-request diagnostic receipts. These passing controls do not establish the cause of the earlier failure because completion pacing changed. Co-authored-by: Codex <noreply@openai.com> Signed-off-by: BlivionIaG <kev29lt@gmail.com>
Record 58 exact-length requests and 40960 output tokens across copy backends and post-step guard modes, including long concurrency-8 tests. Greedy, perplexity, prefix reuse and post-load checks passed without numeric or GPU fault markers. Preserve the limit that the original serving NaN has not been causally attributed. Co-authored-by: Codex <noreply@openai.com> Signed-off-by: BlivionIaG <kev29lt@gmail.com>
…patch Use a persistent NumPy view of the same pinned int32 map, retaining the previous DMA completion fence and stable upload addresses. Extend real CT overflow/stream parity to both copy backends. The server CPU control-path benchmark reduces a ten-expert resident-hit pass from 83.4 to 37.7 us; 147 focused GPU tests pass. Co-authored-by: Codex <noreply@openai.com> Signed-off-by: BlivionIaG <kev29lt@gmail.com>
Reset connector-managed CPU prefixes as well as GPU prefixes before each measured arm. Reject warm or unavailable hit counters so retained CPU KV cannot masquerade as a copy-backend prefill speedup. Validate reset retry and fail-closed counter gates. Co-authored-by: Codex <noreply@openai.com> Signed-off-by: BlivionIaG <kev29lt@gmail.com>
…load pass Preserve cold-prefix ABBA metrics, exact-length and normal-EOS release gates, source hashes and reproduction scripts. All 147 focused host/GPU and 28 client tests pass; graph mode completes 72 requests and eager fallback completes both workloads without numeric/GPU faults. Keep tensor copies default and distinguish observed MTP-dependent throughput from causal CPU-control improvements. Co-authored-by: Codex <noreply@openai.com> Signed-off-by: BlivionIaG <kev29lt@gmail.com>
BlivionIaG
marked this pull request as ready for review
October 29, 2026 00:23
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.
Change
First bounded optimization pass after #146: submit missed experts' six persistent SoA payloads through one native C++ call, using HIP 7.14
hipMemcpyBatchAsyncwhen available and a native per-copy loop otherwise. Update the existing pinned int32 slot map through a persistent zero-copy NumPy view to remove scalar Tensor dispatch. Preserve payload addresses, pool budgets, LFU/LRU semantics, leases and consumer/DMA fences.Fix a reproducible GDN Q32 squared-sum overflow with fixed-order FP32 tile partials, without another kernel launch. Reject invalid accepted-state indices before reads, and extend the post-step fail-stop to the offloaded-expert workspace. Device diagnostics and quiescent inspection controls remain development-only.
Tensor copies remain the default. Enable the tested native path explicitly with
rocm_mono_decode.expert_cache_copy="native". Keep the K2 gate at 8; wide-kernel work belongs to #110. This follows the merged core in #146 and does not duplicate either PR. Prefetch, slot rebalancing and further profiling remain later passes in the roadmap.Validation
enforce_eager=True, graph mode NONE): greedy, PPL 4.84, prefix reuse, 48 normal-EOS concurrency checks with zero hard failures, exact-length 1k/512 and 16k/1k c1 workloads, and post-load greedy passed without numeric or new GPU fault markers.Reproduction:
GPU=7 bash tools/rdna/mono/test_offload.sh;.venv/bin/python -m pytest --noconftest tests/models/qwen4_exp/test_offload_long_probe.py; the exact graph/eager launch and load-hook scripts, raw results, pool/copy counters and source hashes are underbench_results/2026-10-29-moe-offload-first-pass/.Measured scope and limits
graph-performance-summary.txtand JSON.AI assistance was used. The change is limited to this first pass; the remaining optimization backlog is not a merge requirement for it.