• Learn
    Get Started Tutorials Learn the Basics PyTorch Recipes Intro to PyTorch - YouTube Series Webinars
  • Community
    Landscape Join the Ecosystem Community Hub Forums Developer Resources Contributor Awards Community Events PyTorch Ambassadors
  • Projects
    PyTorch vLLM DeepSpeed Host Your Project RAY
  • Docs
    PyTorch Domains
  • Blogs & News
    Blog Announcements Case Studies Events Newsletter
  • About
    PyTorch Foundation Members Governing Board Technical Advisory Council Cloud Credit Program Staff Contact Brand Guidelines
  • JOIN
  • Learn
    • Get Started
    • Tutorials
    • Learn the Basics
    • PyTorch Recipes
    • Introduction to PyTorch - YouTube Series
    • Webinars
  • Community
    • Landscape
    • Join the Ecosystem
    • Community Hub
    • Forums
    • Developer Resources
    • Contributor Awards
    • Community Events
    • PyTorch Ambassadors
  • Projects
    • PyTorch
    • vLLM
    • DeepSpeed
    • Host Your Project
  • Docs
    • PyTorch
    • Domains
  • Blog & News
    • Blog
    • Announcements
    • Case Studies
    • Events
    • Newsletter
  • About
    • PyTorch Foundation
    • Members
    • Governing Board
    • Technical Advisory Council
    • Cloud Credit Program
    • Staff
    • Contact
Skip to main content
Ctrl+K

Home

  • Install PyTorch
  • User Guide
  • Reference API
  • Developer Notes
  • Community
  • Tutorials
Ctrl+K
  • X
  • GitHub
  • PyTorch Forum
  • PyPi
  • Install PyTorch
  • User Guide
  • Reference API
  • Developer Notes
  • Community
  • Tutorials
Ctrl+K
  • X
  • GitHub
  • PyTorch Forum
  • PyPi

Section Navigation

Introduction

  • Pytorch Overview
  • Get Started
  • Learn the Basics

Core Concepts

  • PyTorch Main Components

Torch Compile

  • Torch.compile
    • Getting Started
    • Core Concepts
      • torch.compile Programming Model
        • Dynamo Core Concepts
        • Working with Graph Breaks
        • Non-strict Tracing Programming Model
        • Dealing with Recompilations
        • tlparse / TORCH_TRACE
        • Reporting Issues
      • Dynamo Overview
      • PyTorch 2.0 NNModule Support
      • torch.compile has different autograd semantics
    • Performance
      • PyTorch 2.0 Performance Dashboard
      • TorchInductor GPU Profiling
      • Profiling to understand torch.compile performance
      • CUDAGraph Trees
    • Advanced
      • Dynamo Deep-Dive
      • Writing Graph Transformations on ATen IR
      • Fake tensor
      • Custom Backends
      • Dynamic Shapes
        • Dynamic Shapes Core Concepts
        • Troubleshooting Dynamic Shapes
        • Advanced Options to Control Dynamic Behavior
        • Beyond the Basics
    • Troubleshooting FAQs
      • tlparse / TORCH_TRACE
      • Reporting Issues
      • torch.compile Troubleshooting
      • Frequently Asked Questions
    • Reference/API
      • torch.compiler API reference
        • torch.compiler.compile
        • torch.compiler.reset
        • torch.compiler.allow_in_graph
        • torch.compiler.substitute_in_graph
        • torch.compiler.assume_constant_result
        • torch.compiler.list_backends
        • torch.compiler.disable
        • torch.compiler.set_stance
        • torch.compiler.set_enable_guard_collectives
        • torch.compiler.cudagraph_mark_step_begin
        • torch.compiler.is_compiling
        • torch.compiler.is_dynamo_compiling
        • torch.compiler.is_exporting
        • torch.compiler.skip_guard_on_inbuilt_nn_modules_unsafe
        • torch.compiler.skip_guard_on_all_nn_modules_unsafe
        • torch.compiler.keep_tensor_guards_unsafe
        • torch.compiler.skip_guard_on_globals_unsafe
        • torch.compiler.skip_all_guards_unsafe
        • torch.compiler.nested_compile_region
      • torch.compiler.config
      • TorchDynamo APIs for fine-grained tracing
      • TorchInductor and AOTInductor Provenance Tracking
  • Torch.export
    • torch.export API Reference
    • torch.export Programming Model
    • torch.export IR Specification
    • PT2 Archive Spec
    • Draft Export
    • Joint with descriptors
    • Control Flow - Cond
    • ExportDB
      • torch.escape-hatch
      • torch.dynamic-shape
      • torch.cond
      • python.closure
      • torch.dynamic-value
      • python.data-structure
      • python.assert
      • python.control-flow
      • torch.map
      • python.builtin
      • python.object-model
      • python.context-manager
      • torch.operator
      • torch.mutation
    • AOTInductor: Ahead-Of-Time Compilation for Torch.Export-ed Models
      • torch._logging
        • torch._logging.set_logs
      • AOTInductor Minifier
      • AOTInductor Debugging Guide
    • IRs
    • Dynamic Shapes
      • Dynamic Shapes Core Concepts
      • Troubleshooting Dynamic Shapes
        • Debugging with tlparse and TORCH_LOGS=dynamic
        • Troubleshooting GuardOnDataDependentSymNode Errors
      • Advanced Options to Control Dynamic Behavior
      • Beyond the Basics
        • The Zero-One Specialization Problem
        • Backed vs Unbacked Symints
    • Fake tensor
    • Writing Graph Transformations on ATen IR

