Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

动态推理时出现报错 #6843

Open
DocKris opened this issue Aug 20, 2024 · 1 comment
Open

动态推理时出现报错 #6843

DocKris opened this issue Aug 20, 2024 · 1 comment

Comments

@DocKris
Copy link

DocKris commented Aug 20, 2024

文档链接&描述 Document Links & Description

python predictor.py --model_name_or_path THUDM/chatglm2-6b --data_file ./mydata/dev.json --dtype float16
WARNING: OMP_NUM_THREADS set to 10, not 1. The computation speed will not be optimized if you use data parallel. It will fail if this PaddlePaddle binary is compiled with OpenBlas since OpenBlas does not support multi-threads.
PLEASE USE OMP_NUM_THREADS WISELY.
Traceback (most recent call last):
File "/root/autodl-tmp/PaddleNLP/llm/predictor.py", line 29, in
from paddle.base.framework import in_cinn_mode, in_pir_executor_mode
ImportError: cannot import name 'in_cinn_mode' from 'paddle.base.framework' (/root/miniconda3/envs/dbgpt/lib/python3.10/site-packages/paddle/base/framework.py)
运行动态图推理出现这种报错怎么回事呢?

请提出你的建议/提个PR修复这个问题 Please give your suggestion/update a PR to fix it

No response

@Echo-Nie
Copy link
Contributor

WARNING: OMP_NUM_THREADS set to 10, not 1. The computation speed will not be optimized if you use data parallel. It will fail if this PaddlePaddle binary is compiled with OpenBlas since OpenBlas does not support multi-threads.

第一个是warning,OMP_NUM_THREADS 设置为 10,但建议设置为 1

问题出现在cinn_mode,因为cinn_mode是paddle的新功能,可能你paddle版本不是最新的,建议可以使用develop版本是没问题的,如下:
https://www.[paddlepaddle.org.cn/whl/linux/gpu/develop.html](https://www.paddlepaddle.org.cn/whl/linux/gpu/develop.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants