intel / intel-extension-for-pytorch

A Python package for extending the official PyTorch that can easily obtain performance on Intel platform
Apache License 2.0
1.61k stars 246 forks source link

Is there support for embedding on xpu? #392

Closed evelinamorim closed 4 months ago

evelinamorim commented 1 year ago

Describe the issue

If I tried the following lines of code:

import torch

embedding = torch.nn.Embedding(10, 3)
embedding.to('xpu')

And I got the following error:

 PyTorch is not linked with support for xpu devices

So, is there any support for Embedding layer in the intel-extension?

gujinghui commented 1 year ago

pls import ipex first.

import torch
import intel_extension_for_pytorch
evelinamorim commented 1 year ago

Ok. Sorry, I thought that the installed version of pytorch version was enough.