Skip to content

Conversation

@gcanlin
Copy link
Contributor

@gcanlin gcanlin commented Oct 24, 2025

What this PR does / why we need it?

Closes #3488. Reopen #3498 for CI.

Does this PR introduce any user-facing change?

How was this patch tested?

CI tested.

@github-actions
Copy link

👋 Hi! Thank you for contributing to the vLLM Ascend project. The following points will speed up your PR merge:‌‌

  • A PR should do only one thing, smaller PRs enable faster reviews.
  • Every PR should include unit tests and end-to-end tests ‌to ensure it works and is not broken by other future PRs.
  • Write the commit message by fulfilling the PR description to help reviewer and future developers understand.

If CI fails, you can run linting and testing checks locally according Contributing and Testing.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new import_kernels interface to the NPUPlatform class. My review identifies a significant issue of code duplication. The new method's implementation is nearly identical to the existing enable_custom_op function in vllm_ascend/utils.py. This duplication increases maintenance overhead and could lead to inconsistencies. I've suggested refactoring the new method to reuse the existing function, which also benefits from caching logic that the new implementation lacks.

@wangxiyuan
Copy link
Collaborator

we make custom_ops lazy load here #884 please consider this case.

Signed-off-by: gcanlin <[email protected]>
@wangxiyuan wangxiyuan added ready read for review release release related ready-for-test start test by label for PR and removed release release related labels Nov 13, 2025
@wangxiyuan wangxiyuan merged commit f10251e into vllm-project:main Nov 14, 2025
74 checks passed
luolun pushed a commit to luolun/vllm-ascend that referenced this pull request Nov 19, 2025
### What this PR does / why we need it?
Add import_kernels interface to avoid import useless vLLM C library

Closes vllm-project#3488. Reopen vllm-project#3498 for CI.

### How was this patch tested?

CI tested.

- vLLM version: v0.11.0
- vLLM main:
vllm-project/vllm@2918c1b

---------

Signed-off-by: gcanlin <[email protected]>
Signed-off-by: luolun <[email protected]>
hwhaokun pushed a commit to hwhaokun/vllm-ascend that referenced this pull request Nov 19, 2025
### What this PR does / why we need it?
Add import_kernels interface to avoid import useless vLLM C library

Closes vllm-project#3488. Reopen vllm-project#3498 for CI.

### How was this patch tested?

CI tested.

- vLLM version: v0.11.0
- vLLM main:
vllm-project/vllm@2918c1b

---------

Signed-off-by: gcanlin <[email protected]>
Signed-off-by: hwhaokun <[email protected]>
NSDie pushed a commit to NSDie/vllm-ascend that referenced this pull request Nov 24, 2025
### What this PR does / why we need it?
Add import_kernels interface to avoid import useless vLLM C library

Closes vllm-project#3488. Reopen vllm-project#3498 for CI.

### How was this patch tested?

CI tested.

- vLLM version: v0.11.0
- vLLM main:
vllm-project/vllm@2918c1b

---------

Signed-off-by: gcanlin <[email protected]>
Signed-off-by: nsdie <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module:core ready read for review ready-for-test start test by label for PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Add import_kernels interface

2 participants