change judgment logic for multi device

pull/2415/head
USTCKAY 2022-10-25 18:53:24 +08:00 committed by Wei Shengyu
parent 0cec70bd22
commit c032293a77
1 changed files with 1 additions and 1 deletions

View File

@ -94,7 +94,7 @@ def main(args):
use_mlu = global_config.get("use_mlu", False)
use_ascend = global_config.get("use_ascend", False)
assert (
use_gpu and use_xpu and use_npu and use_mlu and use_ascend
use_gpu + use_xpu + use_npu + use_mlu + use_ascend <= 1
) is not True, "gpu, xpu, npu, mlu and ascend can not be true in the same time in static mode!"
if use_gpu: