How to Install Triton on Windows

Triton, an open-source framework developed by OpenAI, is widely used for optimizing GPU workloads in machine learning and AI applications. However, until recently, running Triton on Windows was a major challenge since official support was limited to Linux.

Thanks to the woct0rdho/triton-windows project, we now have a way to install Triton natively on Windows. This removes the need for WSL, making it easier for Windows users to leverage Triton’s powerful GPU acceleration for deep learning, AI model training, and Stable Diffusion optimizations.

In this guide, I’ll walk you through the process of installing Triton on Windows using the triton-windows fork. By the end, you’ll have Triton running smoothly on your Windows machine, ready for AI and deep learning tasks.

Requirements

Python

Python 3.9 ~ 3.13 are supported. In this article, I am going to use 3.12.8 as an example.

PyTorch

Install PyTorch >=2.6 with CUDA 12 support. The command is

pip install torch==2.6.0 torch --index-url https://download.pytorch.org/whl/cu126

or

python_embeded\python -m pip install torch==2.6.0 torch --index-url https://download.pytorch.org/whl/cu126

if you are using the python_embeded under ComfyUI.

CUDA

Install CUDA toolkit 12.6 from CUDA toolkit archive. Make sure you choose CUDA Development and CUDA Runtime when installing. You also need to add the CUDA installation folder to the Windows PATH environment variable. The path is C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6\bin.

Visual Studio Build Tools

Dowload Build Tools for Visual Studio 2022 from this link. Add cl.exe to your Windows PATH variable. The path is something like C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.43.34808\bin\Hostx64\x64. Depending on the version you install, the exact path might be different.

Visual C++ Redistributable

Download vcredist from this link and install it.

Installation

The actual installation is quite simple. Several wheel packages are provided. Please see this release link for available wheels.

The command is

pip install https://github.com/woct0rdho/triton-windows/releases/download/v3.2.0-windows.post10/triton-3.2.0-cp312-cp312-win_amd64.whl

or

python_embeded\python -m pip install https://github.com/woct0rdho/triton-windows/releases/download/v3.2.0-windows.post10/triton-3.2.0-cp312-cp312-win_amd64.whl

for ComfyUI. There is an extra step that you have to do for python_embeded. You will need two folders include and libs from the version of Python for your python_embeded version. If you don’t have the version of Pyhton on your system, but you have Anaconda or miniconda installed. You can get these two folders from Anaconda. Here is what you do. Open up an Anaconda prompt and type:s

conda create -n "Python-3-12-8" python=3.12.8

Remember to replace the version number of your python_embeded version. After the environment is created. Type the following to find the location of the environment:

conda activate Python-3-12-8
conda list system

The location of the environment is listed. The path is like C:\Users\username\.conda\envs\Python-3-12-8

Open up File Explorer and browse to the path. Note that the .conda is a hidden folder, so you might have to copy the path and paste that to the address bar of File Explorer. The two folders are shown in this screenshot.

Copy these two folders and paste them to the python_embeded directory. That’s it.

Conclusion

With the triton-windows fork, installing Triton on Windows is now a reality. This breakthrough makes it easier for developers, AI researchers, and Stable Diffusion users to take advantage of Triton’s optimizations without switching to Linux or WSL.

Whether you’re working on deep learning models, optimizing AI inference, or accelerating GPU workloads, having Triton on Windows opens up new possibilities. If you encounter any issues, consider checking the GitHub repository for updates or troubleshooting tips.

Now that you have Triton running natively on Windows, what will you build next? 🚀


This post may contain affiliated links. When you click on the link and purchase a product, we receive a small commision to keep us running. Thanks.


Be the first to comment

Leave a Reply