未验证 提交 5c514f5e 编写于 作者: Z Zhou Wei 提交者: GitHub

polish avx/no_avx install (#33818)

上级 4d4fb660
...@@ -290,17 +290,13 @@ if avx_supported(): ...@@ -290,17 +290,13 @@ if avx_supported():
else: else:
from .. import compat as cpt from .. import compat as cpt
sys.stderr.write( sys.stderr.write(
"WARNING: AVX is supported on local machine, but you have installed " "Hint: Your machine support AVX, but the installed paddlepaddle doesn't have avx core. "
"paddlepaddle without avx core. Hence, no_avx core which has worse " "Hence, no-avx core with worse preformance will be imported.\nIf you like, you could "
"preformance will be imported.\nYou could reinstall paddlepaddle by " "reinstall paddlepaddle by 'python -m pip install --force-reinstall paddlepaddle-gpu[==version]' "
"'python -m pip install --force-reinstall paddlepaddle-gpu[==version]' or rebuild " "to get better performance.\nThe original error is: %s\n" %
"paddlepaddle WITH_AVX=ON to get better performance.\n" cpt.get_exception_message(e))
"The original error is: %s\n" % cpt.get_exception_message(e))
load_noavx = True load_noavx = True
else: else:
sys.stderr.write(
"WARNING: AVX is not support on your machine. Hence, no_avx core will be imported, "
"It has much worse preformance than avx core.\n")
load_noavx = True load_noavx = True
if load_noavx: if load_noavx:
...@@ -339,17 +335,14 @@ if load_noavx: ...@@ -339,17 +335,14 @@ if load_noavx:
current_path + os.sep + 'core_noavx.' + core_suffix + '\n') current_path + os.sep + 'core_noavx.' + core_suffix + '\n')
elif avx_supported(): elif avx_supported():
sys.stderr.write( sys.stderr.write(
"Error: AVX is support on your machine, but you have installed " "Error: The installed PaddlePaddle is incorrect. You should reinstall it by "
"paddlepaddle without avx core, you should reinstall paddlepaddle by " "'python -m pip install --force-reinstall paddlepaddle-gpu[==version]'\n"
"'python -m pip install --force-reinstall paddlepaddle-gpu[==version]\n"
) )
else: else:
sys.stderr.write( sys.stderr.write(
"Error: AVX is not support on your machine, but you have installed " "Error: Your machine doesn't support AVX, but the installed PaddlePaddle is avx core, "
"paddlepaddle without no_avx core, you should reinstall paddlepaddle by " "you should reinstall paddlepaddle with no-avx core.\n")
"'python -m pip install --force-reinstall paddlepaddle-gpu[==version] -f "
"https://paddlepaddle.org.cn/whl/mkl/stable/noavx.html or "
"https://paddlepaddle.org.cn/whl/openblas/stable/noavx.html\n")
raise e raise e
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册