Skip to content

Conversation

@gcanlin
Copy link
Contributor

@gcanlin gcanlin commented Oct 16, 2025

What this PR does / why we need it?

Closes #3488.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

CI passed.

@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 the import_kernels method to the NPUPlatform class, aligning it with an updated interface from the upstream vLLM project. The implementation correctly attempts to import the optional vllm._moe_C library for Mixture-of-Experts support, while gracefully handling an ImportError if the library is not available. This approach is consistent with how optional kernels are managed in other platform implementations within vLLM. The code is clean, correct, and follows best practices for handling optional dependencies. I have reviewed the changes and found no issues.

@gcanlin gcanlin marked this pull request as draft October 16, 2025 08:03
@gcanlin gcanlin marked this pull request as ready for review October 16, 2025 09:03
@gcanlin
Copy link
Contributor Author

gcanlin commented Oct 20, 2025

@wangxiyuan Could you please take a look? Thanks!

@MengqingCao MengqingCao added ready read for review ready-for-test start test by label for PR labels Oct 24, 2025
@gcanlin
Copy link
Contributor Author

gcanlin commented Oct 24, 2025

Closed for the stale CI.

@gcanlin gcanlin closed this Oct 24, 2025
wangxiyuan pushed a commit that referenced this pull request Nov 14, 2025
### What this PR does / why we need it?
Add import_kernels interface to avoid import useless vLLM C library

Closes #3488. Reopen #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]>
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