Developer Tools

PyTorch adds ATEN fallback for CUTLASS-only GEMM autotuning on XPU

New fix prevents crashes when CUTLASS backend fails on Intel XPU

Deep Dive

PyTorch's latest pull request (ciflow/xpu/186891) introduces a critical robustness improvement for GEMM (general matrix multiply) autotuning. The fix addresses a specific edge case where max_autotune_gemm_backends is configured to use only the CUTLASS backend, and CUTLASS fails to produce any operations — for example on Intel's XPU architecture when GenerateIntelXe is missing. Previously, this situation caused a NoValidChoicesError, completely blocking users from training or running inference with that configuration.

The solution auto-includes ATEN (the core PyTorch tensor library) as a fallback when no GEMM choices exist from any configured backend. This ensures that even if CUTLASS fails, a working default implementation is always available. The PR also fixes the related test (test_max_autotune_cutlass_backend_cpp_wrapper) on XPU by integrating with the recent graceful fallback changes to _gen_ops_cached in utils.py. Co-authored by Copilot, this update makes PyTorch's autotuner more reliable across diverse hardware backends.

Key Points
  • PR adds ATEN fallback when no GEMM choices exist from configured backends
  • Fixes NoValidChoicesError when CUTLASS is the exclusive backend and fails on XPU
  • Ensures test_max_autotune_cutlass_backend_cpp_wrapper passes on XPU

Why It Matters

More robust PyTorch autotuning on Intel XPUs prevents crashes in production and development workflows.

📬 Get the top 10 AI stories daily