Unverified 提交 684ccca0 authored 作者: Pascal Lamblin's avatar Pascal Lamblin 提交者: GitHub

Merge pull request #6589 from abergeron/mkl_fixed

Don't ask for MKL_THREADING_LAYER=GNU if NumPy is fixed
...@@ -1246,14 +1246,24 @@ def check_mkl_openmp(): ...@@ -1246,14 +1246,24 @@ def check_mkl_openmp():
if ('MKL_THREADING_LAYER' in os.environ and if ('MKL_THREADING_LAYER' in os.environ and
os.environ['MKL_THREADING_LAYER'] == 'GNU'): os.environ['MKL_THREADING_LAYER'] == 'GNU'):
return return
try:
import numpy._mklinit # noqa
return
except ImportError:
pass
try: try:
import mkl import mkl
if '2018' in mkl.get_version_string(): if '2018' in mkl.get_version_string():
raise RuntimeError('To use MKL 2018 with Theano you MUST set "MKL_THREADING_LAYER=GNU" in your environment.') raise RuntimeError("""
To use MKL 2018 with Theano either update the numpy conda packages to
their latest build or set "MKL_THREADING_LAYER=GNU" in your
environment.
""")
except ImportError: except ImportError:
raise RuntimeError(""" raise RuntimeError("""
Could not import 'mkl'. Either install mkl-service with conda or set Could not import 'mkl'. If you are using conda, update the numpy
MKL_THREADING_LAYER=GNU in your environment for MKL 2018. packages to the latest build otherwise, set MKL_THREADING_LAYER=GNU in
your environment for MKL 2018.
If you have MKL 2017 install and are not in a conda environment you If you have MKL 2017 install and are not in a conda environment you
can set the Theano flag blas.check_openmp to False. Be warned that if can set the Theano flag blas.check_openmp to False. Be warned that if
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论