perf(b12x): index exact declared PCIe collective plans - #791
voipmonitor wants to merge 1 commit into
Conversation
…ontract Bound lookup storage to declared shapes and avoid scans and exception construction when unsupported prefill shapes fall through to another transport. Preserve normalization weight identity, epsilon, strides and first-declaration precedence. Inspired by fernandaspets#2. Native suite: 36 passed including TP2 fused collective replay, one four-GPU case skipped. Serving throughput is not yet qualified. Co-authored-by: neolithic5452 <neolithic5452@users.noreply.github.com> Co-authored-by: Neo <fernandaspets@protonmail.com> Co-authored-by: OpenAI Codex <noreply@openai.com> Signed-off-by: Martin Vit <martin@voipmonitor.org>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughChangesB12X plan lookup
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Refactor Sequence Diagram(s)sequenceDiagram
participant B12xPcieAllReduce
participant PlanIndex
participant PlanLookupCaller
B12xPcieAllReduce->>PlanIndex: Index declared plans
PlanLookupCaller->>B12xPcieAllReduce: Request plan lookup
B12xPcieAllReduce->>PlanIndex: Query canonical plan key
PlanIndex-->>B12xPcieAllReduce: Return plan or no match
Suggested reviewers: Merge Risk: ⚪ Minimal · up to No concrete merge-blocking issue is established for the indexed lookup change. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
|
|
@coderabbitai review |
|
|
@coderabbitai full review |
✅ Action performedFull review finished. |
Purpose
Index the exact PCIe collective declarations at preparation time. Eager
prefill calls can then find a prepared plan, or decline the B12X transport,
without scanning every layer's declaration and constructing an exception.
GPU kernels, routing cutoffs and fallback transports are unchanged.
Inspired by fernandaspets/vllm_sm120#2.
Attribution to neolithic5452 and Neo is retained in the commit.
This implementation also preserves the complete existing lookup contract:
The index contains declared keys only. An unsupported shape does not create
a negative-cache entry, so varying request lengths cannot grow a process-wide
cache indefinitely. Direct calls to an undeclared native plan still raise;
normal transport admission still declines them.
No equivalent open LIL or upstream PR was found. The source PR's key omits
normalization identity/epsilon, so it cannot be adopted unchanged.
Validation
Status: qualified for the lookup contract, TP2/TP4 collective replay, and the
bounded serving comparison below. No general model-throughput gain is claimed.
tests/distributed/test_b12x_pcie_all_reduce.py: 36 passed, one four-GPUcase skipped on a two-GPU run. Includes real SM120 fused all-reduce replay.
The composed integration image passes all 45 tests in that file on four
SM120 GPUs, including TP2 fused and TP4 BF16 two-shot mutated graph replay.
The composition retains weak collective-owner lifetimes from fix(b12x): release replaced collective descriptor owners #783.
Tests distinguish equal-valued but different normalization tensors,
epsilon, dtype, shape and strides; verify first-match precedence, refresh,
undeclared rejection and bounded index size.
CPU-only metadata benchmark, same Python/runtime, 5 x 1,000 warmed calls:
Reproduce with
benchmarks/benchmark_b12x_plan_lookup.py --module-file PATH_TO_PINNED_COMMUNICATOR_SOURCE. These are Python lookup timings, notGPU kernel or model tok/s gains. The benchmark records source hashes and
all samples. Applicable pre-commit hooks pass.
Model-serving comparison
DeepSeek V4.1, stock RTX PRO 6000 Workstation GPUs 4–7, TP4/DCP1,
adaptive DSpark K7, RAM Engram, 4,096-token budget, temperature 1/top-p .95.
Three warmed 30-second context-zero runs per concurrency; one warmed uncached
32K prefill window. The immutable images differ only in the composed PCIe
communicator source; serving has no source-code mounts.
Five API checks and all six decode cells pass in each arm. C1 accepted length
is 2.443 versus 2.551; adaptive verification and stochastic output affect the
rates. C1 output ranges overlap (247.43–266.71 versus 250.35–263.18).
The negative verifier deltas are retained. These samples do not isolate an
end-to-end speedup or prove statistical equivalence; the qualified optimization
is bounded constant-time metadata lookup without changing transport selection.
Local image identities: scan
ec81e2005bac38c252329c3c2a6fbcd84188afaef7e54080332cd54359a67ef0,index
0c4b935622a16713bc56994a409b5cbec84dfd008561f7e2e2f4a4aa5b2ae3ba.Raw samples, exact runtime arguments, source identities and native checks.
AI-assisted implementation and validation. Human maintainer review is required.
Integration is restricted to beta during serving qualification; no JJ merge is
authorized by this work.