Decorator marking a test that requires an accelerator backend and PyTorch.
(test_case)
| 223 | |
| 224 | # These decorators are for accelerator-specific behaviours that are not GPU-specific |
| 225 | def require_torch_accelerator(test_case): |
| 226 | """Decorator marking a test that requires an accelerator backend and PyTorch.""" |
| 227 | return unittest.skipUnless(is_torch_available() and torch_device != "cpu", "test requires accelerator+PyTorch")( |
| 228 | test_case |
| 229 | ) |
| 230 | |
| 231 | |
| 232 | def require_torch_accelerator_with_fp16(test_case): |
nothing calls this directly
no test coverage detected