Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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