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

[2/N][torch.compile] make compilation cfg part of vllm cfg #10383

Merged
merged 23 commits into from
Nov 17, 2024

Conversation

youkaichao
Copy link
Member

@youkaichao youkaichao commented Nov 15, 2024

continue of #10237

move vllm.compilation.config into vllm.config

it is still controlled by the env var, but in the core code, no one should read the env var.

TODO:

  1. move the env var to cli arg.
  2. remove compilation context, initialize all config fields during init, rather than during model forward time

Signed-off-by: youkaichao <[email protected]>
Signed-off-by: youkaichao <[email protected]>
Signed-off-by: youkaichao <[email protected]>
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.

🚀

@youkaichao youkaichao marked this pull request as draft November 15, 2024 23:39
Signed-off-by: youkaichao <[email protected]>
Signed-off-by: youkaichao <[email protected]>
Signed-off-by: youkaichao <[email protected]>
Signed-off-by: youkaichao <[email protected]>
Signed-off-by: youkaichao <[email protected]>
Signed-off-by: youkaichao <[email protected]>
Signed-off-by: youkaichao <[email protected]>
Signed-off-by: youkaichao <[email protected]>
Signed-off-by: youkaichao <[email protected]>
Signed-off-by: youkaichao <[email protected]>
Signed-off-by: youkaichao <[email protected]>
Signed-off-by: youkaichao <[email protected]>
Signed-off-by: youkaichao <[email protected]>
capture_sizes: List[int] = PrivateAttr

def model_post_init(self, __context: Any) -> None:
self.level = envs.VLLM_TORCH_COMPILE_LEVEL
Copy link
Member Author

Choose a reason for hiding this comment

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

currently it is still read from env var so that api server can set it. later we will move it to the cli args.

Signed-off-by: youkaichao <[email protected]>
Signed-off-by: youkaichao <[email protected]>
Signed-off-by: youkaichao <[email protected]>
@youkaichao youkaichao marked this pull request as ready for review November 16, 2024 01:11
@youkaichao youkaichao changed the title [2/N][torch.compile] move config out of compilation [2/N][torch.compile] make compilation cfg part of vllm cfg Nov 16, 2024
Signed-off-by: youkaichao <[email protected]>
Signed-off-by: youkaichao <[email protected]>
Signed-off-by: youkaichao <[email protected]>
Copy link
Collaborator

Choose a reason for hiding this comment

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

A dumb question: How does it work with TP? It seems we relying on more global variables that are used by the model executor. Does it add any new assumption or restriction to the TP implementation?

Copy link
Member Author

Choose a reason for hiding this comment

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

It works with TP naturally, because every TP worker (process) has its own model executor and plugins module.

Copy link
Collaborator

@WoosukKwon WoosukKwon left a comment

Choose a reason for hiding this comment

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

LGTM. Please fix the CI error before merge.

@youkaichao youkaichao added the ready ONLY add when PR is ready to merge/full CI is needed label Nov 17, 2024
@youkaichao youkaichao merged commit 4fd9375 into vllm-project:main Nov 17, 2024
60 of 62 checks passed
@youkaichao youkaichao deleted the compile_rollout branch November 17, 2024 02:02
@youkaichao
Copy link
Member Author

LGTM. Please fix the CI error before merge.

the ci error is huggingface timeout. now it passes.

Copy link
Contributor

@ProExpertProg ProExpertProg left a comment

Choose a reason for hiding this comment

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

I know this was merged but I had a few questions

vllm/model_executor/custom_op.py Show resolved Hide resolved
vllm/compilation/backends.py Show resolved Hide resolved
vllm/v1/worker/gpu_model_runner.py Show resolved Hide resolved
coolkp pushed a commit to coolkp/vllm that referenced this pull request Nov 20, 2024
KuntaiDu pushed a commit to KuntaiDu/vllm that referenced this pull request Nov 20, 2024
mfournioux pushed a commit to mfournioux/vllm that referenced this pull request Nov 20, 2024
rickyyx pushed a commit to rickyyx/vllm that referenced this pull request Nov 20, 2024
tlrmchlsmth pushed a commit to neuralmagic/vllm that referenced this pull request Nov 23, 2024
prashantgupta24 pushed a commit to opendatahub-io/vllm that referenced this pull request Dec 3, 2024
sleepwalker2017 pushed a commit to sleepwalker2017/vllm that referenced this pull request Dec 13, 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.

3 participants