aboutsummaryrefslogtreecommitdiffhomepage
path: root/configure.py
diff options
context:
space:
mode:
Diffstat (limited to 'configure.py')
-rw-r--r--configure.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/configure.py b/configure.py
index 3aa1a3e956..68c9bbfb1c 100644
--- a/configure.py
+++ b/configure.py
@@ -1050,12 +1050,15 @@ def set_tf_tensorrt_install_path(environ_cp):
cuda_ver = convert_version_to_int(environ_cp['TF_CUDA_VERSION'])
cudnn_ver = convert_version_to_int(environ_cp['TF_CUDNN_VERSION'])
- nvinfer_pattern = re.compile('.*libnvinfer.so.?(.*)$')
+ nvinfer_pattern = re.compile('.*libnvinfer(?:_debug)?.so.?(.*)$')
highest_ver = [0, None, None]
for lib_file in possible_files:
if is_compatible(lib_file, cuda_ver, cudnn_ver):
- ver_str = nvinfer_pattern.search(lib_file).group(1)
+ matches=nvinfer_pattern.search(lib_file)
+ if len(matches.groups()) == 0:
+ continue
+ ver_str = matches.group(1)
ver = convert_version_to_int(ver_str) if len(ver_str) else 0
if ver > highest_ver[0]:
highest_ver = [ver, ver_str, lib_file]