in src/local_gpu_verifier/src/verifier/utils/__init__.py [0:0]
def get_gpu_architecture_value(nvml_arch_value):
""" A function to map the NVML architecture integer value to the
corresponding architecture name.
Args:
nvml_arch_value (int): nvml architecture integer value.
Raises:
UnknownGpuArchitectureError: it is raised if the given value does not
correspondes to any known GPU architecture.
Returns:
[str]: The corresponding the GPU architecture name.
"""
if nvml_arch_value == 2:
return "KEPLER"
elif nvml_arch_value == 3:
return "MAXWELL"
elif nvml_arch_value == 4:
return "PASCAL"
elif nvml_arch_value == 5:
return "VOLTA"
elif nvml_arch_value == 6:
return "TURING"
elif nvml_arch_value == 7:
return "AMPERE"
elif nvml_arch_value == 9:
return "HOPPER"
else:
event_log.error("Unknown GPU architecture.")
raise UnknownGpuArchitectureError("Unknown GPU architecture.")