Repository navigation
[Bugfix][Compilation] Remove AllReduceFusionPass.__del__ destroying the shared FlashInfer workspace - #67643
Open
shadowmodder wants to merge 5 commits into
Conversation
…rkspace The FlashInfer all-reduce workspace is process-global. destroy_fi_ar_workspace is atexit-registered and called on communicator shutdown, so its lifetime is already owned by the process, not by a pass instance. Fixes the root cause of vllm-project#67629. Signed-off-by: shadowmodder <sudhirvissa@gmail.com> Signed-off-by: Sudhir Vissa <sudhirvissa@gmail.com>
Signed-off-by: shadowmodder <sudhirvissa@gmail.com> Signed-off-by: Sudhir Vissa <sudhirvissa@gmail.com>
Signed-off-by: shadowmodder <sudhirvissa@gmail.com> Signed-off-by: Sudhir Vissa <sudhirvissa@gmail.com>
shadowmodder
requested review from
BoyuanFeng,
ProExpertProg,
youkaichao and
zou3519
as code owners
November 14, 2026 12:46
Signed-off-by: shadowmodder <sudhirvissa@gmail.com> Signed-off-by: Sudhir Vissa <sudhirvissa@gmail.com>
Signed-off-by: shadowmodder <sudhirvissa@gmail.com> Signed-off-by: Sudhir Vissa <sudhirvissa@gmail.com>
This branch has not been deployed
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.
Purpose
Fix #67629. AllReduceFusionPass.del called destroy_fi_ar_workspace() when a pass instance was garbage-collected, destroying the process-global FlashInfer all-reduce workspace while compiled callables, CUDA graphs, and communicators may still use it. The workspace lifetime is already owned by the process and the communicator. destroy_fi_ar_workspace is atexit-registered in flashinfer_all_reduce.py and called on communicator shutdown. This PR removes the pass-level del, the destroy_fi_ar_workspace import that only it used, and the contextlib import that only it used, and adds a regression test pinning that the pass does not own the workspace.
This does not duplicate an existing PR. Before opening it, I checked the API search and the live open-PR list for 67629, destroy_fi_ar_workspace, and AllReduceFusionPass. No open PR references the issue or touches this del.
Test Plan
Test Results
AI assistance: this change was prepared with AI assistance and reviewed by the author before submission.