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 2, 07:15 UTC
[XPU][Bugfix] Fix per_token_group_fp8_quant missing dummy args on XPU (#43930)
Signed-off-by: Chaojun,Zhang <chaojun.zhang@intel.com> Co-authored-by: Kunshang Ji <kunshang.ji@intel.com>
Chaojun Zhang committed
Jun 2, 2026 at 11:09 UTC
a3a5a5ece59b31e1e218c3fe47ce02a90522b4a3
2 files changed
+11
-8
vllm/_xpu_ops.py
+10
-1
@@ -338,7 +338,16 @@ def _xpu_mxfp8_quantize_impl(
338
shape = x.shape[:-1] + (x.shape[-1] // MXFP8_BLOCK_SIZE,)
339
x_s = torch.empty(shape, device=x.device, dtype=torch.float32)
340
torch.ops._C.per_token_group_fp8_quant(
341
- x, x_q, x_s, MXFP8_BLOCK_SIZE, eps, fp8_min, fp8_max, True
341
+ x,
342
+ x_q,
343
+ x_s,
344
+ MXFP8_BLOCK_SIZE,
345
+ eps,
346
+ fp8_min,
347
+ fp8_max,
348
+ True,
349
+ False,
350
+ False, # dummy_is_scale_transposed, dummy_is_tma_aligned
351
)
352
x_s = x_s.to(torch.float8_e8m0fnu)
353
return x_q, x_s
vllm/model_executor/layers/quantization/utils/fp8_utils.py
+1
-7
@@ -575,7 +575,7 @@ def per_token_group_quant_fp8(
575
576
# prefer CUDA/XPU kernel if available
577
# TODO(bnell): this causes some fp8 moe test to fail.
578
- if current_platform.is_cuda() and x.is_contiguous():
578
+ if (current_platform.is_cuda() or current_platform.is_xpu()) and x.is_contiguous():
579
torch.ops._C.per_token_group_fp8_quant(
580
x,
581
x_q,
@@ -590,12 +590,6 @@ def per_token_group_quant_fp8(
590
)
591
return x_q, x_s
592
593
- if current_platform.is_xpu() and x.is_contiguous():
594
- torch.ops._C.per_token_group_fp8_quant(
595
- x, x_q, x_s, group_size, eps, fp8_min, fp8_max, use_ue8m0
596
- )
597
- return x_q, x_s
598
-
593
# TRITON FALLBACK
594
M = x.numel() // group_size
595
N = group_size