-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[xpu] add xpu custom ops support for llama2-7b #8515
Conversation
Thanks for your contribution! |
0dc9588
to
cfead95
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #8515 +/- ##
===========================================
+ Coverage 54.03% 54.43% +0.40%
===========================================
Files 618 632 +14
Lines 96700 99451 +2751
===========================================
+ Hits 52251 54137 +1886
- Misses 44449 45314 +865 ☔ View full report in Codecov by Sentry. |
cfead95
to
8f01c25
Compare
csrc/xpu/README.md
Outdated
# 构建 XDNN plugin 和 Paddle 自定义算子库 | ||
``` | ||
$ cd src | ||
# 修改 ./cmake_build.sh 脚本设置 XDNN, XRE and XTDK 的路径后一键执行。 |
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.
XDNN, XRE and XTDK是否能提供获取方法
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.
done
csrc/xpu/src/cmake_build.sh
Outdated
@@ -0,0 +1,29 @@ | |||
#!/bin/bash | |||
|
|||
# Copyright (c) 2023 PaddlePaddle Authors. All Rights Reserved. |
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.
所有的2023->2024
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.
done
csrc/xpu/src/cmake_build.sh
Outdated
# export HOST_SYSROOT=/opt/compiler/gcc-8.2/bin/gcc # <path_to_gcc> | ||
|
||
cd plugin | ||
./build.sh |
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.
plugin无build.sh
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.
done
e4c7062
to
6c36d92
Compare
6c36d92
to
4e814b7
Compare
csrc/xpu/README.md
Outdated
``` | ||
|
||
## 讨论 | ||
如果遇到问题,可以联系 luowei14@baidu.com, zhupengyang@baidu.com, shentanyue01@baidu.com, jiangfan06@baidu.com 或 hongming@baidu.com 解决。 |
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.
remove this
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.
done
csrc/xpu/src/get_output.cc
Outdated
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.
maybe can reuse the file from gpu directory?
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.
done
4e814b7
to
96d7902
Compare
|
||
import numpy as np | ||
import paddle | ||
from paddlenlp_ops import get_padding_offset_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.
最好可以写成 unittest 的格式,方便运行。
class Test(unittest.TestCase):
pass
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.
done
96d7902
to
c76b96f
Compare
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.
LGTM
PR types
Others
PR changes
Others
Description
add xpu custom ops support for llama2-7b