Skip to content

Reject symmetric allocation and first rendezvous during graph capture - #25

Open
kapilsh wants to merge 1 commit into
symmem/group-namefrom
symmem/capture-check
Open

kapilsh wants to merge 1 commit into
symmem/group-namefrom
symmem/capture-check

Conversation

@kapilsh

@kapilsh kapilsh commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • On similar lines as PyTorch [symm_mem] Reject alloc and first rendezvous during CUDA graph capture pytorch/pytorch#197857.
  • Graph capture cannot record an allocation or the first rendezvous of an allocation on a group.
  • Before this change, they failed with cudaErrorStreamCaptureInvalidated or a pinned-memory copy error.
  • Now they raise a RuntimeError. The message gives the operation and the correct procedure.
  • A cached rendezvous and a new view of an existing allocation are still safe during capture.

Test plan

  • test_graph_capture.py, test_symm_mem.py on 2x GB200: 17 passed.
  • CUDA and NCCL backends: the errors, and the replay of a cached handle and of a captured barrier.
  • CPU unit test: a simulated capture state checks the same paths without a GPU.

@kapilsh
kapilsh added this pull request to stack #26 November 12, 2026 18:10
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 12, 2026
@kapilsh
kapilsh force-pushed the symmem/capture-check branch from ffb0dcb to 09d2e05 Compare November 16, 2026 15:26
@kapilsh
kapilsh removed this pull request from stack #26 November 16, 2026 15:28
@kapilsh
kapilsh added this pull request to stack #31 November 16, 2026 15:28
@kapilsh
kapilsh force-pushed the symmem/capture-check branch 6 times, most recently from 8f68558 to 793a0f1 Compare November 19, 2026 19:26
@kapilsh
kapilsh removed this pull request from stack #31 November 20, 2026 02:41
@kapilsh
kapilsh force-pushed the symmem/capture-check branch from 793a0f1 to 9d6d70f Compare November 20, 2026 02:41
@kapilsh
kapilsh added this pull request to stack #34 November 20, 2026 02:41
@kapilsh
kapilsh force-pushed the symmem/capture-check branch 2 times, most recently from 31cd83d to aacf058 Compare November 22, 2026 14:05
@kapilsh
kapilsh removed this pull request from stack #34 November 22, 2026 14:30
@kapilsh
kapilsh added this pull request to stack #41 November 22, 2026 14:30
@kapilsh
kapilsh force-pushed the symmem/capture-check branch from aacf058 to 9a7a09a Compare November 26, 2026 11:32
Mirrors PyTorch #197857. Allocation and the first rendezvous of an
allocation on a group cannot be captured; inside a capture they failed
with a bare cudaErrorStreamCaptureInvalidated or a pinned-memory copy
error. They now raise a RuntimeError naming the operation and what to do
instead. Cached rendezvous and new views of an established allocation
remain capture-safe.

Tests (CUDA and NCCL backends) check the errors, and that a cached
handle and a captured barrier replay correctly. A CPU unit test fakes
the capture state to check the same paths without a GPU.
@kapilsh
kapilsh force-pushed the symmem/capture-check branch from 9a7a09a to b145ed3 Compare November 27, 2026 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant