[ROCm] fix import for on_gfx9 (#32783)
Signed-off-by: Divakar Verma <divakar.verma@amd.com>
This commit is contained in:
@@ -913,7 +913,14 @@ class BatchedTritonExperts(mk.FusedMoEPermuteExpertsUnpermute):
|
|||||||
activation_key: QuantKey | None,
|
activation_key: QuantKey | None,
|
||||||
) -> bool:
|
) -> bool:
|
||||||
p = current_platform
|
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))
|
p.is_cuda() and p.has_device_capability((8, 9))
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1922,7 +1922,14 @@ class TritonExperts(mk.FusedMoEPermuteExpertsUnpermute):
|
|||||||
activation_key: QuantKey | None,
|
activation_key: QuantKey | None,
|
||||||
) -> bool:
|
) -> bool:
|
||||||
p = current_platform
|
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))
|
p.is_cuda() and p.has_device_capability((8, 9))
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user