Skip to content

[hw-agnostic] Implemented plumbing to support OOT plugins - #53153

Closed
bohnstingl wants to merge 5 commits into
vllm-project:mainfrom
bohnstingl:transformer_hw-agnostic_p2
Closed

bohnstingl wants to merge 5 commits into
vllm-project:mainfrom
bohnstingl:transformer_hw-agnostic_p2

Conversation

@bohnstingl

@bohnstingl bohnstingl commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

Purpose

Currently, hw_agnostic/custom_op.py forked the custom-op plumbing: it defined its own CustomOp, PluggableLayer and op_registry_oot. An out-of-tree plugin registers overrides against the in-tree classes, so under VLLM_USE_HW_AGNOSTIC=1 its 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.py re-exports CustomOp, PluggableLayer and 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
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.

cc @tdoublep @hmellor @zou3519

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>
@bohnstingl
bohnstingl requested a review from hmellor as a code owner August 20, 2026 18:41

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

…hw-agnostic_p2

Signed-off-by: Thomas Ortner <boh@zurich.ibm.com>
@mergify

mergify Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @bohnstingl.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

bohnstingl and others added 3 commits September 28, 2026 10:27
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>
@bohnstingl

Copy link
Copy Markdown
Contributor Author

Closing in favor of #60218

@bohnstingl bohnstingl closed this Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant