skillfed

tlparse

Parse TORCH_LOG logs produced by PyTorch torch.compile

tlparse v0.4.3 190.0K downloads/30d#9,917 on PyPI92
Permissive license BSD-3-Clause Active released

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 tlparse

uv

uv add tlparse

poetry

poetry add tlparse

Installing 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

Programming Language :: Rust

Tags

pytorch torch.compile log parsertorch trace log analysispt2 structured log viewerpytorch performance profiling htmltorch.compile trace visualization
pytorch-profilingtorch-compileperformance-analysis

More Artificial Intelligence packages