Experimental Intel Arc transformers support (untested)
This commit is contained in:
parent
8cce1f1126
commit
b88b2b74a6
2 changed files with 4 additions and 0 deletions
|
|
@ -137,6 +137,8 @@ def huggingface_loader(model_name):
|
|||
if torch.backends.mps.is_available():
|
||||
device = torch.device('mps')
|
||||
model = model.to(device)
|
||||
elif hasattr(torch, 'xpu') and torch.xpu.is_available():
|
||||
model = model.to('xpu')
|
||||
else:
|
||||
model = model.cuda()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue