Triton is a Python-based framework that supports developers to write kernels.

Codegen mode vs Interpreter mode

Check if the results are the same between two modes

Codegen Mode

In codegen mode, Triton:

Interpreter Mode

In interpreter mode, Triton:

Key Differences

Aspect Codegen Mode Interpreter Mode
Performance Higher for stable workloads Lower but more flexible
Startup Time Longer (compilation needed) Faster
Memory Usage Higher (stores compiled code) Lower
Runtime Flexibility Limited High
Use Case Production, stable algorithms Development, dynamic algorithms