SIGN IN SIGN UP

[Test][XPU] Enable XPU for `test_autocast.py` (#193189)

- add `allow_xpu=True` to both `instantiate_device_type_tests` calls

Before: 19 passed,  5 skipped
After:  26 passed,  7 skipped
\----------------------------
Delta:  +7 passed, +2 skipped

Newly passing tests:
- TestAutocastDeviceXPU::test_autocast_prioritize_xpu
- TestAutocastDeviceXPU::test_cache_disabled_xpu
- TestAutocastDeviceXPU::test_cast_cache_is_global_xpu
- TestTorchAutocastDeviceXPU::test_autocast_caching_still_works_with_gradients_xpu
- TestTorchAutocastDeviceXPU::test_autocast_inference_mode_interaction_xpu
- TestTorchAutocastDeviceXPU::test_autocast_mixed_grad_contexts_xpu
- TestTorchAutocastDeviceXPU::test_autocast_nograd_caching_issue_158232_xpu

Newly skipped tests (expected as these are MPS only tests):
- TestAutocastDeviceXPU::test_mps_autocast_bfloat16_supported_xpu
- TestAutocastDeviceXPU::test_mps_autocast_error_message_xpu

Pull Request resolved: https://github.com/pytorch/pytorch/pull/193189
Approved by: https://github.com/etaf, https://github.com/jansel
P
Piotr Bielak committed
8bd1b7f44175225412aec5f75cd262cf04fb6340
Parent: 179d721
Committed by PyTorch MergeBot <pytorchmergebot@users.noreply.github.com> on 8/24/2026, 8:43:24 AM