diff options
author | Niall Moran <niall.moran@gmail.com> | 2018-08-09 00:29:49 +0100 |
---|---|---|
committer | Niall Moran <niall.moran@gmail.com> | 2018-08-09 00:29:49 +0100 |
commit | b7d97e85a509dc14f3e81bb289fdb7bad64f0bbe (patch) | |
tree | 2cc3ca64dd5187ab872081d791fc9e9de350871d /configure.py | |
parent | 99ae68bba52bb6338af06f37bb104128d7af6fb4 (diff) |
Update cuda and cudnn paths to for debian
Diffstat (limited to 'configure.py')
-rw-r--r-- | configure.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/configure.py b/configure.py index f97bf8a668..bf570a9fa3 100644 --- a/configure.py +++ b/configure.py @@ -839,15 +839,16 @@ def set_tf_cuda_version(environ_cp): cuda_toolkit_path = cygpath(cuda_toolkit_path) if is_windows(): - cuda_rt_lib_path = 'lib/x64/cudart.lib' + cuda_rt_lib_paths = ['lib/x64/cudart.lib'] elif is_linux(): - cuda_rt_lib_path = 'lib64/libcudart.so.%s' % tf_cuda_version + cuda_rt_lib_paths = ['%s/libcudart.so.%s' % (x, tf_cuda_version) + for x in ['lib64', 'lib/x86_64-linux-gnu']] elif is_macos(): - cuda_rt_lib_path = 'lib/libcudart.%s.dylib' % tf_cuda_version + cuda_rt_lib_paths = ['lib/libcudart.%s.dylib' % tf_cuda_version] - cuda_toolkit_path_full = os.path.join(cuda_toolkit_path, cuda_rt_lib_path) - if os.path.exists(cuda_toolkit_path_full): - break + cuda_toolkit_paths_full = [os.path.join(cuda_toolkit_path, x) for x in cuda_rt_lib_paths] + if any([os.path.exists(x) for x in cuda_toolkit_paths_full]): + break # Reset and retry print('Invalid path to CUDA %s toolkit. %s cannot be found' % |