[ROCm] fix import for on_gfx9 (#32783)

Signed-off-by: Divakar Verma <divakar.verma@amd.com>
This commit is contained in:
Divakar Verma
2026-01-21 12:41:11 -06:00
committed by GitHub
parent f999539869
commit 180fba653e
2 changed files with 16 additions and 2 deletions

View File

@@ -913,7 +913,14 @@ class BatchedTritonExperts(mk.FusedMoEPermuteExpertsUnpermute):
activation_key: QuantKey | None,
) -> bool:
p = current_platform
device_supports_fp8 = (p.is_rocm() and p.rocm.on_gfx9()) or (
if p.is_rocm():
from vllm.platforms.rocm import on_gfx9
is_rocm_on_gfx9 = on_gfx9()
else:
is_rocm_on_gfx9 = False
device_supports_fp8 = is_rocm_on_gfx9 or (
p.is_cuda() and p.has_device_capability((8, 9))
)

View File

@@ -1922,7 +1922,14 @@ class TritonExperts(mk.FusedMoEPermuteExpertsUnpermute):
activation_key: QuantKey | None,
) -> bool:
p = current_platform
device_supports_fp8 = (p.is_rocm() and p.rocm.on_gfx9()) or (
if p.is_rocm():
from vllm.platforms.rocm import on_gfx9
is_rocm_on_gfx9 = on_gfx9()
else:
is_rocm_on_gfx9 = False
device_supports_fp8 = is_rocm_on_gfx9 or (
p.is_cuda() and p.has_device_capability((8, 9))
)