Decorator marking a test that requires PyTorch 2. These tests are skipped when it isn't installed.
(test_case)
| 303 | |
| 304 | |
| 305 | def require_torch_2(test_case): |
| 306 | """ |
| 307 | Decorator marking a test that requires PyTorch 2. These tests are skipped when it isn't installed. |
| 308 | """ |
| 309 | return unittest.skipUnless(is_torch_available() and is_torch_version(">=", "2.0.0"), "test requires PyTorch 2")( |
| 310 | test_case |
| 311 | ) |
| 312 | |
| 313 | |
| 314 | def require_torch_version_greater_equal(torch_version): |
nothing calls this directly
no test coverage detected
searching dependent graphs…