A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 5, 14:45 UTC
[XPU] bump up xpu-kernel v0.1.5, transpose moe weights (#38342)
Signed-off-by: mayuyuace <qiming1.zhang@intel.com> Signed-off-by: Qiming Zhang <qiming1.zhang@intel.com> Signed-off-by: Kunshang Ji <kunshang.ji@intel.com> Co-authored-by: Kunshang Ji <kunshang.ji@intel.com>
Qiming Zhang committed
Apr 3, 2026 at 07:10 UTC
6b4872240f72bce225f1f3106d1669245345e958
3 files changed
+17
-1
requirements/xpu.txt
+1
-1
@@ -15,4 +15,4 @@ torch==2.10.0+xpu
15
torchaudio
16
torchvision
17
18
-vllm_xpu_kernels @ https://github.com/vllm-project/vllm-xpu-kernels/releases/download/v0.1.4/vllm_xpu_kernels-0.1.4-cp38-abi3-manylinux_2_28_x86_64.whl
18
+vllm_xpu_kernels @ https://github.com/vllm-project/vllm-xpu-kernels/releases/download/v0.1.5/vllm_xpu_kernels-0.1.5-cp38-abi3-manylinux_2_28_x86_64.whl
vllm/model_executor/layers/fused_moe/unquantized_fused_moe_method.py
+12
@@ -222,6 +222,18 @@ class UnquantizedFusedMoEMethod(FusedMoEMethodBase, CustomOp):
222
self.cpu_fused_moe = cpu_fused_moe.CPUFusedMOE(layer)
223
else:
224
self.cpu_fused_moe = cpu_fused_moe.CPUFusedMOE(layer)
225
+ elif current_platform.is_xpu():
226
+ w13 = layer.w13_weight
227
+ w2 = layer.w2_weight
228
+
229
+ w13.data = w13.transpose(-1, -2).contiguous()
230
+ w2.data = w2.transpose(-1, -2).contiguous()
231
+
232
+ self._setup_kernel(
233
+ layer=layer,
234
+ w13=w13,
235
+ w2=w2,
236
+ )
237
else:
238
self._setup_kernel(
239
layer=layer,
vllm/model_executor/layers/quantization/fp8.py
+4
@@ -1028,6 +1028,10 @@ class Fp8OnlineMoEMethod(Fp8MoEMethod):
1028
layer.w2_weight[expert, :, :]
1029
)
1030
1031
+ if current_platform.is_xpu():
1032
+ w13.data = w13.transpose(-1, -2).contiguous()
1033
+ w2.data = w2.transpose(-1, -2).contiguous()
1034
+
1035
# Shuffle weights to runtime format and setup kernel.
1036
self._setup_kernel(
1037
layer,