提交 e3c3ee49 authored 作者: Frédéric Bastien's avatar Frédéric Bastien

Merge pull request #1630 from mdenil/cublas-config-option

Add config option to specifiy cublas library name.
......@@ -29,6 +29,10 @@ AddConfigVar('pycuda.init',
BoolParam(False),
in_c_key=False)
AddConfigVar('cublas.lib',
"""Name of the cuda blas library for the linker.""",
StrParam('cublas'))
#is_nvcc_available called here to initialize global vars in
#nvcc_compiler module
......@@ -152,7 +156,7 @@ if compile_cuda_ndarray and cuda_available:
'cuda_ndarray',
code,
location=cuda_ndarray_loc,
include_dirs=[cuda_path], libs=['cublas'],
include_dirs=[cuda_path], libs=[config.cublas.lib],
preargs=['-O3'] + compiler.compile_args())
from cuda_ndarray.cuda_ndarray import *
except Exception, e:
......
......@@ -400,7 +400,7 @@ class CudaNdarrayType(Type):
def c_libraries(self):
# returning cublas because the cuda_ndarray.cuh header
# includes calls to SetVector and cublasGetError
return ['cudart', 'cublas', 'cuda_ndarray']
return ['cudart', config.cublas.lib, 'cuda_ndarray']
def c_support_code(cls):
return ""
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论