提交 e2a5c01f authored 作者: notoraptor's avatar notoraptor

Fix properly the warning code that must be showed

when g++ is not detected but the user has not set the cxx flag.
上级 3cfe6ed8
......@@ -488,13 +488,8 @@ else:
"Default linker used if the theano flags mode is Mode",
EnumStr('vm', 'py', 'vm_nogc'),
in_c_key=False)
try:
if type(config).cxx.is_default:
# If the user provided an empty value for cxx, do not warn.
theano.configparser.fetch_val_for_key('cxx')
except KeyError:
# This warning is strangely showed on Windows even if cxx is set to an empty value in THEANO_FLAGS.
# I add this test to ensure we do not warn if it's the user who provided a value for cxx on Windows.
if sys.platform != 'win32' or 'THEANO_FLAGS' not in os.environ or 'cxx=' not in os.environ['THEANO_FLAGS']:
_logger.warning(
'g++ not detected ! Theano will be unable to execute '
'optimized C-implementations (for both CPU and GPU) and will '
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论