graph-break-analysis

Diagnose graph breaks in TT-XLA compilation logs and generate fix reports.

74|32|Updated Sep 13, 2024
One-click install
npx skills add https://github.com/tenstorrent/tt-xla --skill graph-break-analysis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: graph-break-analysis
Source: https://github.com/tenstorrent/tt-xla/tree/main/.claude/skills/graph-break-analysis
Command: npx skills add https://github.com/tenstorrent/tt-xla --skill graph-break-analysis

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Graph breaks occur when a model, pipeline, or script is split into more graphs than necessary during TT-XLA compilation, making logs noisy and debugging harder. In TT-XLA, graph breaks often arise from tracing stages such as torchdynamo tracing, torch_xla tracing, or rare byproducts of torch.export, and are not simply different MLIR modules. This guide helps you distinguish true graph breaks from expected graph variants and provides a structured approach to diagnosing and fixing the root causes.

Core Features & Use Cases

  • Count and categorize MLIR module blocks per graph to quantify graph breaks.
  • Map each graph to its source code path (torchdynamo, torch_xla, export) to identify responsible stage.
  • Produce a prioritized action list with reproducible steps and optional patch scripts to fix the break.

Quick Start

Input the TT-XLA debug log and I will generate a graph-break analysis with root causes and fixes.

Frequently Asked Questions about graph-break-analysis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What causes graph breaks during TT-XLA compilation in PyTorch or JAX workflows?

Graph breaks during TT-XLA compilation happen when torchdynamo, torch_xla, or torch.export tracing splits a model into more MLIR modules than necessary, creating noisy logs. They represent actual tracing interruptions rather than just distinct MLIR graph variants.

How do I identify and diagnose graph breaks in MLIR module logs?

To identify graph breaks, count and categorize MLIR module blocks per graph, then map each graph to its source code path like torchdynamo or torch_xla. This pinpoints the responsible tracing stage causing the fragmentation.

How can I distinguish true graph breaks from expected MLIR graph variants?

Distinguish true graph breaks from expected MLIR graph variants by analyzing TT-XLA debug logs to quantify graph counts and categorize module blocks. Expected variants are normal architectural separations, whereas true breaks stem from tracing interruptions.

Can I generate reproduction scripts to validate TT-XLA graph break fixes?

Yes, graph break analysis generates reproduction scripts alongside prioritized action lists and optional patch scripts. These outputs allow you to execute and validate proposed fixes for TT-XLA compilation tracing interruptions directly.

What is the best way to fix torchdynamo or torch_xla tracing interruptions?

The best way to fix tracing interruptions is to input the TT-XLA debug log for analysis, which produces a structured report of root causes and a prioritized action list with executable patch scripts to resolve the breaks.