Skip to content
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
8742e43
add MimiCMP files
luoyc123 Jan 28, 2026
5e6c189
delete MiniCMP
luoyc123 Jan 28, 2026
be1a56e
Merge branch 'flagos-ai:main' into main
luoyc123 Aug 10, 2026
56c0d99
feat(kunlunxin): add Kunlunxin XPU backend
luoyc123 Jul 6, 2026
ffde7c3
Addressing the issue of Chinese language deterioration
luoyc123 Jul 22, 2026
a04fb18
Switch CPU computation to XPU computation.
luoyc123 Jul 22, 2026
f8952b4
bugfix of triton kernel support on kunlunxin
luoyc123 Jul 23, 2026
c5b373f
Reply to delete code
luoyc123 Jul 28, 2026
511a39a
Remove unnecessary modified code
luoyc123 Jul 28, 2026
b4460b7
support flagos blacklist
luoyc123 Aug 10, 2026
8318c25
fix(kunlunxin): rollback fused_moe_utils.py and worker.py
luoyc123 Aug 11, 2026
f82313c
style(fused_moe_utils): remove unused imports and restore upstream fo…
luoyc123 Aug 12, 2026
a38284c
Align with main
luoyc123 Aug 12, 2026
f0b2fc5
Remove unnecessary code
luoyc123 Aug 12, 2026
bf5c43b
Restrict the platforms where the reduction operator can be used
luoyc123 Aug 12, 2026
c6f2eb6
Merge branch 'main' into support_kunlunxin_backend_2
luoyc123 Aug 12, 2026
e627bf8
Fix log flooding
luoyc123 Aug 17, 2026
79396bd
Merge branch 'main' into support_kunlunxin_backend_2
luoyc123 Aug 17, 2026
6ffa703
Refactor: extract _init_vendor_device for vendor-specific early patches
luoyc123 Aug 18, 2026
33abe8f
Merge branch 'main' into support_kunlunxin_backend_2
luoyc123 Aug 18, 2026
c821a04
fix: address code review comments for kunlunxin vendor backend
luoyc123 Aug 19, 2026
d52385a
Merge branch 'main' into support_kunlunxin_backend_2
luoyc123 Aug 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion vllm_fl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,18 @@ def _patch_custom_ops():
register_op_schemas()


def _init_vendor_device():
"""Vendor-specific device initialization patches."""
from vllm_fl.utils import DeviceInfo
if DeviceInfo().vendor_name == "kunlunxin":
from vllm_fl.dispatch.backends.vendor.kunlunxin.patches.patch_fla_utils import _patch_xpu_get_device
_patch_xpu_get_device()


def register():
"""Register the FL platform."""
_init_vendor_device()

Comment thread
luoyc123 marked this conversation as resolved.
Comment thread
luoyc123 marked this conversation as resolved.
_patch_custom_ops()
_patch_flash_attn_import()
_patch_transformers_compat()
Expand Down Expand Up @@ -167,7 +177,6 @@ def register_model():
except Exception as e:
logger.error(f"Register DeepseekV4 model error: {str(e)}")


# Register DeepseekV4 model
try:
ModelRegistry.register_model(
Expand Down
9 changes: 9 additions & 0 deletions vllm_fl/dispatch/backends/vendor/kunlunxin/__init__.py
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"]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Kunlunxin implementation modules
30 changes: 30 additions & 0 deletions vllm_fl/dispatch/backends/vendor/kunlunxin/impl/activation.py
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
Loading
Loading