(device: str)
| 1534 | # These are callables which return boolean behaviour flags and can be used to specify some |
| 1535 | # device agnostic alternative where the feature is unsupported. |
| 1536 | def backend_supports_training(device: str): |
| 1537 | if not is_torch_available(): |
| 1538 | return False |
| 1539 | |
| 1540 | if device not in BACKEND_SUPPORTS_TRAINING: |
| 1541 | device = "default" |
| 1542 | |
| 1543 | return BACKEND_SUPPORTS_TRAINING[device] |
| 1544 | |
| 1545 | |
| 1546 | # Guard for when Torch is not available |
no test coverage detected
searching dependent graphs…