Skip to content

fix(pcie): prevent two-slot selector overflow - #101

Closed
malaiwah wants to merge 5 commits into
local-inference-lab:masterfrom
malaiwah:fix/pcie-dcp-a2a-slot-overflow-20260730
Closed

fix(pcie): prevent two-slot selector overflow#101
malaiwah wants to merge 5 commits into
local-inference-lab:masterfrom
malaiwah:fix/pcie-dcp-a2a-slot-overflow-20260730

Conversation

@malaiwah

@malaiwah malaiwah commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Fix every reachable signed % 2 staging counter identified in #97, and make reusable one-shot/two-shot staging ownership advance on CUDA graph execution rather than host invocation.

Fixes #97.

Confirmed failure modes

The original DCP, one-shot, and two-shot host counters fed a signed pre-increment value to % 2. After signed overflow, -1 could index before the intended staging table.

A second capture defect applied to the reusable collectives: host slot selection runs once while a CUDA graph is captured, so every replay reused that recorded slab. Adjacent odd-operation replays could overwrite staging still consumed by a peer.

Change

  • DCP A2A uses a closed, bounded TwoSlotSelector for the independently mergeable overflow fix. PR fix(pcie): retire capture channel aliases #103 replaces this host selector with DCP execution-owned parity.
  • One-shot plain/fused all-reduce and two-shot reduce-scatter/all-gather pass both eager slabs into the CUDA path.
  • Each staging collective performs a launch-wide device rendezvous inside the existing collective kernel. Every block reads the stable generation before arriving; the last block resets the arrival count and publishes the next generation; every block selects the same slab from the pre-increment low bit.
  • Supported grids are bounded at 36 one-shot blocks and 64 two-shot blocks, below target Blackwell SM count, so the rendezvous is fully resident and cannot deadlock.
  • The selection remains correct when consecutive calls use different grid sizes, and CUDA graph replay re-executes it without adding a selector kernel launch.
  • Unsigned generation wraparound preserves 0, 1, 0, 1, ....
  • Registered/non-staging paths retain their prior behavior.

Invariants

  • Host invocation count is not staging ownership for reusable captured collectives.
  • Every rank executes the same collective sequence on the same stream.
  • The selected slab remains stable for every block in one launch.
  • IPC layout, numeric reduction, public APIs, and registered-buffer behavior remain unchanged.
  • No additional GPU launch is added to latency-sensitive entry points.

Verification

  • Focused local suite: 33 passed, 2 skipped. Skips are the opt-in live-GPU one-shot suites.
  • One-shot and two-shot CUDA extensions compiled and loaded from a fresh cache against the pulled r12 image environment.
  • Changed Python tests: Ruff format and lint pass.
  • Graph regressions inspect both local staging slabs and require adjacent odd replays to mutate exactly one alternating slot for plain all-reduce, fused RMSNorm, reduce-scatter, and all-gather.

Live multi-GPU execution is delegated to the separate field-test agent; no rental or production-GPU result is claimed here. Production was not rebuilt or restarted.

Review follow-up

  • b24d875: removed replay-frozen host selection from reusable collectives and added focused staging-observation regressions.
  • b518259: addressed the performance review by folding launch-global generation selection into each existing collective kernel; fused graph kernel count remains one.

Stack

PR #103 is stacked on this branch. Merge #101 first; #103 then removes the DCP-only host selector after migrating DCP to device execution parity.

Summary by CodeRabbit

  • Bug Fixes

    • Improved PCIe collective communication during CUDA graph capture and replay.
    • Ensured staging buffers alternate correctly across all-reduce, reduce-scatter, and all-gather operations.
    • Improved reliability for eager and fused communication paths, including repeated and odd-numbered graph replays.
  • Tests

    • Expanded coverage to verify buffer alternation, graph replay correctness, and long-running double-buffer behavior.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a42655ce-27e4-4d52-8c41-ffbdbaf150ef

📥 Commits

Reviewing files that changed from the base of the PR and between b518259 and 0959fe8.

📒 Files selected for processing (1)
  • tests/comm/test_pcie_oneshot_torture.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • tests/comm/test_pcie_oneshot_torture.py

