提交 58135c60 authored 作者: Frederic Bastien's avatar Frederic Bastien

Ad dnn.include_dirs by default includa cuda_root, we remove it by default…

Ad dnn.include_dirs by default includa cuda_root, we remove it by default instead of doing a warning.
上级 d3924338
...@@ -223,17 +223,19 @@ class NVCC_compiler(Compiler): ...@@ -223,17 +223,19 @@ class NVCC_compiler(Compiler):
libs.append('cudart') libs.append('cudart')
lib_dirs = lib_dirs + std_lib_dirs() lib_dirs = lib_dirs + std_lib_dirs()
if any(ld == os.path.join(cuda_root, 'lib') or
ld == os.path.join(cuda_root, 'lib64') for ld in lib_dirs): # config.dnn.include_path add this by default for cudnn in the
warnings.warn("You have the cuda library directory in your " # new back-end. This should not be used in this back-end. So
"lib_dirs. This has been known to cause problems " # just remove them.
"and should not be done.") lib_dirs = [ld for ld in lib_dirs if
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
# explicitly where it is located # explicitly where it is located
# this returns somepath/lib/python2.x # this returns somepath/lib/python2.x
python_lib = distutils.sysconfig.get_python_lib(plat_specific=1, \ python_lib = distutils.sysconfig.get_python_lib(plat_specific=1,
standard_lib=1) standard_lib=1)
python_lib = os.path.dirname(python_lib) python_lib = os.path.dirname(python_lib)
if python_lib not in lib_dirs: if python_lib not in lib_dirs:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论