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

Function process_version_part

tools/Polygraphy/polygraphy/mod/util.py:20–31  ·  view source on GitHub ↗
(num)

Source from the content-addressed store, hash-verified

18
19def version(version_str):
20 def process_version_part(num):
21 try:
22 return [int(num)]
23 except ValueError:
24 VERSION_SUFFIXES = ["a", "b", "rc", "post", "dev"]
25 # One version part can only contain one of the above suffixes
26 for suffix in VERSION_SUFFIXES:
27 if suffix in num:
28 return num.partition(suffix)
29
30 # For unrecognized suffixes, just return as-is
31 return [num]
32
33 ver_list = []
34 for num in version_str.split("."):

Callers 1

versionFunction · 0.85

Calls 1

partitionMethod · 0.80

Tested by

no test coverage detected