📝 Walkthrough

Walkthrough

PCIe staging-slot selection now uses a constexpr host selector for DCP A2A and CUDA-side generation metadata for eager allreduce and two-shot collectives. Kernels receive both slot options. Graph and integration tests verify alternating device-selected slots.

Changes

PCIe staging-slot selection

Layer / File(s) Summary
Two-slot selector contract and validation
sparkinfer/comm/pcie/two_slot_selector.h, tests/comm/test_pcie_two_slot_selector.py
Defines constexpr 0/1 alternation with compile-time invariants and a long-running C++ validation test.
DCP A2A host selection
sparkinfer/comm/pcie/pcie_dcp_a2a.cu
Uses TwoSlotSelector for reduce-scatter and all-gather staging-slot selection.
Two-shot device selection and validation
sparkinfer/comm/pcie/pcie_twoshot.cu, tests/comm/test_pcie_twoshot.py
Adds signal generation metadata and device-side slot selection for both collectives. Graph tests verify alternating slots and outputs.
Eager allreduce device selection and validation
sparkinfer/comm/pcie/pcie_oneshot.cu, tests/comm/pcie_oneshot_fused_rmsnorm_gpu.py, tests/comm/pcie_oneshot_torture.py
Passes paired rank data to regular and fused kernels. Graph tests verify alternating eager-slot changes during replay.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant PCIeCollective
  participant SlotMetadata
  participant PCIeKernel
  PCIeCollective->>SlotMetadata: pass paired staging-slot metadata
  SlotMetadata->>PCIeKernel: select active slot
  PCIeKernel->>PCIeKernel: derive staging pointers and execute collective
Loading

Possibly related issues

