Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

TritonParse

License: BSD-3 GitHub Pages

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 →

✨ Key Features

🔍 Visualization & Analysis

  • 🚀 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

🔧 Reproducer & Debugging Tools

  • 🔄 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

📊 Structured Logging & Analysis

  • 📝 Compilation & Launch Tracing - Capture detailed events with source mapping
  • 🔍 Stack Trace Integration - Full Python stack traces for debugging
  • 📈 Metadata Extraction - Comprehensive kernel statistics

🛠️ Developer Tools

  • 🌐 Browser-based Interface - No installation required, works in your browser
  • 🔒 Privacy-first - All processing happens locally, no data uploaded

🚀 Quick Start

1. Installation

Four options to install:

# 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. If you're using nightly PyTorch, Triton is already included. Otherwise, install the latest Triton:

pip install triton

2. Generate Traces

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!
================================================================================

3. Visualize Results

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!

4. Generate Reproducers (Optional)

Extract any kernel into a standalone, executable Python script for debugging or testing:

# Generate reproducer from first launch event
tritonparseoss 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=0,           # 0-based index (first event is 0)
    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

📚 Complete Documentation

📖 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

📊 Understanding Triton Compilation

TritonParse visualizes the complete Triton compilation pipeline:

Python SourceTTIRTTGIRLLIRPTX/AMDGCN

Each stage can be inspected and compared to understand optimization transformations.

🤝 Contributing

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

📞 Support & Community

📄 License

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!

Release files for tritonparse 0.3.1.dev20251028071524

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tritonparse 0.3.1.dev20251028071524
File Size Uploaded
tritonparse-0.3.1.dev20251028071524.tar.gz 496.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tritonparse 0.3.1.dev20251028071524
File Interpreter ABI Platform
tritonparse-0.3.1.dev20251028071524-py3-none-any.whl Python 3 none any Details

Total release size: 568.9 kB

Release files / tritonparse-0.3.1.dev20251028071524.tar.gz

Download URL tritonparse-0.3.1.dev20251028071524.tar.gz
Size 496.6 kB
Tags Source
SHA-256 checksum
How to use checksums
a0bdf0ddf0250909073c6be912f77290d14c5eb86d7adfd19149a4923afafd8e
BLAKE2b-256 checksum
How to use checksums
1b10c2b9619612e25057acb15cf9d6fb646d79ecbaf1173d5cda33541e9cc039
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / tritonparse-0.3.1.dev20251028071524-py3-none-any.whl

Download URL tritonparse-0.3.1.dev20251028071524-py3-none-any.whl
Size 72.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8c4b375baa40e675e6404a3bc3bd49cb151a033b2ad2c9569f82d4fde5c8bc53
BLAKE2b-256 checksum
How to use checksums
e472c74bf4d7647ba700775da4ddf5129942620f7e6ce4d4ce02ac6a1e2ade26
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release history Release notifications | RSS feed

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.2

2 release files

0.3.1

2 release files

This release

0.3.0

2 release files

0.2.3

2 release files

0.2.0

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page