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

[Feature] Pluggable platform-specific scheduler #13161

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

yannicks1
Copy link
Contributor

@yannicks1 yannicks1 commented Feb 12, 2025

This PR enables different platforms to plugin their (hardware) specific scheduler class in vLLM version V0 and therefore addresses the scheduler part of this RFC #11162. A pluggable scheduler is needed to add support for the IBM Spyre accelerator #9652.
Note that this feature is under development for V1 but missing in the current V0.

Changes

  • adding attribute scheduler_cls to class ParallelConfig in vllm/config.py
  • loading Scheduler based on scheduler_cls in vllm/engine/llm_engine.py

Remarks

  • since the scheduler_cls is initialized with "vllm.core.scheduler.Scheduler", the default behaviour does not change. However, the change allows to point to a (hardware) specific scheduler class in platforms.
  • I opted for initialization with "vllm.core.scheduler.Scheduler" and not "auto" as it is done for attribute worker_cls to have minimal changes (Otherwise I would have to overwrite "auto" for all platforms using the default scheduler).

Copy link

👋 Hi! Thank you for contributing to the vLLM project.

💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels.

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 either: Add ready label to the PR or enable auto-merge.

🚀

@yannicks1 yannicks1 marked this pull request as ready for review February 12, 2025 16:41
@comaniac
Copy link
Collaborator

While we need more discussions about this feature in v1, I think it's ok for v0 to have it. Could you add a unit test with a dummy scheduler to 1) test the functionality, and 2) be an example?

@yannicks1 yannicks1 force-pushed the ysc-pluggable-scheduler branch from e0beefe to 835e97b Compare February 14, 2025 14:58
@yannicks1
Copy link
Contributor Author

Thanks for your feedback @comaniac ! I have added a test which validates the functionality.

Copy link
Collaborator

Choose a reason for hiding this comment

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

It would be good to avoid a duplicated dummy platform in the plugin tests. Can we do either of the following:

  1. Do not use a dummy platform in the dummy scheduler plugin. This also demonstrates that the pluggable scheduler is compatible with existing platforms.
  2. If (1) is not feasible, we could consider extending dummy platform plugin to also have a dummy scheduler, so that it becomes vllm_add_dummy_platform_and_scheduler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants