[ROCm] gaurd on_gfx1250 call with rocm platform (#52625)
Signed-off-by: Kunshang Ji <kunshang.ji@intel.com>
This commit is contained in:
@@ -881,9 +881,13 @@ def w8a8_triton_block_scaled_mm(
|
||||
torch.Tensor: The result of matmul.
|
||||
"""
|
||||
|
||||
from vllm.platforms.rocm import on_gfx1250
|
||||
_on_gfx1250 = False
|
||||
if current_platform.is_rocm():
|
||||
from vllm.platforms.rocm import on_gfx1250
|
||||
|
||||
if on_gfx1250():
|
||||
_on_gfx1250 = on_gfx1250()
|
||||
|
||||
if _on_gfx1250:
|
||||
# Torch upcast reference: dequantize A,B to fp32 and matmul in fp32.
|
||||
# Avoids the gfx1250 native-fp8 block GEMM NaN bug. Correct but slow.
|
||||
_bn, _bk = block_size[0], block_size[1]
|
||||
|
||||
Reference in New Issue
Block a user