[diffusion][ROCm][Perf]: Set gfx942 AITER FMHA rounding mode to rtz instead of rtna (#28650)
Co-authored-by: jacky.cheng <yichiche@amd.com>
This commit is contained in:
co-authored by
jacky.cheng
parent
dd2ffdb680
commit
c41b2d26e5
@@ -33,6 +33,12 @@ _FMHA_FP8_HEAD_DIM = 128
|
||||
|
||||
_FP8_MAX = torch.finfo(_fp8_dtype).max
|
||||
|
||||
# AITER FAv3 on gfx942 supports three different rounding modes:
|
||||
# 0 = RTNE (round to nearest even)
|
||||
# 1 = RTNA (round to nearest away)
|
||||
# 2 = RTZ (round to zero)
|
||||
AITER_BF16_CVT_MODE: int = 2
|
||||
|
||||
|
||||
if _use_fp8_attn:
|
||||
logger.info("DiT FP8 attention enabled via SGLANG_DIFFUSION_AITER_FP8_ATTN=1")
|
||||
@@ -344,6 +350,7 @@ class AITerImpl(AttentionImpl):
|
||||
causal=self.causal,
|
||||
return_attn_probs=False,
|
||||
return_lse=False,
|
||||
how_v3_bf16_cvt=AITER_BF16_CVT_MODE,
|
||||
)
|
||||
return output
|
||||
|
||||
|
||||
Reference in New Issue
Block a user