aoti-debug

Diagnose and fix AOTInductor errors with structured device and shape validation.

1|Updated Apr 5, 2026
One-click install
npx skills add https://github.com/steleman/pytorch-cuda-2.11.0 --skill aoti-debug-steleman
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aoti-debug
Source: https://github.com/steleman/pytorch-cuda-2.11.0/tree/main/.claude/skills/aoti-debug
Command: npx skills add https://github.com/steleman/pytorch-cuda-2.11.0 --skill aoti-debug-steleman

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps diagnose and fix common AOTInductor issues, including segfaults, device mismatch errors, constant loading failures, or runtime errors from aot_compile, aot_load, or aoti_compile_and_package, by guiding structured checks and debugging workflows.

Core Features & Use Cases

  • Structured device/shape checks to ensure compile and load device alignment, input device matching, and dynamic shapes handling.
  • Common error pattern guidance covering device mismatch, segmentation faults, and constant loading failures with recommended remedies.
  • Deterministic CUDA IMA debugging guidance and environment flag recommendations to reproduce and triage issues.
  • Use cases: diagnosing AOTInductor crashes in CPU/GPU pipelines, stabilizing model loading, and ensuring correct device contexts for aot workflows.

Quick Start

Follow the step-by-step checks to verify device, shapes, and inputs, then run the AOTInductor debugging workflow to identify and fix the issue.

Frequently Asked Questions about aoti-debug

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

FAQPage Schema
How do I fix a segfault when loading an AOTInductor compiled model?

To fix an AOTInductor segfault, run structured device and shape validation across aoti_load_package, verify compile and load device alignment, and apply recommended environment flags for deterministic CUDA debugging.

Why does my PyTorch AOTInductor model throw a device mismatch error at runtime?

AOTInductor device mismatch errors occur when compile and load device contexts differ. Run structured device checks to ensure compile and load device alignment and verify input device matching across aoti_load_package.

How do I debug constant loading failures in aoti_load_package?

Debug constant loading failures in aoti_load_package by following the structured troubleshooting workflow that checks error patterns, validates device contexts, and applies recommended remedies for CPU and CUDA contexts.

Can I use AOTInductor debugging steps for both CPU and CUDA pipelines?

Yes, AOTInductor debugging steps apply to both CUDA and CPU contexts, covering segfaults, device mismatches, and runtime exceptions across aot_compile, aot_load, and aoti_compile_and_package workflows.

What environment flags do I need to reproduce AOTInductor runtime errors deterministically?

To reproduce AOTInductor runtime errors deterministically, apply recommended environment flags that enable deterministic CUDA IMA debugging, then run structured device and shape validation to triage the issue.

How do I handle dynamic shapes when compiling with aoti_compile_and_package?

Handle dynamic shapes with aoti_compile_and_package by running structured shape validation checks that ensure compile and load shape alignment and verify input shape handling across the AOTInductor workflow.