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

changed the default config value of mode to Mode. That don't change the default…

changed the default config value of mode to Mode. That don't change the default comportement, but allow by default to take into account the theano flags optimizer and linker.
上级 13371bff
...@@ -15,17 +15,16 @@ AddConfigVar('device', ...@@ -15,17 +15,16 @@ AddConfigVar('device',
EnumStr('cpu', 'gpu',*['gpu%i'%i for i in range(4)]) EnumStr('cpu', 'gpu',*['gpu%i'%i for i in range(4)])
) )
# keep the default mode.optimizer==config.optimizer and mode.linker==config.linker!
AddConfigVar('mode', AddConfigVar('mode',
"Default compilation mode", "Default compilation mode",
EnumStr('FAST_RUN', 'FAST_COMPILE', 'PROFILE_MODE', 'DEBUG_MODE', 'Mode', 'ProfileMode', 'DebugMode')) EnumStr('Mode', 'ProfileMode', 'DebugMode', 'FAST_RUN', 'FAST_COMPILE', 'PROFILE_MODE', 'DEBUG_MODE'))
#Keep the default linker the same as the one for the mode #Keep the default linker the same as the one for the mode FAST_RUN
AddConfigVar('linker', AddConfigVar('linker',
"Default linker. If not None, will use this linker with the Mode object(not ProfileMode or DebugMode)", "Default linker. If not None, will use this linker with the Mode object(not ProfileMode or DebugMode)",
EnumStr('c|py', 'py', 'c', 'c|py_nogc', 'c&py')) EnumStr('c|py', 'py', 'c', 'c|py_nogc', 'c&py'))
#Keep the default optimizer the same as the one for the mode #Keep the default optimizer the same as the one for the mode FAST_RUN
AddConfigVar('optimizer', AddConfigVar('optimizer',
"Default optimizer. If not None, will use this linker with the Mode object(not ProfileMode or DebugMode)", "Default optimizer. If not None, will use this linker with the Mode object(not ProfileMode or DebugMode)",
EnumStr('fast_run', 'merge', 'fast_compile', 'None')) EnumStr('fast_run', 'merge', 'fast_compile', 'None'))
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论