A comprehensive visualization and analysis tool for Triton kernel compilation and launch β helping developers analyze, debug, and understand Triton kernel compilation processes.
π Try it online β
- π Launch Difference Analysis - Detect and visualize kernel launch parameter variations
- π IR Code View - Side-by-side IR viewing with synchronized highlighting and line mapping
- π File Diff View - Compare kernels across different trace files side-by-side
- π Multi-format IR Support - View TTGIR, TTIR, LLIR, PTX, and AMDGCN
- π― Interactive Code Views - Click-to-highlight corresponding lines across IR stages
- π Standalone Script Generation - Extract any kernel into a self-contained Python script
- πΎ Tensor Data Reconstruction - Preserve actual tensor data or use statistical approximation
- π― Custom Templates - Flexible reproducer templates for different workflows
- π Bug Isolation - Share reproducible test cases for debugging and collaboration
- π Compilation & Launch Tracing - Capture detailed events with source mapping
- π Stack Trace Integration - Full Python stack traces for debugging
- π Metadata Extraction - Comprehensive kernel statistics
- π Browser-based Interface - No installation required, works in your browser
- π Privacy-first - All processing happens locally, no data uploaded
import tritonparse.structured_logging
import tritonparse.utils
# Initialize logging
tritonparse.structured_logging.init("./logs/", enable_trace_launch=True)
# Your Triton/PyTorch code here
# ... your kernels ...
# Parse and generate trace files
tritonparse.utils.unified_parse("./logs/", out="./parsed_output")
π Example output (click to expand)
================================================================================
π TRITONPARSE PARSING RESULTS
================================================================================
π Parsed files directory: /scratch/findhao/tritonparse/tests/parsed_output
π Total files generated: 2
π Generated files:
1. π dedicated_log_triton_trace_findhao__mapped.ndjson.gz (7.2KB)
2. π log_file_list.json (181B)
================================================================================
β
Parsing completed successfully!
================================================================================
Visit https://meta-pytorch.org/tritonparse/ and open your local trace files (.ndjson.gz format).
π Privacy Note: Your trace files are processed entirely in your browser - nothing is uploaded to any server!
Extract any kernel into a standalone, executable Python script for debugging or testing:
# Generate reproducer from first launch event
tritonparse reproduce ./parsed_output/trace.ndjson.gz --line 2 --out-dir repro_output
# Run the generated reproducer
cd repro_output/<kernel_name>/
python repro_*.py
Python API:
from tritonparse.reproducer.orchestrator import reproduce
result = reproduce(
input_path="./parsed_output/trace.ndjson.gz",
line_index=1, # Which launch event (1-based)
out_dir="repro_output"
)
π― Common Reproducer Use Cases (click to expand)
- π Bug Isolation: Extract a failing kernel into a minimal standalone script
- β‘ Performance Testing: Benchmark specific kernels without running the full application
- π€ Team Collaboration: Share reproducible test cases with colleagues or in bug reports
- π Regression Testing: Compare kernel behavior and performance across different versions
- π Deep Debugging: Modify and experiment with kernel parameters in isolation
For basic usage (trace generation): Four options:
# install nightly version
pip install -U --pre tritonparse
# install stable version
pip install tritonparse
# install from source
git clone https://github.com/meta-pytorch/tritonparse.git
cd tritonparse
pip install -e .
# pip install the latest version from github
pip install git+https://github.com/meta-pytorch/tritonparse.git
Prerequisites: Python β₯ 3.10, Triton β₯ 3.4.0, GPU required (NVIDIA/AMD)
TritonParse relies on new features in Triton. Please install the latest version of Triton:
pip install triton
π Guide | Description |
---|---|
π Wiki Home | Complete documentation and quick navigation |
π¦ Installation | Setup guide for all scenarios |
π Usage Guide | Complete workflow, reproducer generation, and examples |
π Web Interface | Master the visualization interface |
π§ Developer Guide | Contributing and architecture overview |
π Code Formatting | Formatting standards and tools |
β FAQ | Quick answers and troubleshooting |
TritonParse visualizes the complete Triton compilation pipeline:
Python Source β TTIR β TTGIR β LLIR β PTX/AMDGCN
Each stage can be inspected and compared to understand optimization transformations.
We welcome contributions! Please see our Developer Guide for:
- Development setup and prerequisites
- Code formatting standards (Formatting Guide)
- Pull request and code review process
- Testing guidelines
- Architecture overview
- π Report Issues: GitHub Issues
- π¬ Discussions: GitHub Discussions
- π Documentation: TritonParse Wiki
This project is licensed under the BSD-3 License - see the LICENSE file for details.
β¨ Ready to get started? Visit our Installation Guide or try the online tool directly!