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

Don't force recompile with the new flag

上级 abbfa22f
...@@ -1153,7 +1153,9 @@ AddConfigVar('cmodule.age_thresh_use', ...@@ -1153,7 +1153,9 @@ AddConfigVar('cmodule.age_thresh_use',
AddConfigVar('cmodule.debug', AddConfigVar('cmodule.debug',
"If True, define a DEBUG macro (if not exists) for any compiled C code.", "If True, define a DEBUG macro (if not exists) for any compiled C code.",
BoolParam(False), 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(): def default_blas_ldflags():
......
...@@ -191,7 +191,16 @@ def get_config_md5(): ...@@ -191,7 +191,16 @@ def get_config_md5():
We only take into account config options for which `in_c_key` is True. 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) key=lambda cv: cv.fullname)
return theano.gof.utils.hash_from_code('\n'.join( return theano.gof.utils.hash_from_code('\n'.join(
['%s = %s' % (cv.fullname, cv.__get__(True, None)) for cv in all_opts])) ['%s = %s' % (cv.fullname, cv.__get__(True, None)) for cv in all_opts]))
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论