[XPU]feat: enable FP8 block-scaled quantization on XPU (#42952)

Signed-off-by: Ma Jian <jian1.ma@intel.com>
Co-authored-by: Kunshang Ji <kunshang.ji@intel.com>
This commit is contained in:
Ma Jian
2026-05-23 12:33:18 +08:00
committed by GitHub
co-authored by Kunshang Ji
parent d28bdf9344
commit a5bbd81e2e
4 changed files with 23 additions and 5 deletions
@@ -307,6 +307,9 @@ _POSSIBLE_FP8_BLOCK_KERNELS: dict[
PlatformEnum.CPU: [
CPUFp8BlockScaledMMKernel,
],
PlatformEnum.XPU: [
TritonFp8BlockScaledMMKernel,
],
}
_POSSIBLE_WFP8A16_KERNELS: dict[PlatformEnum, list[type[FP8ScaledMMLinearKernel]]] = {
@@ -159,8 +159,8 @@ class TritonInt8ScaledMMLinearKernel(CutlassInt8ScaledMMLinearKernel):
class TritonFp8BlockScaledMMKernel(Fp8BlockScaledMMLinearKernel):
@classmethod
def is_supported(cls, compute_capability=None):
if not current_platform.is_cuda_alike():
return False, "only cuda like devices are supported."
if not (current_platform.is_cuda_alike() or current_platform.is_xpu()):
return False, "only cuda-like and xpu devices are supported."
return True, None
def apply_block_scaled_mm(