Repository navigation
[hw-agnostic] Implemented plumbing to support OOT plugins - #53153
Closed
bohnstingl wants to merge 5 commits into
Closed
bohnstingl wants to merge 5 commits into
bohnstingl wants to merge 5 commits into
Conversation
This commits enables the ability for OOT plugins to override the hw-agnostic layer / activation implementations. Signed-off-by: Thomas Ortner <boh@zurich.ibm.com>
1 task done
3 of 4 tasks
…hw-agnostic_p2 Signed-off-by: Thomas Ortner <boh@zurich.ibm.com>
Contributor
|
This pull request has merge conflicts that must be resolved before it can be |
Co-authored-by: Kilo <kilo@kilo.ai> Signed-off-by: Thomas Ortner <boh@zurich.ibm.com>
…ic_p2 Signed-off-by: Thomas Ortner <boh@zurich.ibm.com> # Conflicts: # vllm/model_executor/hw_agnostic/custom_op.py
Signed-off-by: Thomas Ortner <boh@zurich.ibm.com>
6 tasks done
Contributor
Author
|
Closing in favor of #60218 |
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
Currently,
hw_agnostic/custom_op.pyforked the custom-op plumbing: it defined its ownCustomOp,PluggableLayerandop_registry_oot. An out-of-tree plugin registers overrides against the in-tree classes, so underVLLM_USE_HW_AGNOSTIC=1its registrations landed in a registry the hw-agnostic layers never consulted.This PR fixes this problem and enables the ability for OOT plugins to override the hw-agnostic layer / activation implementations. In particular, there is now only a single registry and
hw_agnostic/custom_op.pyre-exportsCustomOp,PluggableLayerand both registries from vllm.model_executor.custom_op instead of redefining them.With this rework, an OOT plugin writes one registration against the public in-tree name, and it works on both the standard and the hw-agnostic path. I.e., existing OOT plugins, such as spyre-inference can remain unchanged.
Test Plan
The behavior for the general hw-agnostic path doesn't change, thus there are no specific new test needed. However, I added dedicated tests for the OOT plugin path.
Test Result
Additional CI tests pass
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.cc @tdoublep @hmellor @zou3519