提交 9520fdec authored 作者: Frédéric Bastien's avatar Frédéric Bastien 提交者: GitHub

Merge pull request #6102 from nouiz/flags

Try to fix travis. Don't recompile du to new flag when not needed.
......@@ -1153,7 +1153,9 @@ AddConfigVar('cmodule.age_thresh_use',
AddConfigVar('cmodule.debug',
"If True, define a DEBUG macro (if not exists) for any compiled C code.",
BoolParam(False),
in_c_key=True)
# Do not add it in the c key when we keep use the old default.
# To do not recompile for no good reason.
in_c_key=lambda: theano.config.cmodule.debug)
def default_blas_ldflags():
......
......@@ -191,7 +191,16 @@ def get_config_md5():
We only take into account config options for which `in_c_key` is True.
"""
all_opts = sorted([c for c in _config_var_list if c.in_c_key],
all_opts = []
for c in _config_var_list:
if callable(c.in_c_key):
i = c.in_c_key()
else:
i = c.in_c_key
if i:
all_opts.append(c)
all_opts = sorted(all_opts,
key=lambda cv: cv.fullname)
return theano.gof.utils.hash_from_code('\n'.join(
['%s = %s' % (cv.fullname, cv.__get__(True, None)) for cv in all_opts]))
......
......@@ -1051,7 +1051,7 @@ class ModuleCache(object):
assert key in all_keys
for k in all_keys:
if k in self.entry_from_key:
assert self.entry_from_key[k] == name
assert self.entry_from_key[k] == name, (self.entry_from_key[k], name)
else:
self.entry_from_key[k] = name
if key[0]:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论