Developer Notes

  • Developer Notes
    • Automatic Mixed Precision examples
    • Autograd mechanics
    • Broadcasting semantics
    • CPU threading and TorchScript inference
    • CUDA semantics
    • PyTorch Custom Operators Landing Page
    • Distributed Data Parallel
    • Extending PyTorch
    • Extending torch.func with autograd.Function
    • Frequently Asked Questions
    • Getting Started on Intel GPU
    • Gradcheck mechanics
    • HIP (ROCm) semantics
    • Features for large-scale deployments
    • LibTorch Stable ABI
    • MKLDNN backend
    • Modules
    • MPS backend
    • Multiprocessing best practices
    • Numerical accuracy
    • Out Notes
    • Reproducibility
    • Serialization semantics
    • Windows FAQ

Accelerator Integration

  • Accelerator Integration
    • Device Management
    • Accelerator Hooks
    • Guard
    • Autoload Mechanism
    • Operator Registration
    • Automatic Mixed Precision
  • User Guide
  • torch.compiler
  • Performance
Rate this Page
★ ★ ★ ★ ★

Performance#

Created On: Dec 03, 2025 | Last Updated On: Dec 03, 2025

Learn how to profile, benchmark, and optimize your models with torch.compile.

  • PyTorch 2.0 Performance Dashboard
  • TorchInductor GPU Profiling
  • Profiling to understand torch.compile performance
  • Finding graph breaks: “Torch-Compiled Region” and “CompiledFunction”
  • CUDAGraph Trees
Rate this Page
★ ★ ★ ★ ★

previous

torch.compile has different autograd semantics

next

PyTorch 2.0 Performance Dashboard

Built with the PyData Sphinx Theme 0.15.4.

previous

torch.compile has different autograd semantics

next

PyTorch 2.0 Performance Dashboard

Edit on GitHub
Show Source
PyTorch Libraries
  • torchao
  • torchrec
  • torchft
  • TorchCodec
  • torchvision
  • ExecuTorch
  • PyTorch on XLA Devices

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources

Stay in touch for updates, event info, and the latest news

By submitting this form, I consent to receive marketing emails from the LF and its projects regarding their events, training, research, developments, and related announcements. I understand that I can unsubscribe at any time using the links in the footers of the emails I receive. Privacy Policy.

© PyTorch. Copyright © The Linux Foundation®. All rights reserved. The Linux Foundation has registered trademarks and uses trademarks. For more information, including terms of use, privacy policy, and trademark usage, please see our Policies page. Trademark Usage. Privacy Policy.

To analyze traffic and optimize your experience, we serve cookies on this site. By clicking or navigating, you agree to allow our usage of cookies. As the current maintainers of this site, Facebook’s Cookies Policy applies. Learn more, including about available controls: Cookies Policy.

© Copyright PyTorch Contributors.

Created using Sphinx 7.2.6.

Built with the PyData Sphinx Theme 0.15.4.