[Prebuild] Add prebuilt TensorRT build number (#545)

* Add prebuilt TensorRT build number

* fix
pull/551/head
q.yao 2022-06-01 22:49:55 +08:00 committed by GitHub
parent ea1122ce88
commit 9cbf9ecb18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -232,10 +232,12 @@ def check_env(cfg: Dict):
major = re.search(r'#define NV_TENSORRT_MAJOR (\d+)', data)
minor = re.search(r'#define NV_TENSORRT_MINOR (\d+)', data)
patch = re.search(r'#define NV_TENSORRT_PATCH (\d+)', data)
build = re.search(r'#define NV_TENSORRT_BUILD (\d+)', data)
if major is not None and minor is not None and patch is not None:
tensorrt_version = f'{major.group(1)}.' +\
f'{minor.group(1)}.' +\
f'{patch.group(1)}'
f'{patch.group(1)}.' +\
f'{build.group(1)}'
env_info['trt_v'] = tensorrt_version