[PR #1099] [CLOSED] layer split: the hand-off over peer access on NVLink (3.3 -> 48 GB/s, +0.9% e2e) #3024

Closed
opened 2026-11-04 02:05:01 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/1099
Author: @ATIVX928
Created: 10/6/2026
Status: ❌ Closed

Base: main ← Head: v100/split-p2p-v2


📝 Commits (2)

  • b770b95 bench: the layer-split hand-off across NVLink vs pinned RAM (2x V100, measured)
  • 3424df5 layer split: the hand-off over peer access (STRATA_SPLIT_P2P), measured on 2x V100 NVLink

📊 Changes

10 files changed (+579 additions, -30 deletions)

View changed files

📝 CMakeLists.txt (+9 -0)
➕ bench/results/2026-10-02-v100-split-p2p/README.md (+79 -0)
➕ bench/results/2026-10-02-v100-split-p2p/data/bench.txt (+26 -0)
➕ bench/split_p2p_bench.cu (+292 -0)
📝 docs/MULTI_GPU.md (+11 -4)
📝 include/strata/core/device.hpp (+10 -0)
📝 include/strata/prefill/prefill.hpp (+15 -4)
📝 src/core/device.cu (+52 -0)
📝 src/prefill/prefill.cpp (+29 -11)
📝 src/program/generate.cpp (+56 -11)

📄 Description

Resubmitted from #1023: the original was auto-closed by the 2026-10-06 history cleanup. Rebased onto the new main (82f46a8); build and benchmark re-verified on 2x V100.

What

The layer-split hand-off goes through pinned host RAM today. This adds the peer-access path (split_handoff_p2p), split out of #627:

  • verify windows: a peer store inside the captured window graph (a copy kernel on the source card; cudaMemcpyPeerAsync is rejected inside a capture, the bench records this)
  • prompt chunks: cudaMemcpyPeerAsync on the source stage, with the receiving stage's chunk buffers on its own card
  • split_p2p_bench and the MULTI_GPU.md section

The pinned-RAM path remains the default outside the measured configuration.

Gating

STRATA_SPLIT_P2P=0 forces the pinned path, =1 forces the link, unset means auto only on an sm_70 + sm_70 pair inside the STRATA_EXPERIMENTAL_SM60 build. HIP always keeps the pinned path. The ready-made engine is unchanged.

Measured

2x V100-SXM2-16GB (NVLink nv2), CUDA 12.8, split_p2p_bench, useful bandwidth per hand-off:

shape pinned bounce p2p memcpy p2p kernel
verify 8-token window (400 KB) 2.99 GB/s 26.24 GB/s 22.70 GB/s
prompt chunk 2048 (84 MB) 3.31 GB/s 48.27 GB/s 45.55 GB/s

One hand-off: 0.137 ms -> 0.018 ms for the window; 25.33 ms -> 1.738 ms for the 2048-token chunk. Every path is checked byte-for-byte in the bench before it is timed.

Tests

  • split_p2p_bench built and run on 2x V100 (both GPUs), all paths byte-identical.
  • The engine target builds clean; without P2P the peer pointer is null and the original pinned branches run.

32K end-to-end

Same setup; the same binary with STRATA_SPLIT_P2P=0 as the control, interleaved (3 rounds each, two pairs): on the rebased branch against the new main, dual-card prefill 2213.9 -> 2233.1 tok/s (+0.9%); on the pre-cleanup main the same A/B read 2190.7 -> 2212.9 (+1.0%). Decode is unchanged (within its +-15% session noise).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/1099 **Author:** [@ATIVX928](https://github.com/ATIVX928) **Created:** 10/6/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `v100/split-p2p-v2` --- ### 📝 Commits (2) - [`b770b95`](https://github.com/Niko1221/Strata/commit/b770b951620c4adf4a54a28d5a75d67a4b892ac6) bench: the layer-split hand-off across NVLink vs pinned RAM (2x V100, measured) - [`3424df5`](https://github.com/Niko1221/Strata/commit/3424df5ca642220cb8bc1622b414ef0a17e9b7a4) layer split: the hand-off over peer access (STRATA_SPLIT_P2P), measured on 2x V100 NVLink ### 📊 Changes **10 files changed** (+579 additions, -30 deletions) <details> <summary>View changed files</summary> 📝 `CMakeLists.txt` (+9 -0) ➕ `bench/results/2026-10-02-v100-split-p2p/README.md` (+79 -0) ➕ `bench/results/2026-10-02-v100-split-p2p/data/bench.txt` (+26 -0) ➕ `bench/split_p2p_bench.cu` (+292 -0) 📝 `docs/MULTI_GPU.md` (+11 -4) 📝 `include/strata/core/device.hpp` (+10 -0) 📝 `include/strata/prefill/prefill.hpp` (+15 -4) 📝 `src/core/device.cu` (+52 -0) 📝 `src/prefill/prefill.cpp` (+29 -11) 📝 `src/program/generate.cpp` (+56 -11) </details> ### 📄 Description > Resubmitted from #1023: the original was auto-closed by the 2026-10-06 history cleanup. Rebased onto the new `main` (82f46a8); build and benchmark re-verified on 2x V100. ## What The layer-split hand-off goes through pinned host RAM today. This adds the peer-access path (`split_handoff_p2p`), split out of #627: - verify windows: a peer store inside the captured window graph (a copy kernel on the source card; `cudaMemcpyPeerAsync` is rejected inside a capture, the bench records this) - prompt chunks: `cudaMemcpyPeerAsync` on the source stage, with the receiving stage's chunk buffers on its own card - `split_p2p_bench` and the MULTI_GPU.md section The pinned-RAM path remains the default outside the measured configuration. ## Gating `STRATA_SPLIT_P2P=0` forces the pinned path, `=1` forces the link, unset means auto only on an sm_70 + sm_70 pair inside the `STRATA_EXPERIMENTAL_SM60` build. HIP always keeps the pinned path. The ready-made engine is unchanged. ## Measured 2x V100-SXM2-16GB (NVLink nv2), CUDA 12.8, `split_p2p_bench`, useful bandwidth per hand-off: | shape | pinned bounce | p2p memcpy | p2p kernel | | --- | ---: | ---: | ---: | | verify 8-token window (400 KB) | 2.99 GB/s | 26.24 GB/s | 22.70 GB/s | | prompt chunk 2048 (84 MB) | 3.31 GB/s | 48.27 GB/s | 45.55 GB/s | One hand-off: 0.137 ms -> 0.018 ms for the window; 25.33 ms -> 1.738 ms for the 2048-token chunk. Every path is checked byte-for-byte in the bench before it is timed. ## Tests - `split_p2p_bench` built and run on 2x V100 (both GPUs), all paths byte-identical. - The engine target builds clean; without P2P the peer pointer is null and the original pinned branches run. ## 32K end-to-end Same setup; the same binary with `STRATA_SPLIT_P2P=0` as the control, interleaved (3 rounds each, two pairs): on the rebased branch against the new main, dual-card prefill 2213.9 -> 2233.1 tok/s (+0.9%); on the pre-cleanup main the same A/B read 2190.7 -> 2212.9 (+1.0%). Decode is unchanged (within its +-15% session noise). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-04 02:05:01 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#3024
No description provided.