viable/strict/1790773504: Extend `native_layer_norm` param dtype check from CUDA to XPU (#198647)
- PyTorch: 1695 events in the last 90 days
- PyTorch: 1674th Release in the last 90 days
- Previous: earlier the same day · trunk/071350f5555440e78fd85b72674f5b8ebcc42295
What happened
_check_native_layer_norm_cuda_param_dtype early-returned on non-CUDA devices, so the decomposition skipped the weight/bias dtype validation on XPU and diverged from eager under aot_eager_decomp_partition . XPU has identical kernel semantics (including the num_rows == 0 carve-out), so gate on both devices and rename the helper accordingly. Unskips test_layer_norm_mixed_dtype_aot_eager_decomp_partition_errors for XPU.…
Summary assembled by rule from the sources below