Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
9f44e2f
[XPU] Prefer MXFP8 MoE XPU backend; forward softcap/ALIBI
krisclarkdev Jul 25, 2026
5306eec
Merge branch 'main' into xpu/mxfp8-prefer-softcap-forward
krisclarkdev Jul 29, 2026
a7e528f
Merge branch 'main' into xpu/mxfp8-prefer-softcap-forward
krisclarkdev Jul 29, 2026
b65df45
Merge branch 'main' into xpu/mxfp8-prefer-softcap-forward
krisclarkdev Jul 29, 2026
66fb8f6
Merge branch 'main' into xpu/mxfp8-prefer-softcap-forward
krisclarkdev Jul 29, 2026
12aeeca
Merge branch 'main' into xpu/mxfp8-prefer-softcap-forward
krisclarkdev Jul 29, 2026
e33910f
Merge branch 'main' into xpu/mxfp8-prefer-softcap-forward
krisclarkdev Jul 29, 2026
d13dd25
Merge branch 'main' into xpu/mxfp8-prefer-softcap-forward
krisclarkdev Jul 30, 2026
112c8f4
Merge branch 'main' into xpu/mxfp8-prefer-softcap-forward
krisclarkdev Jul 30, 2026
089334f
Merge branch 'main' into xpu/mxfp8-prefer-softcap-forward
krisclarkdev Jul 30, 2026
8eb477d
Merge branch 'main' into xpu/mxfp8-prefer-softcap-forward
krisclarkdev Jul 30, 2026
4ccc7ac
Merge branch 'main' into xpu/mxfp8-prefer-softcap-forward
krisclarkdev Jul 31, 2026
46ec952
Merge branch 'main' into xpu/mxfp8-prefer-softcap-forward
krisclarkdev Jul 31, 2026
68758a9
Merge branch 'main' into xpu/mxfp8-prefer-softcap-forward
krisclarkdev Aug 3, 2026
3583a18
Merge branch 'main' into xpu/mxfp8-prefer-softcap-forward
krisclarkdev Aug 9, 2026
0606af2
Merge branch 'main' into xpu/mxfp8-prefer-softcap-forward
krisclarkdev Aug 10, 2026
f0c33a6
Merge branch 'main' into xpu/mxfp8-prefer-softcap-forward
krisclarkdev Aug 10, 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
22 changes: 22 additions & 0 deletions docs/getting_started/installation/gpu.xpu.inc.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,28 @@ vLLM initially supports basic model inference and serving on Intel GPU platform.
!!! warning
The provided vllm-xpu-kernels whl is Python3.12 specific so this version is a MUST.

!!! note "XPU kernels runtime notes"
Install `vllm_xpu_kernels` from `requirements/xpu.txt` (release wheel by
default). Rebuild or reinstall that package when you change kernel configs.

Runtime notes (enforced by the kernels package):

- **Attention fail-closed (default):** missing FA2 / paged-decode AOT
shapes raise instead of silently falling back to a slow PyTorch
reference path. For eager debug only:
`export VLLM_XPU_ATTN_ALLOW_FALLBACK=1` (ignored under XPUGraph
capture). Softcap and ALiBi are not implemented on XPU FA2 and raise
when requested.
- **Page size 128:** default decode presets may include pagesize=128
shapes. Serve with `--block-size 128` to use them; otherwise keep the
usual page-64 path.
- **Native MXFP8 / block-FP8 MoE (Xe2):** fused MoE uses the native
grouped-GEMM path by default. Escape hatches:
`VLLM_XPU_FUSED_MOE_NATIVE_MXFP8=0`,
`VLLM_XPU_FUSED_MOE_NATIVE_BLOCK_FP8=0`, or
`VLLM_XPU_FUSED_MOE_USE_REF=1` (force the Python reference expert
loop for A/B).

--8<-- [end:requirements]
--8<-- [start:set-up-using-python]

Expand Down
6 changes: 4 additions & 2 deletions vllm/_xpu_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -994,6 +994,8 @@ def flash_attn_varlen_func(
assert len(window_size) == 2
real_window_size = (window_size[0], window_size[1]) # noqa: F841

# Forward softcap/alibi so the kernels package can fail closed when
# those features are requested but not implemented on XPU.
return flash_attn_varlen_func(
out=out,
q=q,
Expand All @@ -1009,8 +1011,8 @@ def flash_attn_varlen_func(
block_table=block_table,
s_aux=s_aux,
window_size=real_window_size,
# alibi_slopes = alibi_slopes,
# softcap=softcap,
alibi_slopes=alibi_slopes,
softcap=softcap if softcap is not None else 0.0,
return_softmax_lse=return_softmax_lse,
q_descale=q_descale,
k_descale=k_descale,
Expand Down
9 changes: 9 additions & 0 deletions vllm/envs.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,9 @@
VLLM_NIXL_EP_MAX_NUM_RANKS: int = 32
VLLM_XPU_ENABLE_XPU_GRAPH: bool = False
VLLM_XPU_USE_SAMPLER_KERNEL: bool = True
# Opt into slow PyTorch attention when an XPU FA2 shape is missing.
# Default (unset/0) is fail-closed in vllm-xpu-kernels.
VLLM_XPU_ATTN_ALLOW_FALLBACK: bool = False
VLLM_LORA_ENABLE_DUAL_STREAM: bool = False
VLLM_GPU_NIC_PCIE_MAPPING: str = ""
VLLM_NIC_SELECTION_VARS: str = ""
Expand Down Expand Up @@ -2044,6 +2047,12 @@ def _resolve_rust_cli_path() -> str | None:
"VLLM_XPU_USE_SAMPLER_KERNEL": lambda: bool(
int(os.getenv("VLLM_XPU_USE_SAMPLER_KERNEL", "1"))
),
# Opt into PyTorch reference attention when an XPU FA2 AOT shape is
# missing. Default is fail-closed (raise). Eager debug only; ignored
# under XPUGraph capture. Read by vllm-xpu-kernels at runtime.
"VLLM_XPU_ATTN_ALLOW_FALLBACK": lambda: bool(
int(os.getenv("VLLM_XPU_ATTN_ALLOW_FALLBACK", "0"))
),
# Enable simple KV offload.
"VLLM_USE_SIMPLE_KV_OFFLOAD": lambda: bool(
int(os.getenv("VLLM_USE_SIMPLE_KV_OFFLOAD", "0"))
Expand Down
9 changes: 8 additions & 1 deletion vllm/model_executor/layers/fused_moe/oracle/mxfp8.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,15 @@ def select_mxfp8_moe_backend(
)
return backend, _select_kernel_cls(backend, config)

# Prefer XPU on Intel GPU before trying CUDA/ROCm backends.
backends = _SUPPORTED_BACKENDS
if current_platform.is_xpu():
backends = (Fp8MoeBackend.XPU,) + tuple(
b for b in _SUPPORTED_BACKENDS if b != Fp8MoeBackend.XPU
)

# Auto-select: pick the first supported backend.
for backend in _SUPPORTED_BACKENDS:
for backend in backends:
try:
experts_cls = _select_kernel_cls(backend, config)
except ValueError:
Expand Down
Loading