ERROR
cuda
runtime_error
ai_generated
true
RuntimeError: Triton compilation failed: LLVM ERROR
ID: cuda/triton-compilation-error
80%Fix Rate
82%Confidence
3Evidence
2023-01-01First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 12 | active | — | — | — |
Root Cause
torch.compile or Triton JIT failed to compile a kernel. Common with complex model architectures or unsupported operations.
genericWorkarounds
-
85% success Clear the Triton cache and retry
rm -rf ~/.triton/cache && python train.py
-
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
-
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:
-
Upgrade Triton to latest version independently of PyTorch
85% fail
Triton version must match PyTorch; standalone upgrades cause ABI incompatibility
-
Delete __pycache__ and retry
72% fail
Triton caches in ~/.triton/cache, not __pycache__; wrong cache location