Skip to content

Commit

Permalink
fix bug that FLAGS_selected_xpus can't work (#1811)
Browse files Browse the repository at this point in the history
  • Loading branch information
QingshuChen authored Mar 21, 2022
1 parent 6ff5eab commit 08a2275
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions examples/machine_translation/transformer/static/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ def do_train(args):
places = paddle.static.cuda_places()
elif args.device == "xpu":
places = paddle.static.xpu_places()
paddle.set_device("xpu")
else:
places = paddle.static.cpu_places()
paddle.set_device("cpu")
Expand Down

0 comments on commit 08a2275

Please sign in to comment.