|
| 1 | +# Installing on Intel GPU (XPU) Platform |
| 2 | + |
| 3 | +XPU is a PyTorch device backend designed to support hardware acceleration on Intel GPUs. Key technical features: |
| 4 | + |
| 5 | +* Native support for FP32, BF16, FP16, and Automatic Mixed Precision (AMP) |
| 6 | +* Extensions of operator set through custom SYCL kernels |
| 7 | +* Graph compilation |
| 8 | +* Distributed training (through `XCCL`) |
| 9 | + |
| 10 | +## Prerequisites |
| 11 | + |
| 12 | +### Hardware Requirements |
| 13 | + |
| 14 | +* Intel Client GPU: |
| 15 | + |
| 16 | + * Intel® Arc A-Series Graphics (CodeName: Alchemist) |
| 17 | + * Intel® Arc B-Series Graphics (CodeName: Battlemage) |
| 18 | + * Intel® Core™ Ultra Processors with Intel® Arc™ Graphics (CodeName: Meteor Lake-H) |
| 19 | + * Intel® Core™ Ultra Processors (Series 2) with Intel® Arc™ Graphics (CodeName: Arrow Lake-H) |
| 20 | + * Intel® Core™ Ultra Mobile Processors (Series 2) with Intel® Arc™ Graphics (CodeName: Lunar Lake) |
| 21 | + |
| 22 | +* Intel Data Center GPU: |
| 23 | + |
| 24 | + * Intel® Data Center GPU Max Series (CodeName: Ponte Vecchio) |
| 25 | + |
| 26 | +### Software Requirements |
| 27 | + |
| 28 | +* [Intel GPU Driver](https://www.intel.com/content/www/us/en/developer/articles/tool/pytorch-prerequisites-for-intel-gpu.html) |
| 29 | +* Python 3.10 or later |
| 30 | + |
| 31 | +## Installation |
| 32 | + |
| 33 | +### pip |
| 34 | + |
| 35 | +Use the pip package manager to install PyTorch with XPU support. Select your preferred options in the selector above to get the installation command. |
| 36 | + |
| 37 | +## Verification |
| 38 | + |
| 39 | +To ensure that PyTorch was installed correctly with XPU support, run the following code: |
| 40 | + |
| 41 | +```python |
| 42 | +import torch |
| 43 | +print(torch.__version__) |
| 44 | + |
| 45 | +# Check XPU availability |
| 46 | +if torch.xpu.is_available(): |
| 47 | + print("XPU is available!") |
| 48 | + print(f"XPU devices: {torch.xpu.device_count()}") |
| 49 | +else: |
| 50 | + print("XPU is not available.") |
| 51 | +``` |
| 52 | + |
| 53 | +## Documentation |
| 54 | + |
| 55 | +For more information, please visit the [Getting Started on Intel GPU](https://docs.pytorch.org/docs/stable/notes/get_start_xpu.html). |
0 commit comments