Skip to main content

TritonParse: A Compiler Tracer, Visualizer, and mini-Reproducer Generator for Triton Kernels

Project description

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

  • ๐Ÿš€ Launch Difference Analysis - Automatically detect and visualize variations in kernel launch parameters, helping you pinpoint performance bottlenecks and debug launch configurations.
  • ๐Ÿ” Interactive Visualization - Explore Triton kernels with detailed metadata and stack traces
  • ๐Ÿ“Š Multi-format IR Support - View TTGIR, TTIR, LLIR, PTX, and AMDGCN in one place
  • ๐Ÿ”„ Side-by-side Comparison - Compare IR stages with synchronized highlighting
  • ๐Ÿ“ Structured Logging - Capture detailed compilation and launch events with source mapping
  • ๐ŸŒ Ready-to-use Interface - No installation required, works in your browser
  • ๐Ÿ”’ Privacy-first - All processing happens locally in your browser, no data uploaded

๐Ÿš€ Quick Start

1. Generate Traces

import tritonparse.structured_logging

# Initialize logging with launch tracing enabled
tritonparse.structured_logging.init("./logs/", enable_trace_launch=True)

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

# Parse and generate trace files
import tritonparse.utils
tritonparse.utils.unified_parse("./logs/")

The example terminal output is:

tritonparse log file list: /tmp/tmp1gan7zky/log_file_list.json
INFO:tritonparse:Copying parsed logs from /tmp/tmp1gan7zky to /scratch/findhao/tritonparse/tests/parsed_output

================================================================================
๐Ÿ“ 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!
================================================================================

2. 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!

๐Ÿ› ๏ธ Installation

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

๐Ÿ“š Complete Documentation

๐Ÿ“– Guide Description
๐Ÿ  Wiki Home Complete documentation and navigation
๐Ÿ“ฆ Installation Guide Detailed setup for all scenarios
๐Ÿ“‹ Usage Guide Complete workflow and examples
๐ŸŒ Web Interface Guide Master the visualization interface
๐Ÿ”ง Developer Guide Contributing and development setup
โ“ FAQ Frequently asked questions

๐Ÿ› ๏ธ Tech Stack

  • Frontend: React 19, TypeScript, Vite, Tailwind CSS, Monaco Editor
  • Backend: Python with Triton integration, structured logging
  • Deployment: GitHub Pages, automatic deployment

๐Ÿ“Š 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
  • Code formatting standards
  • Pull request process
  • 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!

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tritonparse-0.2.4.dev20251001071529.tar.gz (2.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tritonparse-0.2.4.dev20251001071529-py3-none-any.whl (55.9 kB view details)

Uploaded Python 3

File details

Details for the file tritonparse-0.2.4.dev20251001071529.tar.gz.

File metadata

File hashes

Hashes for tritonparse-0.2.4.dev20251001071529.tar.gz
Algorithm Hash digest
SHA256 5579944751efe124fda6e2b5831ee163ed5b005f1173bd72b51d3ae9f76b85a1
MD5 c031a492e1aa0db33b5c5b2c99fb6c94
BLAKE2b-256 8025bd3d1d50ada3ed2d6d15b2f244c0aee553eedb88b0af4c8fbdb8c16bfcba

See more details on using hashes here.

File details

Details for the file tritonparse-0.2.4.dev20251001071529-py3-none-any.whl.

File metadata

File hashes

Hashes for tritonparse-0.2.4.dev20251001071529-py3-none-any.whl
Algorithm Hash digest
SHA256 9d7a707b617c595f7dfc9957c1d462bc4fcd9710fcee955336a630c58d1417b2
MD5 0f1bc3037f789055f5a0c8681b1b7b96
BLAKE2b-256 ffbd7876c8818ae53df6da17e5a634624cc9bafd9972bb4d35c8b7b83d3022bf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page