Possibly related PRs

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR also changes one-shot and two-shot staging ownership, which [#97] explicitly identifies as out of scope. Remove the one-shot and two-shot changes, or link separate issues that explicitly authorize those staging-path modifications.
Docstring Coverage ⚠️ Warning Docstring coverage is 3.70% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the primary PCIe fix: preventing two-slot selector overflow.
Linked Issues check ✅ Passed The DCP A2A changes use bounded two-slot alternation, preserve the sequence, and keep public interfaces unchanged as required by [#97].
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@malaiwah

Copy link
Copy Markdown
Contributor Author

Post-push status:

  • commit 65ebe0d19b7e004d27141baad873bad24a477c92
  • base master@36cade0
  • GitHub: mergeable; CodeRabbit passed with no actionable comments
  • production glm52-turnkey-r13-325-prod on localhost/glm52-turnkey:r13-prod-v2: still Up ... (healthy)
  • in-container curl -fsS http://127.0.0.1:8000/health: success

Production was not rebuilt or restarted. No live-GPU result is claimed; the modified CUDA translation unit was compiled/loaded and its host-side behavior was exercised CPU-isolated.

@malaiwah malaiwah changed the title fix(pcie): prevent DCP staging slot overflow fix(pcie): prevent two-slot selector overflow Jul 30, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (3)
tests/comm/test_pcie_oneshot_fused_rmsnorm_gpu.py (1)

75-89: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Slot-probe and alternation helpers are copy-pasted across three test modules. tests/comm/test_pcie_twoshot.py introduced reusable _local_staging_words/_assert_alternating_slots; the oneshot tests re-implement the identical probe and inline the identical alternation assertions, so any future change to the slot contract must be edited in several places.

  • tests/comm/test_pcie_oneshot_fused_rmsnorm_gpu.py#L75-L89: move _local_eager_words into a shared test helper module and import it here.
  • tests/comm/test_pcie_oneshot_torture.py#L46-L60: delete the duplicate definition and import the shared helper.
  • tests/comm/test_pcie_oneshot_fused_rmsnorm_gpu.py#L214-L230: replace the inline changed_slots comprehension with the shared _assert_alternating_slots(snapshots) used by the twoshot test (and do the same at tests/comm/test_pcie_oneshot_torture.py Lines 130-141).
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/comm/test_pcie_oneshot_fused_rmsnorm_gpu.py` around lines 75 - 89, The
slot-probe and alternation logic is duplicated across the oneshot tests. Move
_local_eager_words into the shared helper module used by
tests/comm/test_pcie_twoshot.py and import it in
tests/comm/test_pcie_oneshot_fused_rmsnorm_gpu.py (75-89) and
tests/comm/test_pcie_oneshot_torture.py (46-60), deleting both local
definitions; replace the inline changed_slots assertions in
tests/comm/test_pcie_oneshot_fused_rmsnorm_gpu.py (214-230) and
tests/comm/test_pcie_oneshot_torture.py (130-141) with the shared
_assert_alternating_slots(snapshots) helper.
tests/comm/test_pcie_twoshot.py (1)

25-62: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Reuse the production layout math instead of re-deriving it.

pack_stride/scale_offset/scale_stride/slot_bytes/signal_bytes are recomputed here with a literal 256, duplicating PCIeTwoShotSP.from_exchange_group, which uses IPC_SLAB_ALIGNMENT and the same _align_up. If either the alignment constant or the slab layout changes, this probe silently reads the wrong offsets and the alternation assertions become vacuous. Import _align_up/IPC_SLAB_ALIGNMENT (or better, expose the computed offsets from the runtime) rather than mirroring the arithmetic.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/comm/test_pcie_twoshot.py` around lines 25 - 62, Update
_local_staging_words to reuse the production layout calculations and alignment
constant from PCIeTwoShotSP.from_exchange_group, importing _align_up and
IPC_SLAB_ALIGNMENT or using exposed runtime offsets instead of duplicating the
arithmetic and literal 256. Keep the probe’s source-offset and word-reading
behavior unchanged while ensuring it tracks runtime layout changes.
sparkinfer/comm/pcie/pcie_oneshot.cu (1)

187-204: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Selector primitives copy-pasted into both translation units, each with an avoidable SMEM hop. Both files define the same advance_staging_slot kernel (with a redundant blockIdx.x == 0 && threadIdx.x == 0 guard for a <<<1,1>>> launch) and the same thread-0-plus-__syncthreads() selection helper, even though active_staging_slot is a uniform, broadcast-cached load every thread can read directly. The shared two_slot_selector.h header — whose include was dropped from both files — is the natural home for this contract.

  • sparkinfer/comm/pcie/pcie_oneshot.cu#L187-L204: move advance_staging_slot and the slot-index accessor into the shared header, drop the redundant thread guard, and let select_rank_data read the slot per-thread and index options.slots[slot] without __shared__ RankData or the extra barrier.
  • sparkinfer/comm/pcie/pcie_twoshot.cu#L91-L107: delete the duplicated kernel/helper and reuse the shared header versions, keeping the by-value RankPtrs selection but without the SMEM staging copy.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@sparkinfer/comm/pcie/pcie_oneshot.cu` around lines 187 - 204, Consolidate the
duplicated staging-slot primitives into shared two_slot_selector.h: for
sparkinfer/comm/pcie/pcie_oneshot.cu lines 187-204, move advance_staging_slot
and the slot-index accessor there, remove the redundant launch guard, and make
select_rank_data read active_staging_slot per thread without shared-memory
staging or __syncthreads(); for sparkinfer/comm/pcie/pcie_twoshot.cu lines
91-107, delete the duplicate kernel/helper and reuse the header versions while
preserving by-value RankPtrs selection without the SMEM copy.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@sparkinfer/comm/pcie/pcie_oneshot.cu`:
- Around line 741-751: Remove the per-entry advance_staging_slot GPU launch from
the allreduce path in sparkinfer/comm/pcie/pcie_oneshot.cu at lines 741-751 and
fold the generation advance into pcie_allreduce_kernel. Apply the corresponding
staging-slot reuse or FP8-kernel integration in
sparkinfer/comm/pcie/pcie_oneshot.cu lines 836-843 and
sparkinfer/comm/pcie/pcie_twoshot.cu lines 346-354 and 362-367; if any separate
advance launch remains, add real-target GPU benchmarks covering the requested
allreduce sizes, fused RMSNorm configurations, and representative twoshot shard
shapes.

---

Nitpick comments:
In `@sparkinfer/comm/pcie/pcie_oneshot.cu`:
- Around line 187-204: Consolidate the duplicated staging-slot primitives into
shared two_slot_selector.h: for sparkinfer/comm/pcie/pcie_oneshot.cu lines
187-204, move advance_staging_slot and the slot-index accessor there, remove the
redundant launch guard, and make select_rank_data read active_staging_slot per
thread without shared-memory staging or __syncthreads(); for
sparkinfer/comm/pcie/pcie_twoshot.cu lines 91-107, delete the duplicate
kernel/helper and reuse the header versions while preserving by-value RankPtrs
selection without the SMEM copy.

In `@tests/comm/test_pcie_oneshot_fused_rmsnorm_gpu.py`:
- Around line 75-89: The slot-probe and alternation logic is duplicated across
the oneshot tests. Move _local_eager_words into the shared helper module used by
tests/comm/test_pcie_twoshot.py and import it in
tests/comm/test_pcie_oneshot_fused_rmsnorm_gpu.py (75-89) and
tests/comm/test_pcie_oneshot_torture.py (46-60), deleting both local
definitions; replace the inline changed_slots assertions in
tests/comm/test_pcie_oneshot_fused_rmsnorm_gpu.py (214-230) and
tests/comm/test_pcie_oneshot_torture.py (130-141) with the shared
_assert_alternating_slots(snapshots) helper.

In `@tests/comm/test_pcie_twoshot.py`:
- Around line 25-62: Update _local_staging_words to reuse the production layout
calculations and alignment constant from PCIeTwoShotSP.from_exchange_group,
importing _align_up and IPC_SLAB_ALIGNMENT or using exposed runtime offsets
instead of duplicating the arithmetic and literal 256. Keep the probe’s
source-offset and word-reading behavior unchanged while ensuring it tracks
runtime layout changes.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b4e9998b-822a-4328-ae92-43481f880178

📥 Commits

Reviewing files that changed from the base of the PR and between 1b9a37b and b24d875.

📒 Files selected for processing (5)
  • sparkinfer/comm/pcie/pcie_oneshot.cu
  • sparkinfer/comm/pcie/pcie_twoshot.cu
  • tests/comm/test_pcie_oneshot_fused_rmsnorm_gpu.py
  • tests/comm/test_pcie_oneshot_torture.py
  • tests/comm/test_pcie_twoshot.py

Comment thread sparkinfer/comm/pcie/pcie_oneshot.cu Outdated
@malaiwah

Copy link
Copy Markdown
Contributor Author

Final review update at b518259:

  • removed every standalone staging-selector GPU launch;
  • plain/fused one-shot and both two-shot kernels now select one launch-global slab internally at execution/replay time;
  • bounded resident grids make the rendezvous safe across variable launch sizes;
  • fused graph remains one kernel node.

Verification: 33 passed, 2 opt-in GPU skips; fresh-cache one-shot/two-shot CUDA compile+load; Ruff format/lint pass. Multi-GPU execution is owned by the separate field-test agent; no rental/production result is claimed here.

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

@malaiwah I will review the final changes at b518259.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@malaiwah

malaiwah commented Jul 31, 2026

Copy link
Copy Markdown
Contributor Author

Rental-machine validation — FAIL (strict safety review supersedes earlier PASS)

Public PR head: 0959fe807d366628380f41933244e3ccce0a8ae0
Repair runtime tested: cd9c2625dbb65adf5a775379e5022a60dfec0b6f
Host: Vast.ai, 4× RTX PRO 6000 Blackwell 96 GB, NODE/NUMA0
Driver/CUDA/PyTorch: 610.43.02 / runtime 13.2 (driver API 13.3) / 2.12.0+cu132

The earlier comment correctly fixed the scratch-reuse test oracle, but its PASS conclusion was too narrow. A subsequent strict synchronization/lifecycle review found P1 defects that the numerical smoke does not make safe:

  • PR fix(pcie): prevent two-slot selector overflow #101 still chooses the DCP staging slot on the host during capture, so adjacent replays bake one slab and a fast rank can overwrite data a slow peer still consumes.
  • DCP retains best-effort teardown that discards ownership after suppressed unmap/free failures.
  • one-shot/two-shot partial setup can free an export while another rank still maps it; GC can unmap pointers while asynchronous kernels still use them.
  • process-group ranks are sorted instead of preserving PyTorch group-rank order, misrouting handles/status for nonmonotonic groups.
  • fixed resident-grid barrier caps are not proved safe for smaller/MIG partitions.

The control-node repair did pass useful bounded evidence: cold/warm communication union, fresh first-use capture at 2/4 ranks, fused RMS at 2/4 ranks, 1,025 opposite-order and scratch-reuse graph replays, and two-shot correctness. A four-pair AB/BA benchmark (4 ranks, 200 warmups, 2,000 aligned samples/run, fresh build each run) found eager unchanged (-0.144 us, approximate 95% interval [-1.392,+1.104]) and a narrow plain-one-shot captured-graph cost of +1.273 us ([+0.194,+2.351], aggregate 99.081→100.353 us). This does not discharge the DCP/lifecycle defects.

Immutable evidence and chronology:

A collective setup/teardown + operation-wide DCP control-node replacement is being tested now. I am withholding any push to this PR until that candidate passes deterministic skew/variable-grid DCP2/DCP4 tests and independent review.

@malaiwah

Copy link
Copy Markdown
Contributor Author

Frozen replacement qualification — PASS (candidate only)

This is not a PASS for the current public #101 head
0959fe807d366628380f41933244e3ccce0a8ae0. It qualifies the frozen composed
replacement 31fa6a48116471ce423f0338047453ec1032c202 (base
b38a60ecd5cb026f05ec27fc96433c9eb5ed326e), which contains #101 and #103 plus
the subsequent collective-lifecycle repairs. It supersedes the unsafe repair
runtimes named in the prior FAIL review (cd9c2625, 45029f6f) and every
unqualified intermediate through 5b4d0d4; none of those heads should be
promoted.

Frozen source: 31fa6a48116471ce423f0338047453ec1032c202
on fork branch codex/pr101-103-safe-successor-31fa6a4 (published without
moving either rejected PR head); review is now isolated in draft successor
#105.

Host: Vast.ai 46335896, Ubuntu 24.04 / Linux 7.0, 4× RTX PRO 6000 Blackwell
96 GB, NODE/NUMA0. Driver 610.43.02; CUDA 13.2 runtime (13.3 driver API);
PyTorch 2.12.0+cu132. Fresh extension cache:
/workspace/field-review-tests/cache/sparkinfer-successor-31fa6a4-atomic.
The exact candidate worktree was clean.

Exact commands and results

With CUDA_VISIBLE_DEVICES=0,1,2,3, candidate PYTHONPATH, and the fresh
TORCH_EXTENSIONS_DIR above:

  • python -m pytest -q tests/comm239 passed, 21 skipped in 4.34 s.
  • SPARKINFER_RUN_PCIE_ONESHOT_OPPOSITE_ORDER=1 SPARKINFER_PCIE_OPPOSITE_EAGER_ITERS=128 SPARKINFER_PCIE_OPPOSITE_GRAPH_REPLAYS=1025 python -m pytest -q tests/comm/test_pcie_oneshot_opposite_order_gpu.py1 passed in 6.36 s.
  • SPARKINFER_RUN_PCIE_ONESHOT_TORTURE=1 SPARKINFER_PCIE_ONESHOT_TORTURE_WORLD_SIZE=4 SPARKINFER_PCIE_ONESHOT_TORTURE_EAGER_ITERS=64 SPARKINFER_PCIE_ONESHOT_TORTURE_GRAPH_REPLAYS=1025 SPARKINFER_PCIE_ONESHOT_TORTURE_MULTISTREAM_ITERS=64 python -m pytest -q tests/comm/test_pcie_oneshot_torture.py1 passed in 7.11 s.
  • SPARKINFER_RUN_PCIE_ONESHOT_RMS_TEST=1 SPARKINFER_PCIE_ONESHOT_RMS_WORLD_SIZE=4 python -m pytest -q tests/comm/test_pcie_oneshot_fused_rmsnorm_gpu.py1 passed in 5.71 s.
  • python -m torch.distributed.run --nproc-per-node=4 tests/comm/test_pcie_twoshot.py — correctness/capture/slot/teardown PASS. Measured Spark RS/AG was 3714.8/3767.3 µs versus NCCL BF16 1024.3/990.5 µs; this is correctness evidence, not a speed-win claim.

The decisive opposite-order gate collectively pre-prepared graph:a and
graph:b, then captured/replayed them in opposite rank-local order for 1,025
replays. No allocation occurred during capture; no Xid, hang, stale IPC handle,
rank-order mismatch, parity disagreement, or teardown failure was observed.
Independent source reviews approved the frozen collective/allocation contract.

Raw logs are retained on the active rental under
/workspace/field-review-tests/artifacts/:

  • spark-31fa6a4-opposite-order-dcp4-1025.log — SHA-256 0f323a71f6c67aa4c8657b354c7b74b8f3b27ae10e9c243c60976e6e16e781f4
  • spark-31fa6a4-oneshot-torture-dcp4-1025.log7fc2185c645cb28f1f298db4f44a81133205f9faa35c709d5ed8bcfda90cc024
  • spark-31fa6a4-fused-rms-dcp4.logc828329f966e26f5ad9df580ee03b5a97219b51956fea9dcad86030b29eaa318
  • spark-31fa6a4-twoshot-dcp4.log4a7500c5dc4cc8125175ad9f9572e2c3a1088ad907c5c56417439062cb1c7a03

Conclusion: the frozen replacement passes the live four-GPU gates relevant to
#101. The public PR must be replaced/updated to this reviewed lineage before
the PR itself can be called passing. Durable log archival is still pending.

@malaiwah

Copy link
Copy Markdown
Contributor Author

Superseding field result: the frozen semantic-channel successor is not yet
deployable
.

The focused four-rank eager/capture/torture and atomic vLLM/SparkInfer suites
all passed, but the first full GLM-5.2 startup gate found a contract the focused
tests missed. During determine_available_memory()'s uncaptured warm-up, a
compiled TP all-reduce requested vllm:eager:allreduce on a physical CUDA
stream that was already owned by the active vllm:target:profile semantic
scope. Its descriptor warm-ups run before CUDA itself reports the stream as
capturing, so SparkInfer did not apply its active-scope override, selected the
static eager channel, and correctly refused to alias the two channels:

RuntimeError: CUDA stream key ... is already bound to another logical PCIe oneshot channel

The engine failed before KV allocation/health, so there is no performance or
deployability claim for SparkInfer 31fa6a4 + vLLM be1e289. The SHA-only
appliance image containing them will not be promoted.

The complete call trace makes the repair direction deliberately narrow:

  1. while a semantic capture scope is active, route a pre-capture warm-up on
    that scope's owner stream to its top logical channel;
  2. do not extend that routing to unrelated side streams, and retain hard
    failures for genuine out-of-scope stream/channel mismatches;
  3. apply the rule symmetrically to one-shot and DCP pools; and
  4. make failure-path teardown idempotent when Torch has already removed the
    process group from the world-group map.

Re-qualification will include the same full-model boot/traffic/shutdown gate,
not just focused tests.

Complete immutable server log and analysis:

@malaiwah

Copy link
Copy Markdown
Contributor Author

Closing as superseded, not merged. Public head 0959fe8 remains rejected for standalone promotion. The reviewed replacement is #105 at bc62980, paired atomically with field vLLM f99e1e7b8636ca3811ab6d23084ac6da63420dc3 and its patch-identical clean upstream PR local-inference-lab/vllm#216. The final corrected pair passed the complete GLM gate; evidence and exact reproduction contract: https://github.com/malaiwah/glm52-exl3-vast/blob/5c76a2536e7fc9a5f1cb6bf182531889f5385e65/docs/field-review-results/2026-07-30-vast-46335896/UPSTREAM-REPAIR-CAMPAIGN.md and https://github.com/malaiwah/glm52-exl3-vast/blob/5c76a2536e7fc9a5f1cb6bf182531889f5385e65/docs/field-review-results/2026-07-30-vast-46335896/COUNTER-VALIDATION.md. Do not cherry-pick #101 alone and call it equivalent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant