Template for starting PyTorch projects with Intel GPUs (XPU) on Windows. For more information, follow the official guide here. This repository is related to the correct steps for installation, as discussed here.
-
Clone the repository:
git clone <repository-url> cd torch-test-xpu
-
Set up the environment and install dependencies for PyTorch:
With pip:
python -m venv .venv pip install -r requirements.txt --extra-index-url "https://download.pytorch.org/whl/test/xpu"
With uv:
uv is an alternative to pip that is personally recommended. You need to install it first. See the installation guide.
uv sync
-
PyTorch Prerequisites for Intel GPUs:
Go to the Intel guide, and follow the steps in the Build for Intel Client GPUs > Install for Windows 10/11 section.
-
Additional Notes:
Ensure you have Microsoft Visual Studio installed. The Intel Support Package will notify you if it's missing. Download Visual Studio from here. For a lightweight option, on the same page, go to All Downloads > Tools for Visual Studio, and download the Build Tools for Visual Studio. Remember to set the Path variable.
The oneAPI Environment script only works on CMD; it will not work on PowerShell. For how to automatically source the environment within VSCode, see .vscode/settings.json.
This project is licensed under the MIT License.