fix: debug

pull/2421/head^2
gaotingquan 2022-10-28 11:08:04 +00:00 committed by Wei Shengyu
parent f3aaa7356f
commit 8fb6cc5382
1 changed files with 2 additions and 2 deletions

View File

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