Either fp16 support is provided in the compute capability or not Parameters ---------- compute_version: str compute capability of a GPU (e.g. "6.0")
(compute_version)
| 1034 | |
| 1035 | |
| 1036 | def have_fp16(compute_version): |
| 1037 | """Either fp16 support is provided in the compute capability or not |
| 1038 | |
| 1039 | Parameters |
| 1040 | ---------- |
| 1041 | compute_version: str |
| 1042 | compute capability of a GPU (e.g. "6.0") |
| 1043 | """ |
| 1044 | major, minor = parse_compute_version(compute_version) |
| 1045 | # fp 16 support in reference to: |
| 1046 | # https://docs.nvidia.com/cuda/cuda-c-programming-guide/#arithmetic-instructions |
| 1047 | if major == 5 and minor == 3: |
| 1048 | return True |
| 1049 | if major >= 6: |
| 1050 | return True |
| 1051 | |
| 1052 | return False |
| 1053 | |
| 1054 | |
| 1055 | def have_int8(compute_version): |
searching dependent graphs…