raipolymath commited on
Commit
9eb46ac
·
verified ·
1 Parent(s): 3dae300

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +54 -135
README.md CHANGED
@@ -1,135 +1,54 @@
1
- ---
2
- license: mit
3
- title: Triton Windows Pre-built Binaries
4
- sdk: static
5
- emoji:
6
- colorFrom: blue
7
- colorTo: green
8
- tags:
9
- - triton
10
- - windows
11
- - cuda
12
- - deep-learning
13
- - gpu
14
- ---
15
-
16
- # Triton for Windows - Pre-built Binaries
17
-
18
- **Developed by Dr. Ankush Rai** | [GitHub](https://github.com/RaiAnk)
19
-
20
- This repository hosts pre-built Windows binaries for [OpenAI Triton](https://github.com/triton-lang/triton), a language and compiler for writing highly efficient custom Deep-Learning primitives.
21
-
22
- ## Available Downloads
23
-
24
- ### Triton Wheels (Python)
25
-
26
- | Python | CUDA | Wheel | Size |
27
- |--------|------|-------|------|
28
- | 3.11 | 12.x | `wheels/triton-3.2.0+windows-cp311-cp311-win_amd64.whl` | ~100MB |
29
-
30
- ### Pre-built LLVM (Optional)
31
-
32
- If you want to build Triton from source or develop custom kernels:
33
-
34
- | File | Description | Size |
35
- |------|-------------|------|
36
- | `llvm/llvm-triton-windows-x64.zip` | LLVM with MLIR support | ~800MB |
37
-
38
- ## Installation
39
-
40
- ### Quick Install
41
-
42
- ```bash
43
- # 1. Download the wheel for your Python version
44
- # 2. Install with pip:
45
- pip install triton-3.2.0+windows-cp311-cp311-win_amd64.whl
46
- ```
47
-
48
- ### Using the Installer Script
49
-
50
- ```bash
51
- # Clone the source repository
52
- git clone https://github.com/RaiAnk/triton-windows.git
53
- cd triton-windows
54
-
55
- # Run installer (downloads from this HuggingFace repo)
56
- python install_triton_windows.py
57
- ```
58
-
59
- ## Requirements
60
-
61
- - **Windows 10/11 x64**
62
- - **Python 3.10, 3.11, or 3.12**
63
- - **NVIDIA CUDA Toolkit 12.x**
64
- - **PyTorch 2.4+ with CUDA support**
65
-
66
- ## Verify Installation
67
-
68
- ```python
69
- import triton
70
- import triton.language as tl
71
- import torch
72
-
73
- @triton.jit
74
- def add_kernel(x_ptr, y_ptr, output_ptr, n_elements, BLOCK_SIZE: tl.constexpr):
75
- pid = tl.program_id(axis=0)
76
- block_start = pid * BLOCK_SIZE
77
- offsets = block_start + tl.arange(0, BLOCK_SIZE)
78
- mask = offsets < n_elements
79
- x = tl.load(x_ptr + offsets, mask=mask)
80
- y = tl.load(y_ptr + offsets, mask=mask)
81
- output = x + y
82
- tl.store(output_ptr + offsets, output, mask=mask)
83
-
84
- # Test
85
- size = 1024
86
- x = torch.rand(size, device='cuda')
87
- y = torch.rand(size, device='cuda')
88
- output = torch.empty_like(x)
89
-
90
- grid = lambda meta: (triton.cdiv(size, meta['BLOCK_SIZE']),)
91
- add_kernel[grid](x, y, output, size, BLOCK_SIZE=256)
92
-
93
- print("Triton is working!" if torch.allclose(output, x + y) else "Error!")
94
- ```
95
-
96
- ## Source Code
97
-
98
- The modified Triton source code with Windows support is available at:
99
- - **GitHub**: https://github.com/RaiAnk/triton-windows
100
-
101
- ## Build from Source
102
-
103
- If you need to build from source (for unsupported Python versions or custom modifications):
104
-
105
- 1. Download pre-built LLVM from this repository
106
- 2. Extract to `C:\llvm-triton`
107
- 3. Set environment variables:
108
- ```cmd
109
- set LLVM_SYSPATH=C:\llvm-triton
110
- set LLVM_LIBRARY_DIR=C:\llvm-triton\lib
111
- set LLVM_INCLUDE_DIRS=C:\llvm-triton\include
112
- ```
113
- 4. Build Triton:
114
- ```cmd
115
- pip install -e .
116
- ```
117
-
118
- ## Known Limitations
119
-
120
- - AMD ROCm is not supported on Windows
121
- - Some advanced features may have limited functionality
122
- - Proton profiler has limited Windows support
123
-
124
- ## License
125
-
126
- Triton is licensed under the MIT License. See the [original repository](https://github.com/triton-lang/triton) for details.
127
-
128
- ## Credits
129
-
130
- - **Original Triton**: OpenAI and the Triton team
131
- - **Windows Port**: Dr. Ankush Rai
132
-
133
- ## Support
134
-
135
- For issues with Windows support, please open an issue on the GitHub repository.
 
1
+ ---
2
+ license: mit
3
+ tags:
4
+ - triton
5
+ - windows
6
+ - nvidia
7
+ - gpu
8
+ - cuda
9
+ - compiler
10
+ ---
11
+
12
+ # Triton for Windows (NVIDIA)
13
+
14
+ **Pre-built Windows wheels for Triton - NVIDIA GPUs only**
15
+
16
+ ## Author
17
+
18
+ **Dr. Ankush Rai**
19
+ - [GitHub](https://github.com/RaiAnk)
20
+ - [LinkedIn](https://www.linkedin.com/in/dr-ankush-rai-80722021a/)
21
+ - [YouTube](https://www.youtube.com/@AnkushRai_polymath)
22
+
23
+ ## Source Code
24
+
25
+ **GitHub:** [https://github.com/RaiAnk/triton-windows-nvidia](https://github.com/RaiAnk/triton-windows-nvidia)
26
+
27
+ ## Installation
28
+
29
+ Defaulting to user installation because normal site-packages is not writeable
30
+ Collecting triton==3.6.0+git84bd6d54
31
+ Downloading https://huggingface.co/raipolymath/triton-windows/resolve/main/triton-3.6.0+git84bd6d54-cp311-cp311-win_amd64.whl (2026.4 MB)
32
+ ---------------------------------------- 2.0/2.0 GB 11.7 MB/s eta 0:00:00
33
+ Installing collected packages: triton
34
+ Successfully installed triton-3.6.0+git84bd6d54
35
+
36
+ ## Requirements
37
+
38
+ - Windows 10/11 (64-bit)
39
+ - Python 3.11
40
+ - NVIDIA GPU (Compute Capability 8.0+)
41
+ - CUDA Toolkit 11.8+
42
+
43
+ ## About Triton
44
+
45
+ Triton was originally created by [Philippe Tillet](https://github.com/ptillet) as a research project at **Harvard University**. The project gained significant momentum when he joined OpenAI, who released it as an open-source Python-based DSL in 2021.
46
+
47
+ This Windows port focuses on **NVIDIA GPUs only** (AMD backend disabled due to LLVM compatibility issues on Windows).
48
+
49
+ ## Acknowledgments
50
+
51
+ - **Philippe Tillet** - Creator of Triton (Harvard University)
52
+ - **OpenAI** - For open-sourcing and continued development
53
+ - **LLVM Project** - Compiler infrastructure
54
+ - **NVIDIA** - CUDA toolkit