Repository navigation
comm: pin the RDMA pair proxy to the fastest core; post the chained flag WRITE inline - #270
Merged
Merged
Conversation
…IN=0 opts out) The proxy thread spins serving every pair channel, and unpinned the scheduler moves it between GB10's big (3.9 GHz) and little (2.8 GHz) cores; every hop of a decode all-reduce waits on it. It now pins itself to the allowed core with the highest cpuinfo_max_freq (the last of equals), best effort: if the cores cannot be read or set it logs and runs unpinned. Ported from the SparkQwen 0.4.0 engine (proxy.rs pin_proxy), in its own verbs-free module so the core choice runs in host tests. Co-Authored-By: Claude Opus 5.5 <[email protected]>
rs_post_write_flag (ATLAS_RDMA_PAIR_CHAIN=1: the RDMA pair's legacy and one-shot channels) posted the data WRITE and the 8-byte flag WRITE as one two-WR chain. The flag now goes as a second post with IBV_SEND_INLINE: a single inline WQE reaches the NIC by BlueFlame instead of a doorbell and a WQE fetch, about 2 us less per one-shot at decode sizes. Same QP, so the responder still places the flag after the data; the flag's value is read at post time, after the callers write it. QPs now request 16 bytes of inline data. Ported from the SparkQwen 0.4.0 engine (rdma_shim.c). Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Part of #220.
What
Two changes to the RDMA pair from SparkQwen's engine. Both shipped inside its release squash f4d95a1; only these hunks are ported.
atlas-rdma-pairproxy thread pins itself to the core with the highestcpuinfo_max_freqin its affinity mask (on GB10, an X925 big core).ATLAS_RDMA_PROXY_PIN=0opts out; on by default, as in production.rdma_pair/pin.rs) over a sysfs root, so it is host-testable.ATLAS_RDMA_PAIR_CHAIN=1, the pair-chain flag WRITE is its own post,IBV_SEND_SIGNALED | IBV_SEND_INLINE, withmax_inline_data = 16.Why
Each one-shot all-reduce hop pays for the proxy's wake-up and for the flag's separate DMA read. The expected gain (not separately measured here) is microseconds per all-reduce from pinning, and about 2 µs per one-shot hop from the inline flag. TP2 decode does two all-reduces per layer.
Benchmarks
Fingerprint (every number below). ennspark03/04, two GB10s at TP=EP=2 over RoCE, 2026-10-29. Checkpoint
nvidia/Qwen3.8-Flash-Next-FP4-Local. Served by the SparkQwen launcher, profile8x32k(--speculative --num-drafts=7 --max-num-seqs=8 --max-seq-len=32768 --max-prefill-tokens=16384 --kv-cache-dtype=bf16 --gpu-memory-utilization=0.88 --enable-prefix-caching), Strict and Spark modes.Baseline: SparkQwen 0.4.0, engine
Enntity/atlas9b25f57, imageatlas-sparkqwen:3e0d9e7e4b29.Candidate:
Enntity/atlasenntity-stack/sq-integcf4200e = Atlas-Inf main a12bffa plus this PR series, imageatlas-sparkqwen:cc103bd6cc92.Harness: SparkQwen
bench/sq_bench.py: streamed, temperature 0,reasoning_effortlow; decode = 384-token prose/code/JSON, 3 reps; cold TTFT at 2K/8K/16K/28K, 2 reps; aggregate decode at C1–C8, 256 tokens per stream, 2 reps; warm 8K/20K conversations. Medians per cell. Plusgreedy_eq.py(8 prompts, 320 tokens, temp 0) andlp_dump.py(echo prompt logprobs at 1K/6K/20K tokens).Baseline and candidate arms interleaved on the same pair in one session.
One box and one harness, so these are observations under this fingerprint, not cross-validated claims.
No isolated A/B: both changes ran inside the series.
The log shows
RDMA proxy pinned to cpu 19 (3900 MHz), the same core 0.4.0 pins to.Whole series vs SparkQwen 0.4.0 (arms
q-040-*/q-fix-*):For reference, Atlas-Inf main c998a49 with the same launcher measured −9..−12% at C1, −15% at C2, −21..−25% at C4 and +21% cold TTFT against 0.4.0 (2026-10-29, same pair and harness).
Tests
cargo test -p spark-comm: 51 passed.cargo test -p atlas-rdma: 27 passed.clippywith--cfg atlas_rdma_verbscompiles the verbs-gated call site.fmt,clippyanddocpass.Authorship
AI-authored (Claude Code), ported from SparkQwen's AI-authored engine. No human-written code.
🤖 Generated with Claude Code