[GCU] Support gcu platform (#2702)

baseline: e7fa57ebae

Co-authored-by: yongqiangma <xing.wo@163.com>
This commit is contained in:
EnflameGCU
2025-07-08 13:00:52 +08:00
committed by GitHub
parent 26d5d737dd
commit d0f4d6ba3a
33 changed files with 2988 additions and 85 deletions

View File

@@ -69,6 +69,12 @@ class Platform:
"""
return paddle.is_compiled_with_custom_device("iluvatar_gpu")
def is_gcu(self) -> bool:
"""
whether platform is gcu
"""
return paddle.is_compiled_with_custom_device("gcu")
@classmethod
def get_attention_backend_cls(self, selected_backend):
"""Get the attention backend"""