Skip to content

Commit 322000d

Browse files
authored
Windows compile (#845)
* Custom python 3.13 entry in pyproject.toml * amend * Note about compile on Windows * update
1 parent 3b83705 commit 322000d

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

ch05/10_llm-training-speed/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,24 @@ After:
174174
- `Step tok/sec: 112046`
175175
- `Reserved memory: 6.1875 GB`
176176
177+
<br>
178+
179+
---
180+
181+
**Windows note**
182+
183+
- Compilation can be tricky on Windows
184+
- `torch.compile()` uses Inductor, which JIT-compiles kernels and needs a working C/C++ toolchain
185+
- For CUDA, Inductor also depends on Triton, available via the community package `triton-windows`
186+
- If you see `cl not found`, [install Visual Studio Build Tools with the "C++ workload"](https://learn.microsoft.com/en-us/cpp/build/vscpp-step-0-installation?view=msvc-170) and run Python from the "x64 Native Tools" prompt
187+
- If you see `triton not found` with CUDA, install `triton-windows` (for example, `uv pip install "triton-windows<3.4"`).
188+
- For CPU, a reader further recommended following this [PyTorch Inductor guide for Windows](https://docs.pytorch.org/tutorials/unstable/inductor_windows.html)
189+
- Here, it is important to install the English language package when installing Visual Studio 2022 to avoid a UTF-8 error
190+
- Also, please note that the code needs to be run via the "Visual Studio 2022 Developer Command Prompt" rather than a notebook
191+
- If this setup proves tricky, you can skip compilation; **compilation is optional, and all code examples work fine without it**
192+
193+
---
194+
177195
&nbsp;
178196
### 9. Vocabulary padding
179197

0 commit comments

Comments
 (0)