提交 fac25eaf authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Use the right libs path for cudnn on mac and don't remove it in nvcc_compiler

上级 f902e1b3
...@@ -338,7 +338,7 @@ AddConfigVar('dnn.include_path', ...@@ -338,7 +338,7 @@ AddConfigVar('dnn.include_path',
AddConfigVar('dnn.library_path', AddConfigVar('dnn.library_path',
"Location of the cudnn header (defaults to the cuda root)", "Location of the cudnn header (defaults to the cuda root)",
StrParam(default_dnn_path('lib64'))) StrParam(default_dnn_path('lib' if sys.platform == 'darwin' else 'lib64')))
AddConfigVar('dnn.enabled', AddConfigVar('dnn.enabled',
"'auto', use CuDNN if available, but silently fall back" "'auto', use CuDNN if available, but silently fall back"
......
...@@ -224,12 +224,13 @@ class NVCC_compiler(Compiler): ...@@ -224,12 +224,13 @@ class NVCC_compiler(Compiler):
lib_dirs = lib_dirs + std_lib_dirs() lib_dirs = lib_dirs + std_lib_dirs()
# config.dnn.include_path add this by default for cudnn in the if sys.platform != 'darwin':
# new back-end. This should not be used in this back-end. So # config.dnn.include_path add this by default for cudnn in the
# just remove them. # new back-end. This should not be used in this back-end. So
lib_dirs = [ld for ld in lib_dirs if # just remove them.
not(ld == os.path.join(cuda_root, 'lib') or lib_dirs = [ld for ld in lib_dirs if
ld == os.path.join(cuda_root, 'lib64'))] not(ld == os.path.join(cuda_root, 'lib') or
ld == os.path.join(cuda_root, 'lib64'))]
if sys.platform != 'darwin': if sys.platform != 'darwin':
# sometimes, the linker cannot find -lpython so we need to tell it # sometimes, the linker cannot find -lpython so we need to tell it
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论