We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4877579 commit 3e66a58Copy full SHA for 3e66a58
accelerator/real_accelerator.py
@@ -144,7 +144,7 @@ def get_accelerator():
144
# Currently we can run on xpu device only using pytorch,
145
# also reserve the old path using ipex when the torch version is old.
146
if hasattr(torch, 'xpu'):
147
- if torch.xpu.device_count() > 0 and torch.xpu.is_available():
+ if torch.cuda.device_count() == 0 and torch.xpu.device_count() > 0 and torch.xpu.is_available():
148
accelerator_name = "xpu"
149
else:
150
pass
0 commit comments