From 221d18167ea0d85b427408e2b22f0f01294f07ff Mon Sep 17 00:00:00 2001 From: Skye Wanderman-Milne <skyewm@google.com> Date: Thu, 25 Apr 2019 11:25:13 -0700 Subject: [PATCH] Make cudnn.h version detection more robust in find_cuda_config.py. This change allows the script to properly parse version specifications like: #define CUDNN_MAJOR 7 #define CUDNN_MINOR 0 #define CUDNN_PATCHLEVEL 2 PiperOrigin-RevId: 245273662 --- third_party/gpus/find_cuda_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/gpus/find_cuda_config.py b/third_party/gpus/find_cuda_config.py index faabd827def..90265f60773 100644 --- a/third_party/gpus/find_cuda_config.py +++ b/third_party/gpus/find_cuda_config.py @@ -116,7 +116,7 @@ def _at_least_version(actual_version, required_version): def _get_header_version(path, name): """Returns preprocessor defines in C header file.""" for line in open(path, "r").readlines(): - match = re.match("#define %s (\d+)" % name, line) + match = re.match("#define %s +(\d+)" % name, line) if match: return match.group(1) return ""