[TPU] add tpu_inference (#27277)
Signed-off-by: Johnny Yang <johnnyyang@google.com>
This commit is contained in:
@@ -97,11 +97,3 @@ class TpuCommunicator(DeviceCommunicatorBase):
|
||||
def all_gather(self, input_: torch.Tensor, dim: int = -1) -> torch.Tensor:
|
||||
assert dim == -1, "TPUs only support dim=-1 for all-gather."
|
||||
return xm.all_gather(input_, dim=dim)
|
||||
|
||||
|
||||
if USE_TPU_INFERENCE:
|
||||
from tpu_inference.distributed.device_communicators import (
|
||||
TpuCommunicator as TpuInferenceCommunicator,
|
||||
)
|
||||
|
||||
TpuCommunicator = TpuInferenceCommunicator # type: ignore
|
||||
|
||||
Reference in New Issue
Block a user