compile-trace-dynamo

Diagnose PyTorch Dynamo compilation failures via FX graph inspection.

6|8|Updated May 7, 2026
One-click install
npx skills add https://github.com/TorchedHat/ai-marketplace --skill compile-trace-dynamo
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: compile-trace-dynamo
Source: https://github.com/TorchedHat/ai-marketplace/tree/main/torch-compile/skills/compile-trace-dynamo
Command: npx skills add https://github.com/TorchedHat/ai-marketplace --skill compile-trace-dynamo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps diagnose PyTorch Dynamo compilation problems such as graph breaks, unsupported operations, unexpected FX graph transformations, excessive recompilation, and missing pre-grad optimizations.

Core Features & Use Cases

  • Dynamo tracing: Inspect bytecode capture, FX graph construction, graph breaks, and unsupported operations.
  • Pre-grad analysis: Compare FX graphs before and after transformations such as Conv-BN fusion and split-cat elimination.
  • Dynamic shape debugging: Investigate guards, recompilation causes, and shape specialization behavior.
  • Compilation verification: Reproduce captured graphs, compare eager and compiled behavior, and validate optimization results.
  • Use Case: When a model produces multiple small compiled graphs or fails to fuse Conv-BN operations, use the Skill to enable targeted logs, inspect generated FX graph files, identify the cause, and verify the fix.

Quick Start

Ask the AI to trace a PyTorch compilation failure through Dynamo, inspect graph breaks and FX graphs, and verify whether the expected pre-grad optimizations occurred.

Frequently Asked Questions about compile-trace-dynamo

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

FAQPage Schema
How do I debug PyTorch Dynamo graph breaks and unsupported operations?▼

Debug PyTorch Dynamo graph breaks by configuring targeted TORCH_LOGS to inspect bytecode capture, trace FX graph construction, and identify unsupported operations causing compilation failures.

Why does torch.compile produce multiple small FX graphs instead of a single compiled graph?▼

Multiple small FX graphs during torch.compile indicate graph breaks. Inspect Dynamo tracing logs and generated graph files to locate unsupported operations or dynamic shapes forcing fragmentation.

How do I verify if pre-grad optimizations like Conv-BN fusion occurred in torch.compile?▼

Verify pre-grad optimizations by comparing before and after FX graphs. Inspect Dynamo compiler passes to confirm Conv-BN fusion and split-cat elimination transformations were applied correctly.

What causes excessive recompilation in PyTorch Dynamo with dynamic shapes?▼

Excessive recompilation in PyTorch Dynamo stems from dynamic shapes triggering guard failures. Analyze shape specialization behavior and recompilation logs to identify variables causing repeated graph capture.

How do I reproduce and compare eager versus compiled behavior discrepancies in PyTorch?▼

Reproduce captured FX graphs and compare eager versus compiled behavior to identify discrepancies. Validate optimization results by running before-and-after checks on compiler passes to ensure correctness.

Can I trace PyTorch Dynamo bytecode capture without deep knowledge of the compiler internals?▼

Tracing PyTorch Dynamo bytecode capture requires configuring targeted TORCH_LOGS and inspecting FX graph files. The Skill guides this process, diagnosing guard and recompilation issues without requiring deep compiler internals knowledge.