
Aoti Debug
pytorch/pytorchOfficial
Systematic diagnosis guide for AOTInductor segfaults, device mismatches, and CUDA illegal memory access errors.
- skills.sh installs
- 3.1K
- GitHub stars
- 105.8K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers a first-step checklist: matching compile and load device types, input devices, and input shapes before deeper debugging
- Includes routing for Triton index-out-of-bounds errors and a table of debug env vars like
AOTI_RUNTIME_CHECK_INPUTSandCUDA_LAUNCH_BLOCKING - Enforces that AOTI compile and load share a device type, since cross-device loading (GPU to CPU) is unsupported
- Designed for PyTorch users hitting AOTI crashes through
aot_compile,aot_load, oraoti_load_packageon CPU or CUDA
Install
$ npx -y skills add pytorch/pytorch --skill aoti-debug -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
AOTI Debugging Guide
This skill helps diagnose and fix common AOTInductor issues.
Error Pattern Routing
Check the error message and route to the appropriate sub-guide:
Triton Index Out of Bounds
If the error matches this pattern:
Assertion `index out of bounds: 0 <= tmpN < ksM` failed
→ Follow the guide in triton-index-out-of-bounds.md
All Other Errors
Continue with the sections below.
First Step: Always Check Device and Shape Matching
For ANY AOTI error (segfault, exception, crash, wrong output), ALWAYS check these first:
- Compile device == Load device: The model must be loaded on the same device type it was compiled on
- Input devices match: Runtime inputs must be on the same device as the compiled model
- Input shapes match: Runtime input shapes must match the shapes used during compilation (or satisfy dynamic shape constraints)
# During compilation - note the device and shapes
model = MyModel().eval() # What device? CPU or .cuda()?
inp = torch.randn(2, 10) # What device? What shape?
compiled_so = torch._inductor.aot_compile(model, (inp,))
Details
- Repository
- github.com/pytorch/pytorch
- Categories
- Debugging, Python
- First seen
- May 16, 2026
More from pytorch/pytorch
All 9Similar to Aoti Debug
More Debugging
safe-debuglllllllama/rigorpilot-skills359.7K installsConservative, approval-gated diagnosis for deep learning failures, with debug fixes kept separate from research contributions.
adk-debuggerbotpress/skills1.7K installsSystematic debugging for ADK agents covering trace reading, log analysis, failure diagnosis, and the debug loop.
copilotkit-debugcopilotkit/copilotkit2.8K installsDiagnostic guide for CopilotKit runtime, streaming, tool, transcription, and version failures using AG-UI event tracing.
debugging-capacitorcap-go/capgo-skills1.5K installsDiagnoses and fixes Capacitor iOS and Android runtime bugs using WebView, native, and OS-level inspection.
debuggerzhaono1/agent-playbook678 installsSystematic debugging workflow that reproduces, isolates, and verifies fixes across JavaScript, Python, and Go.
golang-troubleshootingsamber/cc-skills-golang42K installsSystematic Go debugging methodology with pprof, Delve, race detection, and GODEBUG tracing for root-cause fixes.