Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Intel PyTorch extension #188

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

do-jason
Copy link

This will add Intel(R) Extension for PyTorch which is for Intel(R) GPU support.
This needs Intel patched PyTorch and extension and one can refer https://intel.github.io/intel-extension-for-pytorch/index.html#installation?platform=gpu&version=v2.1.10%2Bxpu page for installation.

This contains the below changes.

  • "import intel_extension_for_pytorch as ipex" is needed for Intel GPU and it is optional in Python code to make it work on platform which does not have this package installed.
  • torch.xpu is replacement for torch.cuda and this is explicitly used when necessary.
  • topaz/cuda.py is replaced by topaz/gpu.py file which is more generic.
  • Most use_cuda=True function argument is replaced by device='cpu'.
  • torch.*.cuda() is replaced by torch.*.to(device) where device could be 'cpu'|'cuda'|'xpu'.
  • There is limitation in using torch.nn.Parallel on Intel GPU.
  • ipex.optimize() is additional optimization on Intel GPU. This is added and commented out since not all configuration is supported as of now. This is for future usage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant