提交 47abda69 authored 作者: Misha Denil's avatar Misha Denil

Add config option to specifiy cublas library name.

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