(device_id=0)
| 1049 | |
| 1050 | |
| 1051 | def is_of_supported(device_id=0): |
| 1052 | global is_of_supported_var |
| 1053 | if is_of_supported_var is not None: |
| 1054 | return is_of_supported_var |
| 1055 | |
| 1056 | driver_version_major = 0 |
| 1057 | try: |
| 1058 | import pynvml |
| 1059 | |
| 1060 | pynvml.nvmlInit() |
| 1061 | driver_version = pynvml.nvmlSystemGetDriverVersion().decode("utf-8") |
| 1062 | driver_version_major = int(driver_version.split(".")[0]) |
| 1063 | except ModuleNotFoundError: |
| 1064 | print("NVML not found") |
| 1065 | |
| 1066 | # there is an issue with OpticalFlow driver in R495 and newer on aarch64 platform |
| 1067 | is_of_supported_var = get_arch(device_id) >= 7.5 and ( |
| 1068 | platform.machine() == "x86_64" or driver_version_major < 495 |
| 1069 | ) |
| 1070 | return is_of_supported_var |
| 1071 | |
| 1072 | |
| 1073 | def get_nvjpeg_ver(): |
no test coverage detected