提交 a14ed233 authored 作者: Frederic's avatar Frederic

Don't hide symbol only when using cnmem and raise error on mac for now.

上级 81eba6e7
......@@ -190,6 +190,10 @@ if compile_cuda_ndarray and cuda_available:
os.makedirs(tmpdir)
compiler = nvcc_compiler.NVCC_compiler()
if sys.platform == 'darwin' and config.lib.cnmem:
raise Exception(
"Currently CNMeM isn't supported on Mac due to"
" problems with symbols on Mac.")
compiler.compile_str(
'cuda_ndarray',
code,
......@@ -197,7 +201,7 @@ if compile_cuda_ndarray and cuda_available:
include_dirs=[cuda_path],
libs=[config.cublas.lib],
preargs=['-O3'] + compiler.compile_args(),
hide_symbols=False,
hide_symbols=config.lib.cnmem,
)
from cuda_ndarray.cuda_ndarray import *
except Exception as e:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论