compile-trace-inductor

Diagnose PyTorch Inductor compilation and performance issues by tracing IR transformations.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps diagnose PyTorch Inductor compilation and performance problems by tracing transformations from ATen operations through lowering, scheduling, fusion, loop-body construction, Triton code generation, and execution.

Core Features & Use Cases

  • Pipeline Tracing: Follow Inductor operations across IR lowering, scheduling, loop-body creation, Triton code generation, compilation, and execution.
  • Fusion Analysis: Investigate scheduler dependencies, fusion opportunities, missed fusions, intermediate buffers, and kernel launch behavior.
  • IR and Kernel Debugging: Interpret Pointwise, Reduction, SchedulerNode, FusedSchedulerNode, ops.load, ops.store, and generated Triton code.
  • Use Case: When a compiled PyTorch model launches too many kernels or produces incorrect output, use the Skill to identify the relevant Inductor stage, enable targeted logs, and compare transformations across IR levels.

Quick Start

Use the compile-trace-inductor skill to investigate why a torch.compile workload is not fusing expected operations and identify the relevant Inductor logs and IR output.

Frequently Asked Questions about compile-trace-inductor

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

FAQPage Schema
How do I debug torch.compile missed fusion problems in PyTorch Inductor?

To debug torch.compile missed fusion problems, trace Inductor lowering, scheduling, and loop-body construction to investigate scheduler dependencies and identify why operations are not fusing into FusedSchedulerNodes.

What causes too many kernel launches in PyTorch Inductor compiled models?

Too many kernel launches in PyTorch Inductor compiled models are caused by missed fusion opportunities during scheduling, which you can diagnose by inspecting intermediate buffers and SchedulerNode dependencies using TORCH_LOGS.

How do I trace Triton code generation failures during PyTorch compilation?

Trace Triton code generation failures by following Inductor IR transformations from Pointwise and Reduction ops to generated Triton code, using config.trace.enabled to inspect progressive compilation artifacts and isolate compilation errors.

Can I use TORCH_LOGS to diagnose incorrect output from a torch.compile model?

Yes, you can use TORCH_LOGS to diagnose incorrect output from a torch.compile model by comparing transformations across Inductor IR levels, checking ops.load and ops.store operations, and tracing execution to find dtype and indexing issues.

How do I interpret Inductor IR and SchedulerNode structures for performance analysis?

Interpret Inductor IR and SchedulerNode structures for performance analysis by tracing Pointwise and Reduction operations through lowering and fusion, examining generated Triton code, and evaluating intermediate buffer behavior to identify bottlenecks.