在 Windows 上通过 cuda profile 安装后训练(microduck-walk-flat / motrix.fastsac)必现失败,collector 进程在 warmup 推理时报 TritonMissing。
现象
torch._inductor.exc.TritonMissing: Cannot find a working triton installation. Either the package is not installed or it is too old.
调用链:run_collector_process → collector.warmup_inference() → torch.compile(..., mode="reduce-overhead") → inductor 找不到 triton。
根因
- FastSAC 默认开启 torch.compile:
configs/algo_base/motrix.fastsac.yaml 中 agent.compile: true、trainer.async_options.collector_compile: true(均仅在 CUDA 生效)。mode="reduce-overhead" 走 inductor 后端,编译 kernel 依赖 triton。
- Linux 上 torch 的包依赖自带
triton(metadata 限定 platform_system == "Linux"),装完 torch 就有;但 PyPI 官方 triton 没有 Windows wheel,Windows 版 torch 也不声明该依赖。
- 因此 Windows 上无论安装流程多干净,triton 都必然缺失,
TritonMissing 是必现的——不是安装脚本漏装。
立即可用的 workaround(无需装任何东西)
关闭两个 compile 开关(功能一致,无 CUDA graph 加速,训练速度会有损失):
python scripts/train.py task=microduck-walk-flat/motrix.fastsac play=true algo.agent.compile=false algo.trainer.async_options.collector_compile=false
修复选项
| 方案 |
做法 |
代价 |
| A. 引入社区 wheel |
cuda extra 增加 triton-windows>=3.3,<3.4; sys_platform == 'win32'(torch 2.7.0 对应 Triton 3.3) |
triton-windows 要求用户安装 MSVC + Windows SDK(VS Build Tools);版本须与 torch 严格配套,升级 torch 需同步 pin |
| B. 平台守卫(推荐) |
启用 compile 的条件改为 device.type == "cuda" and sys.platform != "win32" |
Windows 训练慢 20-40%,但零门槛可跑 |
| C. 文档标注 |
README / installation 文档写明 Windows 需用上面的 override 关闭 compile |
无 |
建议 B + C 落地;需要 Windows 上保留 compile 性能的用户再按 A 的说明自行安装 VS Build Tools + triton-windows。
在 Windows 上通过 cuda profile 安装后训练(microduck-walk-flat / motrix.fastsac)必现失败,collector 进程在 warmup 推理时报
TritonMissing。现象
调用链:
run_collector_process→collector.warmup_inference()→torch.compile(..., mode="reduce-overhead")→ inductor 找不到 triton。install.ps1安装(PR feat: add ROCm support for AMD training via cuda/rocm extras #25 验证时发现)根因
configs/algo_base/motrix.fastsac.yaml中agent.compile: true、trainer.async_options.collector_compile: true(均仅在 CUDA 生效)。mode="reduce-overhead"走 inductor 后端,编译 kernel 依赖 triton。triton(metadata 限定platform_system == "Linux"),装完 torch 就有;但 PyPI 官方 triton 没有 Windows wheel,Windows 版 torch 也不声明该依赖。TritonMissing是必现的——不是安装脚本漏装。立即可用的 workaround(无需装任何东西)
关闭两个 compile 开关(功能一致,无 CUDA graph 加速,训练速度会有损失):
修复选项
cudaextra 增加triton-windows>=3.3,<3.4; sys_platform == 'win32'(torch 2.7.0 对应 Triton 3.3)device.type == "cuda" and sys.platform != "win32"建议 B + C 落地;需要 Windows 上保留 compile 性能的用户再按 A 的说明自行安装 VS Build Tools + triton-windows。