Adapt Online defragmenter for torch compile#986
Open
jwieczorekhabana wants to merge 1 commit intovllm-project:mainfrom
Open
Adapt Online defragmenter for torch compile#986jwieczorekhabana wants to merge 1 commit intovllm-project:mainfrom
jwieczorekhabana wants to merge 1 commit intovllm-project:mainfrom
Conversation
…for t.compile Because of the double entrypoint of CacheSwapUtils (forward and swap functions) torch.compile would process module and forward function while swap's self would refer to unwrapped module. That results in the function not being run as compiled Changes made in this patch: - Hide CacheSwapUtils entirely in OnlineDefragmenter. Let it be responsible for calling the module correctly - Moved warmup_defragmenter to defragmenter itself - Removed initialize function of OnlineDefragmenter, fully initialize object in init - Adapted unit tests for new implementations Signed-off-by: Jan Wieczorek <jwieczorek@habana.ai>
c17c9fe to
49ba149
Compare
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.
[GAUDISW-244575] Reapply Adapt OnlineDefragmenter and CacheSwapUtils for t.compile
Because of the double entrypoint of CacheSwapUtils (forward and swap functions)
torch.compile would process module and forward function while swap's self
would refer to unwrapped module. That results in the function not being run as compiled
Changes made in this patch: