Skip to content

Template for starting PyTorch projects with Intel GPUs (XPU) on Windows.

Notifications You must be signed in to change notification settings

Stanley5249/torch-test-xpu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

torch-test-xpu

Description

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.

Installation

  1. Clone the repository:

    git clone <repository-url>
    cd torch-test-xpu
  2. 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
  3. 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.

  4. 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.

License

This project is licensed under the MIT License.

About

Template for starting PyTorch projects with Intel GPUs (XPU) on Windows.

Topics

Resources

Stars

Watchers

Forks

Languages