feat(pcie_dma): add block-INT8 wire modes for AG, ring, and A2A#46
feat(pcie_dma): add block-INT8 wire modes for AG, ring, and A2A#46yatesdr wants to merge 2 commits into
Conversation
|
Warning Review limit reached
Next review available in: 35 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughAdds signed-INT8 PCIe DMA wire codecs, integrates ChangesINT8 PCIe DMA compression
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant PCIeDmaAllReduce
participant PythonExtension
participant CUDACodec
PCIeDmaAllReduce->>PythonExtension: select INT8 DMA entry points
PythonExtension->>CUDACodec: quantize BF16 payload
CUDACodec->>PythonExtension: return INT8 payload and scales
PythonExtension->>CUDACodec: dequantize, accumulate, or requantize
CUDACodec->>PCIeDmaAllReduce: materialize BF16 output
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 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 |
ea698b9 to
1bc4f1b
Compare
feat(pcie_dma): add block-INT8 wire modes for AG, ring, and A2ASummary
Adds an opt-in symmetric block-INT8 codec to the existing PCIe-DMA compressed
all-reduce paths:
i8: BF16 reduce-scatter + INT8 all-gatheri8_ring: INT8 reduce-scatter ring + INT8 all-gatheri8_a2a: quantize-once INT8 all-to-all + INT8 broadcastEach 128-value block uses 128 signed payload bytes and one FP32 scale
(
scale = amax / 127), so the wire and staging footprint is exactly the sameas the existing E4M3 codec: 132 bytes per block. The change is opt-in;
BF16 and all existing E4M3 modes retain their current routing and kernels.
This builds on the rank-consistency correction merged in #44. Owners
materialize their shard from the same final wire payload forwarded to peers in
all three INT8 topologies.
Why
On a GLM-5.2 TP4/DCP4 deployment, the rank-consistent E4M3 AG path recovered
needle retrieval through 200k but continued to fail reproducibly at 300k and
350k. Replacing only the one-byte E4M3 payload with symmetric block INT8, while
keeping the block size, FP32 scale, topology, staging allocation, and owner
materialization unchanged, restored deep retrieval:
All six INT8 passes returned the expected needle (
738216) withfinish_reason=stop.RestartCountremained zero throughout those retrievalruns. This isolates the residual quality loss to E4M3 representation rather
than transport topology, wire size, or rank divergence.
Implementation
BF16/E4M3 behavior.
mode, dtype, and aligned tensor shape.
workspace increase relative to E4M3.
INT8 modes.
the half-quantization-step error bound, and canonical-payload forwarding for
AG, ring, and A2A.
Accepted aliases include
int8,int8-ag,int8-ring, andint8-a2a; thecanonical mode names are
i8,i8_ring, andi8_a2a.Evidence and validation status
Completed:
All three modes passed four-rank bit-identity checks in eager and CUDA-graph
execution at rows 512 and 3072. Maximum absolute error versus BF16 was
0.01758 (
i8), 0.01953 (i8_ring), and 0.01563 (i8_a2a).Full-depth needle retrieval passed at 50k, 200k, 300k, 350k, and 475k for
every topology.
i8passed 300k and 350k 3/3. One non-monotonici8_a2amiss at 350k followed a 475k pass and cleared a 3/3 recheck.Cold prefill retained the E4M3 performance class:
i8i8_ringi8_a2aDecode throughput was topology-invariant, as expected because decode
messages remain below the 6.29 MiB DMA threshold:
i8i8_ringi8_a2aClean verified boots reported a 644,864-token KV pool for all three modes,
with no mode-correlated capacity change.
Dependency-free codec/topology proofs: 4/4 pass.
Python compile and CUDA binding/call-site structural checks pass.
git diff --checkpasses.i8_ringis the recommended PCIe mode on the tested no-NVLink topology: its1,641 tok/s at 50k matches E4M3 ring (1,639) while preserving deep retrieval.
One
i8_a2aperformance run encountered a downstreamCUBLAS_STATUS_INTERNAL_ERRORin a BF16 MLA projection during decode, wherethe PCIe-DMA path is inactive. A clean rerun completed. This is tracked as a
separate v19 concurrency issue and is not attributed to the INT8 codec or A2A
topology.
Files changed
b12x/distributed/pcie_dma.cub12x/distributed/pcie_dma.pytests/distributed/test_pcie_dma_gpu.pytests/distributed/test_pcie_dma_rank_consistency_gpu.pytests/distributed/test_pcie_dma_int8_codec.pySummary by CodeRabbit
New Features
i8,i8_ring, andi8_a2atransport modes alongside existing modes.Documentation
Tests