Use unreg path for custom all-reduce during CUDA graph capture#2075
Merged
Use unreg path for custom all-reduce during CUDA graph capture#2075
Conversation
valarLip
reviewed
Feb 23, 2026
| # return | ||
|
|
||
| self.disabled = False | ||
| self.tms_cudagraph = os.getenv("SGLANG_MEMORY_SAVER_CUDA_GRAPH", "0") |
Collaborator
There was a problem hiding this comment.
prefix with SGLANG_MEMORY_SAVER_CUDA_GRAPH?
Contributor
Author
There was a problem hiding this comment.
Good catch. How about adding a tms_cudagraph parameter to __init__ and parse the param from sglang? But this would need sglang using updated aiter. Any suggestions?
Collaborator
There was a problem hiding this comment.
good idea, let's add "enable_register" param to init
Contributor
Author
There was a problem hiding this comment.
Added "enable_register_for_capturing" since this only control behavior for capturing not real calling. But again, we cannot make subsequent change before sglang bump up aiter's version. I will keep an eye on that
yushengsu-thu
approved these changes
Feb 23, 2026
valarLip
approved these changes
Mar 3, 2026
apicciau
pushed a commit
that referenced
this pull request
Mar 12, 2026
valarLip
pushed a commit
that referenced
this pull request
Mar 18, 2026
AMD-yanfeiwang
pushed a commit
to AMD-yanfeiwang/aiter
that referenced
this pull request
Mar 18, 2026
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.
Motivation
Same as sgl-project/sglang#19162.
Super tiny fix, needed to be compatible with
torch_memory_saver. Error path:torch_memory_saverhookhipMallocwithhipMemAddressReserve+hipMemMap(VMM APIs)register_graph_buffers,hipIpcGetMemHandleexpect a ptr byhipMallocbut in fact, got buffer fromhipMemAddressReserve+hipMemMaphipIpcGetMemHandledoes not check and accept this invalid handle (invalid because Runtime API and VMM API use different Allocation Table), which I raised a fix herehipIpcOpenMemHandle(invalid_handle)and fail, causing a hang during cuda graph capturingTechnical Details
Test Plan
Test Result
Submission Checklist