提交 18437ecb authored 作者: Frederic's avatar Frederic

Add Theano flag cmodule.preload_cache

上级 57f82917
...@@ -699,3 +699,9 @@ import theano and print the config variable, as in: ...@@ -699,3 +699,9 @@ import theano and print the config variable, as in:
Bool value, default: False Bool value, default: False
If True, will print compilation warnings. If True, will print compilation warnings.
.. attribute:: cmodule.preload_cache'
Bool value, default: False
If set to True, will preload the C module cache at import time
...@@ -81,3 +81,6 @@ from theano.gof.type import \ ...@@ -81,3 +81,6 @@ from theano.gof.type import \
from theano.gof.utils import \ from theano.gof.utils import \
hashtype, object2, MethodNotDefined hashtype, object2, MethodNotDefined
if theano.config.cmodule.preload_cache:
cc.get_module_cache()
...@@ -62,6 +62,11 @@ AddConfigVar('cmodule.compilation_warning', ...@@ -62,6 +62,11 @@ AddConfigVar('cmodule.compilation_warning',
BoolParam(False)) BoolParam(False))
AddConfigVar('cmodule.preload_cache',
"If set to True, will preload the C module cache at import time",
BoolParam(False, allow_override=False),
in_c_key=False)
_logger = logging.getLogger("theano.gof.cmodule") _logger = logging.getLogger("theano.gof.cmodule")
_logger.setLevel(logging.WARNING) _logger.setLevel(logging.WARNING)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论