Compares the current flash-attention 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)
| 906 | |
| 907 | @cache |
| 908 | def is_flash_attn_version(operation: str, version: str): |
| 909 | """ |
| 910 | Compares the current flash-attention version to a given reference with an operation. |
| 911 | |
| 912 | Args: |
| 913 | operation (`str`): |
| 914 | A string representation of an operator, such as `">"` or `"<="` |
| 915 | version (`str`): |
| 916 | A version string |
| 917 | """ |
| 918 | if not _flash_attn_available: |
| 919 | return False |
| 920 | return compare_versions(parse(_flash_attn_version), operation, version) |
| 921 | |
| 922 | |
| 923 | @cache |
no test coverage detected
searching dependent graphs…