提交 4507dd16 authored 作者: Frederic Bastien's avatar Frederic Bastien

Make nvcc.flags being using for cuda_ndarray

上级 9cbbbd7a
...@@ -194,15 +194,16 @@ if compile_cuda_ndarray and cuda_available: ...@@ -194,15 +194,16 @@ if compile_cuda_ndarray and cuda_available:
tmpdir = os.environ['TMPDIR'] tmpdir = os.environ['TMPDIR']
if not os.path.exists(tmpdir): if not os.path.exists(tmpdir):
os.makedirs(tmpdir) os.makedirs(tmpdir)
compiler = nvcc_compiler.NVCC_compiler() compiler = nvcc_compiler.NVCC_compiler()
preargs = ['-O3'] + compiler.compile_args()
preargs += [f for f in config.nvcc.flags.split(' ') if f]
compiler.compile_str( compiler.compile_str(
'cuda_ndarray', 'cuda_ndarray',
code, code,
location=cuda_ndarray_loc, location=cuda_ndarray_loc,
include_dirs=[cuda_path], include_dirs=[cuda_path],
libs=[config.cublas.lib], libs=[config.cublas.lib],
preargs=['-O3'] + compiler.compile_args(), preargs=preargs,
) )
from cuda_ndarray.cuda_ndarray import * from cuda_ndarray.cuda_ndarray import *
except Exception as e: except Exception as e:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论