概要
The at-dispatch-v2 skill streamlines the process of upgrading PyTorch C++ codebases by converting legacy dispatch macros to the newer V2 format. It handles complex transformations including argument reordering, wrapping lambdas with AT_WRAP to prevent macro expansion issues, and mapping traditional dispatch patterns to extensible type groups using AT_EXPAND. This is essential for developers maintaining ATen kernels, CUDA implementations, or native operators who need to leverage the more composable and flexible dispatch system introduced in modern PyTorch versions.