Unverified Commit 73f635a7 authored by XiongfeiWei's avatar XiongfeiWei Committed by GitHub
Browse files

[Bug] Add TPU backend option (#32438)


Signed-off-by: default avatarXiongfei Wei <isaacwxf23@gmail.com>
parent 35bf5d08
......@@ -32,6 +32,7 @@ class UnquantizedMoeBackend(Enum):
TRITON = "TRITON"
CPU = "CPU"
XPU = "XPU"
TPU = "TPU"
# NOTE(zyongye): Unsupported backend means backend
......@@ -40,6 +41,7 @@ class UnquantizedMoeBackend(Enum):
UNSUPPORTED_BACKEND = [
UnquantizedMoeBackend.CPU,
UnquantizedMoeBackend.XPU,
UnquantizedMoeBackend.TPU,
]
......@@ -91,6 +93,8 @@ def select_unquantized_moe_backend(
backend = UnquantizedMoeBackend.XPU
if current_platform.is_cpu():
backend = UnquantizedMoeBackend.CPU
if current_platform.is_tpu():
backend = UnquantizedMoeBackend.TPU
logger.info_once(_make_log_backend(backend), scope="local")
return backend
......
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