#179·csm

Inductor/triton backend ImportError: cannot import name 'triton_key' on Windows with torch.compile

Author: Victor1890Created May 3, 2026Updated May 3, 2026

Problem

When running this project (run_csm.py) on Windows with CUDA and modern ML library versions, attempting to use torch.compile or other inductor-backed acceleration fails with:

ImportError: cannot import name 'triton_key' from 'triton.compiler.compiler' (...\triton\compiler\compiler.py)
torch._dynamo.exc.BackendCompilerFailed: backend='inductor' raised:
  • This error occurs even when using the latest triton-windows (e.g. 3.6.0.post26).
  • It reproduces for torch 2.2.x, 2.3.x, and 2.4.x, with appropriate CUDA and Python on Windows.

What I've tried

  • Fresh virtual environment with torch 2.2/2.3/2.4 and triton-windows 3.6.0.post26.
  • Confirmed CUDA works (torch detects GPU).
  • Removed any NVIDIA tritonclient/conflicts.
  • Downgraded/upgraded all dependencies as needed.
  • The error appears as soon as torch.compile or inductor is invoked, even in official or community examples.

Impact

  • Cannot use PyTorch inductor/torch.compile for acceleration on Windows with this stack.
  • Locked to eager-only mode; advanced compilation/acceleration is unavailable.
  • Major dependencies (silentcipher, moshi, bitsandbytes) require torch >=2.2 or >=2.4 for core features.

Questions

  • Is there a plan to update triton-windows to work with newer torch & inductor (>=2.4)?
  • Is there a known workaround for enabling torch.compile/inductor acceleration in this scenario, or is Linux/WSL2 required?
  • What’s the best way to track the progress for Windows support for torch.compile/inductor?

System Info

  • Windows 11
  • CUDA 13.x drivers, NVIDIA RTX 3060
  • Python 3.10, virtualenv
  • torch 2.2/2.3/2.4, torchaudio/vision same version
  • triton-windows 3.6.0.post26 (latest pip at time of writing)
  • silentcipher 1.0.5, moshi 0.2.2, bitsandbytes 0.49.2

Any pointers, status updates, or documentation around inductor/triton support for Windows & torch 2.4+ would be greatly appreciated!