MCPcopy Create free account
hub / github.com/NVIDIA/DALI / is_of_supported

Function is_of_supported

dali/test/python/test_utils.py:1051–1070  ·  view source on GitHub ↗
(device_id=0)

Source from the content-addressed store, hash-verified

1049
1050
1051def 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
1073def get_nvjpeg_ver():

Callers 5

test_optical_flowFunction · 0.90
check_optflowFunction · 0.90
test_wrong_out_grid_sizeFunction · 0.90

Calls 4

printFunction · 0.85
get_archFunction · 0.85
splitMethod · 0.80
decodeMethod · 0.45

Tested by

no test coverage detected