tlparse
Parse TORCH_LOG logs produced by PyTorch torch.compile
What it is and what it does
tlparse is a command-line tool that consumes structured trace logs produced by PyTorch's torch.compile feature (via the TORCH_TRACE environment variable) and generates HTML files for visual analysis. It is written in Rust and distributed as a Python package with precompiled wheels for multiple architectures.
The tool's primary use is post-hoc inspection of torch.compile execution traces. It accepts a directory of structured logs and outputs formatted HTML reports. The package also supports extension through custom parsers implemented as Rust traits, allowing users to add domain-specific analysis on top of the base trace data.
Use it for:
- Analyze torch.compile performance bottlenecks by visualizing structured trace logs as interactive HTML reports.
- Debug compilation failures or unexpected behavior by inspecting detailed trace metadata and payloads.
- Build custom analysis tools by implementing StructuredLogParser traits to extract domain-specific metrics from traces.
- Monitor multi-rank distributed training by processing trace logs from different ranks and generating comparative reports.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
tlparse parses structured PyTorch torch.compile trace logs and generates HTML analysis files from the output.
Yes, if you actively use torch.compile and need to analyze its execution traces. The tool is actively maintained, has no known vulnerabilities, and runs on common platforms. Medium install friction is acceptable for a specialized profiling tool. Not necessary if you do not use torch.compile or do not require detailed trace analysis.
Install
tlparse on PyPI
pip
pip install tlparseuv
uv add tlparsepoetry
poetry add tlparseInstalling tlparse
Before you install
Medium install friction due to compiled wheels for multiple platforms (x86_64, ARM, PowerPC, s390x on Linux; x86_64 and ARM on macOS; Windows). Active maintenance with a recent commit on 2026-05-11 and no known vulnerabilities.
License in practice
BSD-3-Clause is permissive; you can use, modify, and distribute tlparse with minimal restrictions, provided you retain the license notice.
Quickstart
# Set environment variable and run PyTorch code
export TORCH_TRACE=/tmp/my_traced_log_dir
python example.py
# Parse the trace logs
tlparse /tmp/my_traced_log_dir -o tl_out/
Requires PyTorch with torch.compile support and Python >= 3.6; TORCH_TRACE environment variable must point to a valid directory.
Verify before relying
- Whether custom parser extension (Rust trait implementation) requires recompilation or if dynamic loading is supported.
- Performance characteristics and typical analysis time for large trace logs.
- HTML output format and browser compatibility requirements.
Package facts
| License | BSD-3-Clause (permissive) |
| Python support | supports the current Python release (>=3.6) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 336 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 189,996/month — #9,917 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: tlparse-0.4.3-py3-none-macosx_10_12_x86_64.whl; tlparse-0.4.3-py3-none-macosx_11_0_arm64.whl; tlparse-0.4.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; tlparse-0.4.3-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl; tlparse-0.4.3-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl; tlparse-0.4.3-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl; tlparse-0.4.3-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl; tlparse-0.4.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; tlparse-0.4.3-py3-none-win32.whl; tlparse-0.4.3-py3-none-win_amd64.whl
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
depyfDecompile and inspect the internal bytecode and…
permissive · top 5,000 on PyPI
pydltPyDLT reads and writes AUTOSAR DLT (Diagnostic…
permissive · top 15,000 on PyPI
onnx2tfConverts ONNX model files to LiteRT,…
permissive · top 5,000 on PyPI
torchtntTNT provides training utilities and tools for…
permissive · top 15,000 on PyPI
litert-torchConverts PyTorch models to .tflite format for…
permissive · top 15,000 on PyPI
torch-model-archiverTorch Model Archiver creates .mar archive files…
permissive · top 15,000 on PyPI
tbparseParses TensorBoard event log files and loads…
permissive · top 15,000 on PyPI
torchvizGenerates visual diagrams of PyTorch neural…
permissive · top 5,000 on PyPI
torchtexttorchtext provides text datasets, preprocessing…
permissive · top 15,000 on PyPI