Compares the current Accelerate version to a given reference with an operation. Args: operation (`str`): A string representation of an operator, such as `">"` or `"<="` version (`str`): A version string
(operation: str, version: str)
| 763 | |
| 764 | @cache |
| 765 | def is_accelerate_version(operation: str, version: str): |
| 766 | """ |
| 767 | Compares the current Accelerate version to a given reference with an operation. |
| 768 | |
| 769 | Args: |
| 770 | operation (`str`): |
| 771 | A string representation of an operator, such as `">"` or `"<="` |
| 772 | version (`str`): |
| 773 | A version string |
| 774 | """ |
| 775 | if not _accelerate_available: |
| 776 | return False |
| 777 | return compare_versions(parse(_accelerate_version), operation, version) |
| 778 | |
| 779 | |
| 780 | @cache |
no test coverage detected
searching dependent graphs…