You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, Triton needs to be built from source and installed. The PyTorch build process remains unchanged.
2.0.1. Windows Environment Setup
For more details about the env setting, please refer to this discussion.
Enable Long Path
# Enable long path for the system (Need admin)New-ItemProperty-Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem"-Name "LongPathsEnabled"-Value 1-PropertyType DWORD -Force
# Enable long path for git (Need admin)
git config --system core.longpaths true
git config --global core.longpaths true
Enable Symlink Creation
Activate developer mode. It allows normal user to create symlinks, which may lead build failures during Triton build.
2.0.2. Build PyTorch
Use the branch in pytorch/pytorch#144303 . All the steps are the same with existing BKC.
2.0.3. Build Triton
Use the pinned commit in the above PR.
Download Level Zero SDK
Please download level-zero-win-sdk-*.zip from https://github.com/oneapi-src/level-zero/releases. We tried with v1.19.2.
Unzip the file and put the folder to some path like C:\level_zero.
Build Triton
Open the Intel oneAPI command prompt for Intel 64 for Visual Studio 2022 or activate oneAPI env by:
One can also use python setup.py bdist_wheels in triton\python to get the wheels. Then pip install dist\*.whl.
3. Running Setup
The overall running setup is the same. One additional step is to be sure to add level-zero to ZE_PATH:
setZE_PATH=C:\level_zero
Then one could run the tests. Before running tests (especially PyTorch UT), please clean the TEMP folder to reduce size.
Due to the limitations of Windows OS, the TEMP may not be cleaned automatically.
del /q %TEMP%\* &rd /s /q %TEMP%
Then you could run like below:
cd pytorch\test\inductor
pytest -v -k xpu test_torchinductor.py
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
This document provides early experimental support for
torch.compile
on Windows with XPU. It tracks the status and known issues.1. Overall Branch
Refer to the PyTorch PR: pytorch/pytorch#144303. Use the branch specified in that PR.
For Triton, use the branch: https://github.com/intel/intel-xpu-backend-for-triton/tree/hot-fixes-for-pytorch.
2. Build Steps
Currently, Triton needs to be built from source and installed. The PyTorch build process remains unchanged.
2.0.1. Windows Environment Setup
For more details about the env setting, please refer to this discussion.
Activate developer mode. It allows normal user to create symlinks, which may lead build failures during Triton build.
2.0.2. Build PyTorch
Use the branch in pytorch/pytorch#144303 . All the steps are the same with existing BKC.
2.0.3. Build Triton
Use the pinned commit in the above PR.
Download Level Zero SDK
Please download
level-zero-win-sdk-*.zip
from https://github.com/oneapi-src/level-zero/releases. We tried withv1.19.2
.Unzip the file and put the folder to some path like
C:\level_zero
.Build Triton
Open the
Intel oneAPI command prompt for Intel 64 for Visual Studio 2022
or activate oneAPI env by:"C:\Program Files (x86)\Intel\oneAPI\<toolkit-version>\oneapi-vars.bat"
Set the following env flag for Triton build:
Build Triton. Please put the triton folder in a shallow folder path (e.g.,
C:\triton
)One can also use
python setup.py bdist_wheels
intriton\python
to get the wheels. Thenpip install dist\*.whl
.3. Running Setup
The overall running setup is the same. One additional step is to be sure to add level-zero to
ZE_PATH
:Then one could run the tests. Before running tests (especially PyTorch UT), please clean the TEMP folder to reduce size.
Due to the limitations of Windows OS, the TEMP may not be cleaned automatically.
Then you could run like below:
Beta Was this translation helpful? Give feedback.
All reactions