-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[paddle cpu inference]fix cpu doc #9299
Conversation
|
Thanks for your contribution! |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #9299 +/- ##
===========================================
- Coverage 53.11% 52.60% -0.51%
===========================================
Files 665 661 -4
Lines 109041 107403 -1638
===========================================
- Hits 57918 56501 -1417
+ Misses 51123 50902 -221 ☔ View full report in Codecov by Sentry. |
@@ -291,7 +291,6 @@ def forward( | |||
@paddle.no_grad() | |||
# avx | |||
def set_state_dict(self, state_dict): | |||
self.transformer_block.init_weight() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
确定把这个删了能跑?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
能跑
if ( | ||
paddle.device.get_all_custom_device_type() is not None and len(paddle.device.get_all_custom_device_type()) > 0 | ||
) or core.is_compiled_with_cuda(): | ||
from paddlenlp_ops import rebuild_padding_v2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个的话,如果安装了 gpu 版本的 paddle,跑CPU,是不是还是有问题?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
是的 是会有问题 目前不支持 用paddle-gpu 版本跑cpu avx推理
csrc/cpu/README.md
Outdated
@@ -4,6 +4,7 @@ | |||
|
|||
### 1.环境准备 | |||
```shell | |||
cmake >=3.18 | |||
# 查询机器是否支持 avx512指令 | |||
lscpu | grep avx512* | |||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个文档略简单了,不支持的话avx,用户需要怎样? 还依赖一些什么环境,除了cmake gcc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
比如建议 什么 版本的 操作系统之类的。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1.不支持avx的可以直接跑散op的版本,这是avx自定义算子的安装readme,详细的cpu跑通及环境限制readme 在https://github.com/PaddlePaddle/PaddleNLP/blob/2cc46e44455b879de95fdbe472c91607d83d8238/llm/docs/cpu_install.md
2.需要用户自己判断机器是否支持avx指令 lscpu | grep -o -P '(?<!\w)(avx\w*)'
0298808
to
18d789a
Compare
PR types
Others
PR changes
Docs
Description
pcard-71500
修复cpu avx模型文档及运行异常