Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v1] fix compilation cache #11598

Merged
merged 4 commits into from
Dec 30, 2024

Conversation

youkaichao
Copy link
Member

@youkaichao youkaichao commented Dec 29, 2024

compilation cache is not working due to a bug, self.to_be_compiled_sizes should be self.compile_sizes.copy() rather than self.compile_sizes.union(self.capture_sizes) .

this should be merged after #11596 . our compilation cache does not consider the code change in the model's code.

before this pr:

Compiling a graph for general shape takes 12.69 s

After this pr:

Compiling a graph for general shape takes 2.27 s

cc @tlrmchlsmth how can we take all these code into consideration? like rope / activation etc.

Copy link

👋 Hi! Thank you for contributing to the vLLM project.
Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of those by going to your fastcheck build on Buildkite UI (linked in the PR checks section) and unblock them. If you do not have permission to unblock, ping simon-mo or khluu to add you in our Buildkite org.

Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging.

To run CI, PR reviewers can do one of these:

  • Add ready label to the PR
  • Enable auto-merge.

🚀

@tlrmchlsmth
Copy link
Collaborator

our compilation cache does not consider the code change in the model's code.

I thought this would be handled by adding the version number here. Maybe we need to explicitly add the git hash as well?

vllm_factors.append(__version__)

Comment on lines +3021 to +3022
else:
vllm_factors.append("None")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to append "None" now?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be safer, to distinguish:

config 1: None
config 2: hash abc
config 1: hash abc
config 2: None

@youkaichao
Copy link
Member Author

I thought this would be handled by adding the version number here. Maybe we need to explicitly add the git hash as well?

that would be kind of overkill, for the developers (like me), the git hash changes from time to time, and it means I cannot reuse any compilation cache.

@youkaichao youkaichao enabled auto-merge (squash) December 30, 2024 00:38
@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label Dec 30, 2024
Signed-off-by: youkaichao <[email protected]>
@youkaichao youkaichao merged commit 3682e33 into vllm-project:main Dec 30, 2024
52 checks passed
@youkaichao youkaichao deleted the fix_v1_compile_cache branch December 30, 2024 04:38
BKitor pushed a commit to BKitor/vllm that referenced this pull request Dec 30, 2024
xcnick pushed a commit to xcnick/vllm that referenced this pull request Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready ONLY add when PR is ready to merge/full CI is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants