-
Notifications
You must be signed in to change notification settings - Fork 102
Support kunlunxin backend #268
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
Merged
cyber-pioneer
merged 22 commits into
flagos-ai:main
from
luoyc123:support_kunlunxin_backend_2
Aug 19, 2026
+3,682
−53
Merged
Changes from 21 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
8742e43
add MimiCMP files
luoyc123 5e6c189
delete MiniCMP
luoyc123 be1a56e
Merge branch 'flagos-ai:main' into main
luoyc123 56c0d99
feat(kunlunxin): add Kunlunxin XPU backend
luoyc123 ffde7c3
Addressing the issue of Chinese language deterioration
luoyc123 a04fb18
Switch CPU computation to XPU computation.
luoyc123 f8952b4
bugfix of triton kernel support on kunlunxin
luoyc123 c5b373f
Reply to delete code
luoyc123 511a39a
Remove unnecessary modified code
luoyc123 b4460b7
support flagos blacklist
luoyc123 8318c25
fix(kunlunxin): rollback fused_moe_utils.py and worker.py
luoyc123 f82313c
style(fused_moe_utils): remove unused imports and restore upstream fo…
luoyc123 a38284c
Align with main
luoyc123 f0b2fc5
Remove unnecessary code
luoyc123 bf5c43b
Restrict the platforms where the reduction operator can be used
luoyc123 c6f2eb6
Merge branch 'main' into support_kunlunxin_backend_2
luoyc123 e627bf8
Fix log flooding
luoyc123 79396bd
Merge branch 'main' into support_kunlunxin_backend_2
luoyc123 6ffa703
Refactor: extract _init_vendor_device for vendor-specific early patches
luoyc123 33abe8f
Merge branch 'main' into support_kunlunxin_backend_2
luoyc123 c821a04
fix: address code review comments for kunlunxin vendor backend
luoyc123 d52385a
Merge branch 'main' into support_kunlunxin_backend_2
luoyc123 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| # Copyright (c) 2026 Kunlunxin, Inc. All rights reserved. | ||
|
|
||
| """ | ||
| Kunlunxin backend for vllm-plugin-FL dispatch. | ||
| """ | ||
|
|
||
| from .kunlunxin import KunlunxinBackend | ||
|
|
||
| __all__ = ["KunlunxinBackend"] |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| # Kunlunxin implementation modules |
30 changes: 30 additions & 0 deletions
30
vllm_fl/dispatch/backends/vendor/kunlunxin/impl/activation.py
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| # Copyright (c) 2026 Kunlunxin, Inc. All rights reserved. | ||
|
|
||
| """ | ||
| Kunlunxin activation operator implementations. | ||
| """ | ||
|
|
||
| from __future__ import annotations | ||
|
|
||
| import torch | ||
|
|
||
|
|
||
| def silu_and_mul_kunlunxin(obj, x: torch.Tensor) -> torch.Tensor: | ||
| """ | ||
| SiLU activation followed by element-wise multiplication. | ||
|
|
||
| Args: | ||
| obj: The calling obj (for interface consistency) | ||
| x: Input tensor of shape [..., 2*d] | ||
|
|
||
| Returns: | ||
| Output tensor of shape [..., d] | ||
| """ | ||
| import xtorch_ops | ||
|
|
||
| d = x.shape[-1] // 2 | ||
| out = torch.empty( | ||
| *x.shape[:-1], d, dtype=x.dtype, device=x.device | ||
| ) | ||
| xtorch_ops.swiglu(x, out) | ||
| return out |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.