ERROR cuda runtime_error ai_generated true

RuntimeError: Triton compilation failed: LLVM ERROR

ID: cuda/triton-compilation-error

Also available as: JSON · Markdown
80%Fix Rate
82%Confidence
3Evidence
2023-01-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
12 active

Root Cause

torch.compile or Triton JIT failed to compile a kernel. Common with complex model architectures or unsupported operations.

generic

Workarounds

  1. 85% success Clear the Triton cache and retry
    rm -rf ~/.triton/cache && python train.py
  2. 88% success Fall back to eager mode for the failing operation
    model = torch.compile(model, mode='reduce-overhead')  # or disable: torch._dynamo.config.suppress_errors = True
  3. 80% success Set TORCH_COMPILE_DEBUG=1 to get the failing Triton IR
    TORCH_COMPILE_DEBUG=1 python train.py  # look for .ttir files in debug output

Dead Ends

Common approaches that don't work:

  1. Upgrade Triton to latest version independently of PyTorch 85% fail

    Triton version must match PyTorch; standalone upgrades cause ABI incompatibility

  2. Delete __pycache__ and retry 72% fail

    Triton caches in ~/.triton/cache, not __pycache__; wrong cache location