[AMD] Add an opt-in AITER CK blockscale GEMM for gfx942 block-FP8 linears (#41071)
Signed-off-by: siliangchen-amd <SiLiang.Chen@amd.com
This commit is contained in:
@@ -978,6 +978,8 @@ class Envs:
|
||||
SGLANG_AITER_MLA_VERIFY_BACKEND = EnvStr("asm")
|
||||
# Let aiter plan the KV splits for the asm persistent MLA decode.
|
||||
SGLANG_AITER_MLA_AUTO_KV_SPLITS = EnvBool(False)
|
||||
# Run gfx942 block-FP8 linears with the AITER CK blockscale GEMM instead of Triton.
|
||||
SGLANG_AITER_GFX942_BLOCKSCALE_USE_CK = EnvBool(False)
|
||||
|
||||
# DSV4 Aiter flags
|
||||
SGLANG_OPT_USE_AITER_SILU_MUL = EnvBool(False)
|
||||
|
||||
@@ -45,6 +45,7 @@ from sglang.srt.utils import (
|
||||
is_cuda,
|
||||
is_flashinfer_available,
|
||||
is_gfx95_supported,
|
||||
is_gfx942_supported,
|
||||
is_gfx1250_supported,
|
||||
is_hip,
|
||||
is_musa,
|
||||
@@ -74,6 +75,7 @@ _use_aiter = (
|
||||
get_bool_env_var("SGLANG_USE_AITER") and _is_hip and not _is_gfx1250_supported
|
||||
)
|
||||
_use_aiter_gfx95 = _use_aiter and _is_gfx95_supported
|
||||
_use_aiter_gfx942 = _use_aiter and is_gfx942_supported()
|
||||
# Conservative, not a tuned crossover: ptpc beat block-fp8 up to M=512 on
|
||||
# MiniMax-M3 TP4 gfx950 shapes, but lost past M=64 on narrow ones (K=768).
|
||||
MXFP8_DENSE_PTPC_DECODE_MAX_M = 128
|
||||
@@ -1476,6 +1478,8 @@ def aiter_w8a8_block_fp8_linear(
|
||||
use_triton = use_aiter_triton_gemm_w8a8_tuned_gfx950(n, k) or (
|
||||
_ck_safe_m is not None and input_2d.shape[0] > _ck_safe_m
|
||||
)
|
||||
elif _use_aiter_gfx942:
|
||||
use_triton = not envs.SGLANG_AITER_GFX942_BLOCKSCALE_USE_CK.get()
|
||||
else:
|
||||
use_triton = True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user