From c032293a774de11e7f7f50b0b15e358ef4f587eb Mon Sep 17 00:00:00 2001 From: USTCKAY <1136780339@qq.com> Date: Tue, 25 Oct 2022 18:53:24 +0800 Subject: [PATCH] change judgment logic for multi device --- ppcls/static/train.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ppcls/static/train.py b/ppcls/static/train.py index 14eb661ed..ad1d92915 100755 --- a/ppcls/static/train.py +++ b/ppcls/static/train.py @@ -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: