MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT / get_vers

Function get_vers

python/packaging/libs_wheel/setup.py:27–30  ·  view source on GitHub ↗
(var)

Source from the content-addressed store, hash-verified

25def get_requirements():
26 def get_version_range():
27 def get_vers(var):
28 vers = os.environ.get(var).replace("cuda-", "")
29 major, minor = map(int, vers.split("."))
30 return major, minor
31
32 cuda_major, _ = get_vers("CUDA")
33 return "-cu{cuda_major}".format(cuda_major=cuda_major)

Callers 1

get_version_rangeFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected