Skip to content

PTQ-Level Efficiency, QAT-Level Accuracy | 训练后量化的效率,量化感知训练的精度

docs: explain Windows Triton compilation prerequisites (#2432)

Shubham Padkonde8cef3d9ba5e4
diff --git a/docs/step_by_step.md b/docs/step_by_step.md
index 8a602b0b0..31e0baedf 100755
--- a/docs/step_by_step.md
+++ b/docs/step_by_step.md
@@ -956,10 +956,17 @@ autoround.save_quantized(format="auto_awq", output_dir="tmp_autoround")
- or combine them
- `torch.compile` is disabled by default on Windows because TorchInductor requires the MSVC `cl.exe` compiler. Windows
+ `torch.compile` is disabled by default on Windows because TorchInductor needs a compatible compiler toolchain. Windows
users can pass `enable_torch_compile=True` to the Python API or use `--enable_torch_compile` to force enable it. On
other platforms, pass `enable_torch_compile=False` or use `--disable_torch_compile` to opt out.
+ For NVIDIA GPUs on Windows, install a CUDA-enabled PyTorch build and a compatible `triton-windows` version in the
+ same Python environment as AutoRound before enabling compilation. Follow the
+ [Triton for Windows installation guide](https://github.com/triton-lang/triton-windows) for the PyTorch/Triton version
+ matrix, supported GPUs, and compiler requirements. Do not simply install the newest Triton version with an older
+ PyTorch build. Enabling `--enable_torch_compile` alone does not install these dependencies; a `TritonMissing` error
+ means the compilation environment still needs attention. Keep compilation disabled until the prerequisites are met.
+
- **Enable quantized lm-head:**
diff --git a/docs/step_by_step_CN.md b/docs/step_by_step_CN.md
index e9bcbb7ee..b40b40ccb 100755
--- a/docs/step_by_step_CN.md
+++ b/docs/step_by_step_CN.md
@@ -921,10 +921,17 @@ autoround.save_quantized(format="auto_awq", output_dir="tmp_autoround")
- 将 `seqlen` 降至 512(**部分场景可能出现大幅精度损失**)
- 将 `bs` 降至 4(**仅有轻微精度损失**)
-Windows 上默认关闭 `torch.compile`,因为 TorchInductor 需要 MSVC 的 `cl.exe` 编译器。Windows 用户可在
+Windows 上默认关闭 `torch.compile`,因为 TorchInductor 需要兼容的编译工具链。Windows 用户可在
Python API 中传入 `enable_torch_compile=True`,或使用命令行参数 `--enable_torch_compile` 强制开启。其他
平台如需关闭,可传入 `enable_torch_compile=False` 或使用 `--disable_torch_compile`。
+在 Windows 上使用 NVIDIA GPU 时,请先在与 AutoRound 相同的 Python 环境中安装支持 CUDA 的 PyTorch
+及兼容版本的 `triton-windows`,然后再开启编译。请按照
+[Triton for Windows 安装指南](https://github.com/triton-lang/triton-windows) 中的 PyTorch/Triton 版本对应表、
+GPU 支持范围和编译器要求配置环境,不要直接为旧版 PyTorch 安装最新版 Triton。
+仅设置 `--enable_torch_compile` 不会安装这些依赖;出现 `TritonMissing` 错误说明编译环境仍需配置。
+在满足这些前提条件之前,请保持编译关闭。
+
#### 开启 lm-head 层量化
该配置目前**仅支持 AutoRound 原生格式的推理**,命令行启用方式如下:
```bash