提交 3b1b4afe authored 作者: notoraptor's avatar notoraptor

Ensure the warning about missing G++ is not showed on Windows

if the user does explicitely set the cxx config flag in THEANO_FLAGS.
上级 0f446def
...@@ -492,6 +492,9 @@ else: ...@@ -492,6 +492,9 @@ else:
# If the user provided an empty value for cxx, do not warn. # If the user provided an empty value for cxx, do not warn.
theano.configparser.fetch_val_for_key('cxx') theano.configparser.fetch_val_for_key('cxx')
except KeyError: 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( _logger.warning(
'g++ not detected ! Theano will be unable to execute ' 'g++ not detected ! Theano will be unable to execute '
'optimized C-implementations (for both CPU and GPU) and will ' 'optimized C-implementations (for both CPU and GPU) and will '
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论