Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions _additional_platforms/xpu.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "XPU",
"support_channel": "https://github.com/pytorch/pytorch",
"stable": {
"linux": "pip3 install torch torchvision --index-url https://download.pytorch.org/whl/xpu",
"windows": "pip3 install torch torchvision --index-url https://download.pytorch.org/whl/xpu"
},
"preview": {
"linux": "pip3 install torch torchvision --pre --index-url https://download.pytorch.org/whl/nightly/xpu",
"windows": "pip3 install torch torchvision --pre --index-url https://download.pytorch.org/whl/nightly/xpu"
}
}
40 changes: 40 additions & 0 deletions _get_started/additional_platforms/xpu.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Installing on Intel GPU (XPU) Platform

XPU device backend brings native Intel GPU support to PyTorch, enabling performant training and inference on both Linux and Windows:

* Supports both eager and graph execution
* Built-in support for FP32, BF16, FP16, FP8 and AMP
* Broad operator coverage and model readiness
* Supports PyTorch CPP Extension API through SYCL-based custom kernels
* Enables training and inference workflows
* Scales across devices with distributed training via the `XCCL` backend

## Prerequisites

The system with configured Intel GPU card is required. For detailed list of supported devices and driver install instructions refer to [Getting Started on Intel GPU](https://docs.pytorch.org/docs/stable/notes/get_start_xpu.html).

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've decided to avoid duplication here with the getting started page and just note the need of Intel GPU card and redirect to existing documentation for the details.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. Make it simpler.


## Installation

### pip

Use the pip package manager to install PyTorch with XPU support. Select your preferred options in the selector above to get the installation command.

## Verification

To ensure that PyTorch was installed correctly with XPU support, run the following code:

```python

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one liner can be useful for quick test, eg:

python -c "import torch; print(f'XPU Devices: {torch.xpu.device_count()}'); [print(f' - {torch.xpu.get_device_name(i)}') for i in range(torch.xpu.device_count())]"

import torch
print(torch.__version__)

# Check XPU availability
if torch.xpu.is_available():
print("XPU is available!")
print(f"XPU devices: {torch.xpu.device_count()}")
else:
print("XPU is not available.")
```

## Documentation

For more information, please visit the [torch.xpu](https://docs.pytorch.org/docs/stable/xpu.html).