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 DOI

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.parse.utils

# Initialize logging with full tracing options
tritonparse.structured_logging.init(
    "./logs/",
    enable_trace_launch=True,                 # Capture kernel launch events (enables torch.compile tracing automatically)
    enable_more_tensor_information=True,      # Optional: collect tensor statistics (min/max/mean/std)
)

# Your Triton/PyTorch code here
# ... your kernels ...

# Parse and generate trace files
tritonparse.parse.utils.unified_parse("./logs/", out="./parsed_output")

💡 Note: enable_trace_launch=True automatically enables tracing for both native Triton kernels (@triton.jit) and torch.compile / TorchInductor kernels.

📝 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 for the first launch event
# (--line is 0-based: line 0 is compilation event, line 1 is first launch event)
tritonparseoss reproduce ./parsed_output/trace.ndjson.gz --line 1 --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

Virtual-target capture

Capture a controlled eager script for a different GPU without executing its Triton kernels:

python -m tritonparse.capture --target hip:gfx950 --out ./virtual-traces capture_mm.py
# The same arguments are available as: tritonparseoss capture ...

Run each capture in a fresh process and use a new output directory. The initial profiles are H100 SXM5 (cuda:90), B200 (cuda:100), MI300X (hip:gfx942) and MI350X (hip:gfx950). These names fix processor counts and shared-memory budgets as well as the ISA; they are not defaults for every device with that ISA.

A real host GPU and its working PyTorch runtime are still required for tensor allocation and initialization. The target GPU is not required. The capture runtime currently supports Triton 3.9 and needs the full compiler tools for the selected backend, including AMD codegen and the linker for HIP targets, and a Blackwell-capable ptxas for cuda:100. For example, an H100 host can capture a B200 workload with --target cuda:100: allocations and streams remain on H100, while compilation and the supported target queries describe B200. Missing compiler tools are errors; capture never substitutes placeholder binaries.

The script must use eager dispatch with deterministic heuristics, a singleton configuration, or an explicitly selected configuration. Host Python and ordinary PyTorch operations still run. Triton outputs are unchanged by skipped launches, so the script must not inspect them to choose later dispatches or claim numerical correctness. This is not an emulator and does not detect arbitrary output-dependent Python. Benchmark-driven autotuning, CUDA graphs, torch.compile, in-process target switching, and GPU-free/FakeTensor capture are outside this initial scope.

Compilation and launch events carry virtual_target and runtime_validated: false; launch events additionally carry executed: false. The runtime preserves real argument binding and specialization, including nested tuples and integer grids. Register counts, occupancy and launch-time resource validity are not inferred. Tensor statistics, tensor blobs, external autotune caches and Manifold trace upload are disabled. Compiler caches are private to the capture and removed on exit. Runtime patches last until process exit.

Parse these traces normally. Parsing does not label virtual invocations as measured autotune winners. Offline parsing and static analysis do not require a GPU, but any later execution or reproducer run requires a suitable real target.

📚 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
⚙️ Environment Variables Complete environment variable reference
📖 Python API Reference Full API documentation
🔄 Reproducer Guide Comprehensive kernel reproducer guide

📊 Understanding Triton Compilation

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.

🤝 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

Citation

If you use TritonParse in your research, please cite our ASPLOS '27 paper:

@inproceedings{li2027tritonparse,
  author = {Li, Ying and Hao, Yueming and Berard, David and Zhao, Xu and Huang, Barney and Chi, Wenyuan and Tsai, Cheng-huan and Patel, Prithvi and Ramesh, Srivatsan and Ren, Manman and Yu, Hongtao and Wu, James and Zimmerman, Dan and Riasanovsky, Nicholas J. and Mainz, Adam and Maher, Bert and Hua, Peiying and Shi, Daohang and Robie, Taylor and Fang, Yuanwei and Zhu, Shuofei and Yu, Shangdi and Patel, Nikhil and Bao, Bin and Chen, Yang and Szczepaniec, Jan and Zhu, Haishan and Li, Patrick and Nay, Shane and Aziz, Adnan and Yoshimi, Bill and Loginov, Alexey and Sun, Yifan},
  title = {TritonParse: Multi-IR Provenance and Reproducible Debugging for Triton Kernel Compilation},
  year = {2027},
  isbn = {9798400730122},
  publisher = {Association for Computing Machinery},
  address = {New York, NY, USA},
  url = {https://doi.org/10.1145/3845814.3850058},
  doi = {10.1145/3845814.3850058},
  booktitle = {Proceedings of the 32nd ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 1},
  pages = {1021–1037},
  numpages = {17},
  keywords = {triton, compiler debugging, gpu kernels, multi-ir provenance, reproducibility},
  location = {Heraklion, Greece},
  series = {ASPLOS '27}
}

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

Metadata

Release files for tritonparse 0.7.1.dev20261118071550

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.7.1.dev20261118071550
File Size Uploaded Provenance Actions
tritonparse-0.7.1.dev20261118071550.tar.gz 2.5 MB With provenance Details for tritonparse-0.7.1.dev20261118071550.tar.gz

Built distribution (wheel)

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

Total release size: 2.9 MB

Release files / tritonparse-0.7.1.dev20261118071550.tar.gz

Download URL tritonparse-0.7.1.dev20261118071550.tar.gz
Size 2.5 MB
Tags Source
SHA-256 checksum
How to use checksums
a8f6bbef73a0d08d0d7def68f808dec78c631a21de42d15f92cd26ff81de0c62
BLAKE2b-256 checksum
How to use checksums
0b0d2d4a44d78d195c186fa90004bd0ca186b3fba6ee428bb0ea866ddd4c6ada
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Release files / tritonparse-0.7.1.dev20261118071550-py3-none-any.whl

Download URL tritonparse-0.7.1.dev20261118071550-py3-none-any.whl
Size 459.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5248cae2e767685357e1e2a8326fe467328f16a218b9966c15026054b150cdb6
BLAKE2b-256 checksum
How to use checksums
4faaa23c57c836df2f5e36e61e6b1c0a11f319f37ff7cb2e13add1159ab33879
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Security for tritonparse 0.7.1.dev20261118071550

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for tritonparse-0.7.1.dev20261118071550.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

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