提交 f26fbaec authored 作者: Frederic Bastien's avatar Frederic Bastien

make code more clear and generate c_code more often for gemm.

上级 38259804
...@@ -56,7 +56,7 @@ def ldflags(libs=True, flags=False, libs_dir=False, include_dir=False): ...@@ -56,7 +56,7 @@ def ldflags(libs=True, flags=False, libs_dir=False, include_dir=False):
for d in dirs: for d in dirs:
for f in os.listdir(d): for f in os.listdir(d):
if f.endswith('.so') or f.endswith('.dylib') or f.endswith('.dll'): if f.endswith('.so') or f.endswith('.dylib') or f.endswith('.dll'):
if any([f.find(l)>=0 for l in l]): if any([f.find(ll)>=0 for ll in l]):
found_dyn=True found_dyn=True
if not found_dyn and dirs: if not found_dyn and dirs:
warning("We did not found a dynamic library into the library_dir of the library we use for blas. If you use ATLAS, make sure to compile it with dynamics library.") warning("We did not found a dynamic library into the library_dir of the library we use for blas. If you use ATLAS, make sure to compile it with dynamics library.")
...@@ -507,7 +507,7 @@ class Gemm(GemmRelated): ...@@ -507,7 +507,7 @@ class Gemm(GemmRelated):
""" """
def c_code(self, node, name, (_z, _a, _x, _y, _b), (_zout, ), sub): #DEBUG def c_code(self, node, name, (_z, _a, _x, _y, _b), (_zout, ), sub): #DEBUG
if len(self.c_libraries())<=0: if not config.blas.ldflags:
return super(Gemm, self).c_code(node, name, (_z, _a, _x, _y, _b), (_zout, ), sub) return super(Gemm, self).c_code(node, name, (_z, _a, _x, _y, _b), (_zout, ), sub)
full_code = self.build_gemm_call() % dict(locals(), **sub) full_code = self.build_gemm_call() % dict(locals(), **sub)
return full_code return full_code
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论