Commit 21723d7a authored by zhuwenwen's avatar zhuwenwen
Browse files

[Feature] Support fp8 on gfx938 (for fp8 moe backend)

parent 4f799f11
...@@ -188,6 +188,7 @@ _ON_GFX1X = any(arch in _GCN_ARCH for arch in ["gfx11", "gfx12"]) ...@@ -188,6 +188,7 @@ _ON_GFX1X = any(arch in _GCN_ARCH for arch in ["gfx11", "gfx12"])
_ON_GFX12X = any(arch in _GCN_ARCH for arch in ["gfx12"]) _ON_GFX12X = any(arch in _GCN_ARCH for arch in ["gfx12"])
_ON_MI3XX = any(arch in _GCN_ARCH for arch in ["gfx942", "gfx950"]) _ON_MI3XX = any(arch in _GCN_ARCH for arch in ["gfx942", "gfx950"])
_ON_GFX9 = any(arch in _GCN_ARCH for arch in ["gfx90a", "gfx942", "gfx950"]) _ON_GFX9 = any(arch in _GCN_ARCH for arch in ["gfx90a", "gfx942", "gfx950"])
_ON_GFX938 = "gfx938" in _GCN_ARCH
_ON_GFX90A = "gfx90a" in _GCN_ARCH _ON_GFX90A = "gfx90a" in _GCN_ARCH
_ON_GFX942 = "gfx942" in _GCN_ARCH _ON_GFX942 = "gfx942" in _GCN_ARCH
_ON_GFX950 = "gfx950" in _GCN_ARCH _ON_GFX950 = "gfx950" in _GCN_ARCH
...@@ -279,6 +280,9 @@ def on_mi3xx() -> bool: ...@@ -279,6 +280,9 @@ def on_mi3xx() -> bool:
def on_gfx9() -> bool: def on_gfx9() -> bool:
return _ON_GFX9 return _ON_GFX9
def on_gfx938() -> bool:
return _ON_GFX938
def on_gfx90a() -> bool: def on_gfx90a() -> bool:
return _ON_GFX90A return _ON_GFX90A
...@@ -802,7 +806,7 @@ class RocmPlatform(Platform): ...@@ -802,7 +806,7 @@ class RocmPlatform(Platform):
@classmethod @classmethod
def supports_fp8(cls) -> bool: def supports_fp8(cls) -> bool:
return on_gfx9() or on_gfx12x() return on_gfx938() or on_gfx9() or on_gfx12x()
@classmethod @classmethod
def is_fp8_fnuz(cls) -> bool: def is_fp8_fnuz(cls) -> bool:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment