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

[paddle cpu inference]fix cpu doc #9299

Merged
merged 1 commit into from
Oct 29, 2024
Merged

Conversation

bukejiyu
Copy link
Contributor

@bukejiyu bukejiyu commented Oct 22, 2024

PR types

Others

PR changes

Docs

Description

pcard-71500
修复cpu avx模型文档及运行异常

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link

paddle-bot bot commented Oct 22, 2024

Thanks for your contribution!

Copy link

codecov bot commented Oct 22, 2024

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 52.60%. Comparing base (76a118b) to head (75203c4).
Report is 272 commits behind head on develop.

Files with missing lines Patch % Lines
...erimental/transformers/fused_transformer_layers.py 0.00% 2 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

@@ -291,7 +291,6 @@ def forward(
@paddle.no_grad()
# avx
def set_state_dict(self, state_dict):
self.transformer_block.init_weight()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

确定把这个删了能跑?

Copy link
Contributor Author

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个的话,如果安装了 gpu 版本的 paddle,跑CPU,是不是还是有问题?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是的 是会有问题 目前不支持 用paddle-gpu 版本跑cpu avx推理

@@ -4,6 +4,7 @@

### 1.环境准备
```shell
cmake >=3.18
# 查询机器是否支持 avx512指令
lscpu | grep avx512*
```
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个文档略简单了,不支持的话avx,用户需要怎样? 还依赖一些什么环境,除了cmake gcc?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

比如建议 什么 版本的 操作系统之类的。

Copy link
Contributor Author

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*)'

@bukejiyu bukejiyu force-pushed the doc_fix branch 2 times, most recently from 0298808 to 18d789a Compare October 23, 2024 07:33
@ZHUI ZHUI merged commit 975d5c7 into PaddlePaddle:develop Oct 29, 2024
8 of 12 checks passed
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

Successfully merging this pull request may close these issues.

4 participants