TritonParse: A Compiler Tracer, Visualizer, and mini-Reproducer Generator for Triton Kernels
Project description
TritonParse
A comprehensive visualization and analysis tool for Triton IR files โ 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):
git clone https://github.com/meta-pytorch/tritonparse.git
cd tritonparse
pip install -e .
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
- ๐ Report Issues: GitHub Issues
- ๐ฌ Discussions: GitHub Discussions
- ๐ Documentation: TritonParse Wiki
๐ 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tritonparse-0.2.0.tar.gz.
File metadata
- Download URL: tritonparse-0.2.0.tar.gz
- Upload date:
- Size: 2.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89a72b1f1d97f4b366b882927a08b4a6a31365f1119f7f4207cf314bff4dcb0b
|
|
| MD5 |
9270017e9744fca3b56798ff9113dbd6
|
|
| BLAKE2b-256 |
27e0aed158dc8df87347a32b029d253b335baff6a5e612dcd4b6807800a9dbb1
|
File details
Details for the file tritonparse-0.2.0-py3-none-any.whl.
File metadata
- Download URL: tritonparse-0.2.0-py3-none-any.whl
- Upload date:
- Size: 42.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe16b624fb771f1c7dbcd2363ed6f6a72fa53c47266f97f5ba29af0e6c3f9ade
|
|
| MD5 |
304d45014ee2e98d7094e0669d5de3b2
|
|
| BLAKE2b-256 |
10bb7f11a8ba800501e7c641d304c2ca589926ec8c25be7725d9d1f5ff674bf2
|