Decorator marking a test that requires an accelerator with support for training.
(test_case)
| 646 | |
| 647 | |
| 648 | def require_torch_accelerator_with_training(test_case): |
| 649 | """Decorator marking a test that requires an accelerator with support for training.""" |
| 650 | return pytest.mark.skipif( |
| 651 | not (is_torch_available() and backend_supports_training(torch_device)), |
| 652 | reason="test requires accelerator with training support", |
| 653 | )(test_case) |
| 654 | |
| 655 | |
| 656 | def skip_mps(test_case): |
nothing calls this directly
no test coverage detected
searching dependent graphs…