本文へスキップ
Kitbay
掲載依頼
スキル

aoti-debug

NOASSERTION2026年11月11日 更新105,390GitHubスター

A skill kept in the PyTorch repository for debugging AOTInductor, PyTorch's ahead-of-time compiler, when compiled models crash or fail: segfaults, device mismatches, constant-loading errors and CUDA illegal memory accesses.

スキルの内容

A skill kept in the PyTorch repository for debugging AOTInductor, PyTorch's ahead-of-time compiler, when compiled models crash or fail: segfaults, device mismatches, constant-loading errors and CUDA illegal memory accesses. It starts with three checks (same device type at compile and load time, inputs on the right device, input shapes matching the compiled constraints), then gives a step-by-step route for memory errors: turn on input and NaN checks, make failures reproducible by disabling the caching allocator and forcing synchronous launches, and print kernels as they run to find the culprit. It lists the relevant environment variables and notes that the older aot_compile and aot_load functions are deprecated.

できること

  • Check device and shape mismatches in AOTInductor models
  • Narrow down CUDA illegal memory access errors
  • Print kernels at run time to find a failing one
  • Pick the right debug environment variables