compile-overview

Explain torch.compile pipeline stages and intermediate representations for debugging.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps developers understand the torch.compile pipeline and quickly identify the right compiler stage, intermediate representation, logging option, or debugging artifact when investigating compilation behavior.

Core Features & Use Cases

  • Pipeline Architecture: Explains the Dynamo, AOT Autograd, and Inductor stages from Python capture through generated GPU or CPU code.
  • IR Reference: Clarifies the progression from Full ATen to Core ATen, Prims, and Inductor loop-level representations.
  • Debugging Guidance: Maps TORCH_LOGS flags, generated output files, compiler bisector usage, and configuration options to common investigations.
  • Use Case: When a compiled model has graph breaks or poor fusion, use this reference to select the relevant logs and inspect the appropriate stage output.

Quick Start

Use the compile-overview skill to identify which torch.compile stage and logging flags are relevant to a compilation issue.

Frequently Asked Questions about compile-overview

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

FAQPage Schema
How does torch.compile work and what are the Dynamo, AOT Autograd, and Inductor stages?

torch.compile pipeline works by progressing through Dynamo for Python capture, AOT Autograd for transformations, and Inductor for fusion and generated GPU or CPU code. Each stage produces distinct intermediate representations from Full ATen to Core ATen and Prims.

How do I debug graph breaks in torch.compile?

To debug graph breaks in torch.compile, use the compile-overview reference to select relevant TORCH_LOGS flags and inspect the appropriate stage output. This maps logging options to common investigations like graph breaks and poor fusion.

What intermediate representations are used in the torch.compile pipeline?

The torch.compile pipeline uses intermediate representations progressing from Full ATen to Core ATen, then to Prims, and finally to Inductor loop-level representations. This IR progression clarifies compilation behavior across Dynamo and Inductor stages.

What TORCH_LOGS flags should I use to investigate Inductor fusion issues?

Use stage-specific logging flags from TORCH_LOGS to investigate Inductor fusion issues. The compile-overview skill maps these flags, generated output files, and configuration options to specific compiler stages for selecting relevant logs.

Can I use the compiler bisector to troubleshoot PyTorch compilation performance issues?

Yes, you can use the compiler bisector workflows to troubleshoot PyTorch compilation performance issues. The skill provides bisector usage guidance alongside stage-specific logging flags and cache guidance for identifying compilation behavior problems.

Why does torch.compile generate poor fusion and how do I inspect the output files?

torch.compile may generate poor fusion due to suboptimal Inductor transformations. Inspect the generated output files by mapping them to the appropriate stage using logging flags, enabling you to analyze the Inductor loop-level representations.