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

Add Theano flag cmodule.age_thresh_use

上级 42a99bcc
......@@ -1071,6 +1071,14 @@ import theano and print the config variable, as in:
If set to True, will preload the C module cache at import time
.. attribute:: config.cmodule.age_thresh_use
Int value, default: ``60 * 60 * 24 * 24`` # 24 days
In seconds. The time after which a compiled c module won't be
reused by Theano. Automatic deletion of those c module 7 days
after that time.
.. attribute:: config.traceback.limit
Int value, default: 8
......
......@@ -1143,6 +1143,13 @@ AddConfigVar('cmodule.preload_cache',
BoolParam(False, allow_override=False),
in_c_key=False)
AddConfigVar('cmodule.age_thresh_use',
"In seconds. The time after which "
"Theano won't reuse a compile c module.",
# 24 days
IntParam(60 * 60 * 24 * 24, allow_override=False),
in_c_key=False)
def default_blas_ldflags():
global numpy
......
......@@ -669,7 +669,7 @@ class ModuleCache(object):
if do_refresh:
self.refresh()
age_thresh_use = 60 * 60 * 24 * 24 # 24 days
age_thresh_use = config.cmodule.age_thresh_use # default 24 days
"""
The default age threshold (in seconds) for cache files we want to use.
......@@ -1241,7 +1241,8 @@ class ModuleCache(object):
self.time_spent_in_check_key += time.time() - start_time
age_thresh_del = 60 * 60 * 24 * 31 # 31 days
# default 31 days
age_thresh_del = config.cmodule.age_thresh_use + 60 * 60 * 24 * 7
age_thresh_del_unversioned = 60 * 60 * 24 * 7 # 7 days
"""
The default age threshold for `clear_old` (in seconds).
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论