--- id: tlparse version: "0.4.3" license: BSD-3-Clause license_treatment: permissive maintenance: active --- # tlparse — Parse TORCH_LOG logs produced by PyTorch torch.compile License: permissive · Maintenance: active · Downloads: 190.0K/mo ## 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 above — 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 pip install tlparse uv add tlparse 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_current - Install friction: medium - Maintenance: active - Downloads: 190.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags pytorch torch.compile log parser, torch trace log analysis, pt2 structured log viewer, pytorch performance profiling html, torch.compile trace visualization, pytorch-profiling, torch-compile, performance-analysis [View on SkillFed](https://skillfed.io/packages/tlparse) · [View on PyPI](https://pypi.org/project/tlparse/)