@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 1cbcfb94de
Fork 0

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 14, 05:30 UTC

[Bugfix][CPU] Skip unsupported custom op register on CPU (#25534)

Signed-off-by: jiang1.li <jiang1.li@intel.com>

Li, Jiang committed Sep 24, 2025 at 14:21 UTC 1cbcfb94ded21da2b922b452c1e90baef87e419b
1 file changed +8 -6
vllm/model_executor/layers/quantization/utils/fp8_utils.py
+8 -6
@@ -130,12 +130,14 @@ def _w8a8_triton_block_scaled_mm_fake(
130 device=qx.device)
131
132
133 -direct_register_custom_op(
134 - "w8a8_triton_block_scaled_mm_func",
135 - _w8a8_triton_block_scaled_mm_func,
136 - fake_impl=_w8a8_triton_block_scaled_mm_fake,
137 - dispatch_key="CUDA",
138 -)
133 +# Note: the check can be removed when CPU torch > 2.7
134 +if not current_platform.is_cpu():
135 + direct_register_custom_op(
136 + "w8a8_triton_block_scaled_mm_func",
137 + _w8a8_triton_block_scaled_mm_func,
138 + fake_impl=_w8a8_triton_block_scaled_mm_fake,
139 + dispatch_key="CUDA",
140 + )
141
142
143 # TODO fix ROCm->Triton custom path: