Decorator marking a test that requires XPU (in PyTorch). These tests are skipped when XPU backend is not available.
(test_case)
| 1013 | |
| 1014 | |
| 1015 | def require_torch_xpu(test_case): |
| 1016 | """ |
| 1017 | Decorator marking a test that requires XPU (in PyTorch). |
| 1018 | |
| 1019 | These tests are skipped when XPU backend is not available. |
| 1020 | """ |
| 1021 | return unittest.skipUnless(is_torch_xpu_available(), "test requires XPU device")(test_case) |
| 1022 | |
| 1023 | |
| 1024 | def require_non_xpu(test_case): |
nothing calls this directly
no test coverage detected