Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
ShawnXuan committed Sep 4, 2024
1 parent 942556f commit 8cfd032
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions libai/utils/distributed.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,12 @@ def _init_distributed_env(self, cfg):
try:
import oneflow_npu
except ImportError:
raise ImportError(
"'oneflow_npu' is missing. Install it to use NPU devices."
)
raise ImportError("'oneflow_npu' is missing. Install it to use NPU devices.")
elif self._device_type == "xpu":
try:
import oneflow_xpu
except ImportError:
raise ImportError(
"'oneflow_xpu' is missing. Install it to use NPU devices."
)
raise ImportError("'oneflow_xpu' is missing. Install it to use NPU devices.")
elif self._device_type not in ("cuda", "npu", "xpu", "cpu"):
raise NotImplementedError(f"Unsupported device {self._device_type}")

Expand Down

0 comments on commit 8cfd032

Please sign in to comment.