torch-compile

Apply torch.compile to PyTorch models for accelerated training and inference.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/tylertitsworth/skills --skill torch-compile
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: torch-compile
Source: https://github.com/tylertitsworth/skills/tree/main/torch-compile
Command: npx skills add https://github.com/tylertitsworth/skills --skill torch-compile

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PyTorch model compilation with torch.compile to accelerate training and inference, optimize graphs, reduce Python overhead, and tune performance via Inductor and backends.

Core Features & Use Cases

  • Performance optimization: accelerate PyTorch models during training and inference with various modes and backends.
  • Debugging & Use Cases: diagnose graph breaks, tune Inductor options, and compare backends.
  • Deployment readiness: prepare optimized models for deployment on GPUs and CPUs with configurable shapes and caching.

Quick Start

Run torch.compile on your PyTorch model to enable end-to-end acceleration.

Frequently Asked Questions about torch-compile

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

FAQPage Schema
How do I use torch.compile to accelerate PyTorch model training?

Use torch.compile to optimize PyTorch models by reducing Python overhead and accelerating training and inference on GPUs and CPUs through configurable modes and backends.

What causes graph breaks during PyTorch compilation and how do I diagnose them?

Graph breaks disrupt PyTorch compilation when encountering unsupported operations, which you can diagnose by tuning Inductor options and comparing backends to optimize the execution graph.

Does torch.compile work with dynamic shapes on GPU and CPU workloads?

Yes, torch.compile supports GPU and CPU workloads handling dynamic shapes, allowing you to prepare optimized models for deployment with configurable shapes and caching.

How do I autotune Inductor options and backends for PyTorch performance optimization?

Autotune Inductor options and backends for PyTorch performance optimization via a configurable dictionary, selecting modes and backends to reduce Python overhead and tune execution graphs.

When should I avoid using torch.compile for model deployment?

Avoid using torch.compile when your PyTorch model operations consistently trigger graph breaks or when dynamic shapes cannot be easily configured, preventing effective Inductor optimization.