Repository navigation
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
49eb853 to
87b89e9
Compare
|
/claude review |
|
/ok to test 87b89e9 |
|
Light review — the refactor reads well and the new unit tests cover the interesting cases (distinct slices, symmetric domains, empty runner, reordered replay, capacity validation). Three inline notes plus two things that are better discussed at top level. 1. Discovery state stays globally armed after the last runner's backward
The failure is loud rather than silent — # in _create_cudagraphs, before the plan is built
assert (
gtp_cuda_graphs._ACTIVE_DISCOVERY_STATE is None
), "persistent-buffer discovery was still armed after backward; a post-backward GTP wgrad request would inflate a runner's capacity"
set_graph_persistent_buffer_discovery(None)2.
|
87b89e9 to
78538b2
Compare
|
/claude strict-review |
Replace manually sized per-parameter wgrad rings with runner-scoped capacity discovery and bounded alternating arenas. Allocate the arenas outside CUDA graph pools, bump-allocate stable capture views, and fence generation reuse during replay. Preserve registered symmetric-memory domains for NCCL user-buffer reduce-scatter inputs. Signed-off-by: Jiangfei Duan <jiangfeid@nvidia.com>
78538b2 to
a39b3b3
Compare
|
/claude strict-review |
What does this PR do?
Problem
Local CUDA graphs need fixed-address storage for GTP wgrad reduce-scatter inputs whose asynchronous lifetime can extend beyond the graph that produced them.
The existing per-parameter wgrad ring has several limitations:
graph_wgrad_ring_size;Solution
Replace the wgrad ring with a runner-scoped persistent-buffer plan:
GraphPersistentBufferPlanallocates one arena generation when one local graph module is configured and two generations when multiple modules are configured. One generation remains correct because reuse is event-fenced; two preserves the expected cross-graph overlap. Larger counts are not used because they increase persistent memory.The GTP wgrad reduce-scatter input path now uses this generic API, and the manual
graph_wgrad_ring_sizeconfiguration and ring-specific API are removed.Scope
This PR intentionally contains only the persistent-buffer allocation and lifetime refactor. It does not change:
Those behaviors can be added or fixed independently on top of this foundation.
Validation
Contribution process
Pre-checks