Conversation
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.
Summary
Depends on #753, including its #747 watchdog dependency. Merge those first, then rebase this PR onto the merged implementation.
Add an opt-in NCCL receiver payload-storage budget, with concurrent receive windows sized by available bytes and explicit consumer leases. A zero
custom.nccl_receive_budget_bytespreserves existing reception.Before sender rendezvous, reserve all schema-derived decoded storage plus the largest wire buffer. Use remaining available capacity for a larger wire workspace without waiting while holding a partial reservation. Each window posts matching receives immediately after rendezvous, then completes reception and decoding before proceeding. Independent NCCL communicators are not grouped. Tight budgets produce single-payload windows; more headroom permits concurrent transfers.
Decoded storage remains charged until the consumer calls
release_prefetch(streams=...)after its final readers and drops external aliases. The lease retains backing storage independently of payload-dictionary mutations and waits for reader streams before returning capacity.Prepared prefetch retains the same lease through CPU preparation. Collecting its future transfers the lease to the ordinary consumer cache; it does not infer final use or release capacity. Unconsumed leases are cleaned up after shutdown joins the worker. Both submission paths use the shared independent watchdog, including when results are never consumed.
Boundaries
Validation
30c8862: two-GPU Redis/NCCL acceptance run passed 49 tests with zero skips, including a six-payload concurrent window and prepared CPU-copy lease handoff/release. Both processes exited cleanly.The portable suites are
tests/test_receive_memory.py,tests/test_receive_memory_cuda.py, andtests/test_nccl_prefetch_failfast.py; receive-memory tests are included in CI. Coverage includes byte-limited windows, admission pressure, ownership through preparation/consumption, cleanup, native-hang watchdogs, and delayed reader streams.The prior serial-reception benchmark is historical only; its memory savings and fetch-time overhead do not describe this concurrent revision. No application-throughput or workload-specific OOM-remedy claim is made.