From d77d308023cb391115539e5178f6ad6b853153be Mon Sep 17 00:00:00 2001 From: Gunhan Gulsoy Date: Tue, 30 Apr 2019 16:04:20 -0700 Subject: [PATCH] During cuda config detection, make find_cuda_config strip spaces around versions PiperOrigin-RevId: 246040939 --- third_party/gpus/find_cuda_config.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/third_party/gpus/find_cuda_config.py b/third_party/gpus/find_cuda_config.py index c3bf0038846..7662e9e46ae 100644 --- a/third_party/gpus/find_cuda_config.py +++ b/third_party/gpus/find_cuda_config.py @@ -104,6 +104,10 @@ def _matches_version(actual_version, required_version): """ if actual_version is None: return False + + # Strip spaces from the versions. + actual_version = actual_version.strip() + required_version = required_version.strip() return actual_version.startswith(required_version)