Session

Layout-Aware Compilation Cache Validation for Custom AI Accelerators in PyTorch

PyTorch's torch.compile cache is fundamental to inference performance, enabling compiled artifacts to be reused across repeated executions. As PyTorch expands to support diverse custom AI accelerators, existing cache validity assumptions based on tensor metadata alone become insufficient. Accelerators with hardware-specific memory layouts can require different compiled artifacts even when tensors appear identical to PyTorch, leading to silent incorrect cache reuse and unreliable production deployment. Backend developers are therefore forced to either disable compilation caching or perform extensive validation to ensure correctness. We present a layout-aware extension to PyTorch's inference compilation cache that incorporates accelerator-specific memory layout information into both runtime (Dynamo) and persistent (FxGraph) cache validation. Implemented entirely out-of-tree and without modifying PyTorch core, our approach preserves existing CPU/GPU behavior while enabling safe, reliable cache reuse for current and future third-party inference accelerators.

Credited Co-Author(s): Hema Prasanna KC, Pradipta Ghosh, Albin Joy, Anto John

David Grove

IBM

Yorktown Heights, New York, United States

Actions

Please note that Sessionize is not responsible for the accuracy or validity of the data provided by speakers. If you suspect this profile to be fake or spam, please let us know.

Jump to top