Decorator marking a test that requires PyTorch 2. These tests are skipped when it isn't installed.
(test_case)
| 495 | |
| 496 | |
| 497 | def require_torch_2(test_case): |
| 498 | """ |
| 499 | Decorator marking a test that requires PyTorch 2. These tests are skipped when it isn't installed. |
| 500 | """ |
| 501 | return pytest.mark.skipif( |
| 502 | not (is_torch_available() and is_torch_version(">=", "2.0.0")), reason="test requires PyTorch 2" |
| 503 | )(test_case) |
| 504 | |
| 505 | |
| 506 | def require_torch_version_greater_equal(torch_version): |
nothing calls this directly
no test coverage detected
searching dependent graphs…