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

[xpu] add xpu custom ops support for llama2-7b #8515

Merged
merged 1 commit into from
Jun 12, 2024

Conversation

NeroLoh
Copy link
Contributor

@NeroLoh NeroLoh commented May 30, 2024

PR types

Others

PR changes

Others

Description

add xpu custom ops support for llama2-7b

Copy link

paddle-bot bot commented May 30, 2024

Thanks for your contribution!

@NeroLoh NeroLoh force-pushed the add_xpu_custom_ops branch 2 times, most recently from 0dc9588 to cfead95 Compare May 30, 2024 11:09
Copy link

codecov bot commented May 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 54.43%. Comparing base (c1cfe63) to head (c76b96f).
Report is 277 commits behind head on develop.

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.
📢 Have feedback on the report? Share it here.

# 构建 XDNN plugin 和 Paddle 自定义算子库
```
$ cd src
# 修改 ./cmake_build.sh 脚本设置 XDNN, XRE and XTDK 的路径后一键执行。
Copy link
Contributor

Choose a reason for hiding this comment

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

XDNN, XRE and XTDK是否能提供获取方法

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@@ -0,0 +1,29 @@
#!/bin/bash

# Copyright (c) 2023 PaddlePaddle Authors. All Rights Reserved.
Copy link
Contributor

@zhink zhink Jun 3, 2024

Choose a reason for hiding this comment

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

所有的2023->2024

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

# export HOST_SYSROOT=/opt/compiler/gcc-8.2/bin/gcc # <path_to_gcc>

cd plugin
./build.sh
Copy link
Contributor

Choose a reason for hiding this comment

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

plugin无build.sh

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@NeroLoh NeroLoh force-pushed the add_xpu_custom_ops branch 7 times, most recently from e4c7062 to 6c36d92 Compare June 11, 2024 12:51
```

## 讨论
如果遇到问题,可以联系 luowei14@baidu.com, zhupengyang@baidu.com, shentanyue01@baidu.com, jiangfan06@baidu.com 或 hongming@baidu.com 解决。
Copy link
Contributor

Choose a reason for hiding this comment

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

remove this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

ZHUI
ZHUI previously approved these changes Jun 12, 2024

import numpy as np
import paddle
from paddlenlp_ops import get_padding_offset_v2
Copy link
Collaborator

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

Copy link
Contributor Author

@NeroLoh NeroLoh Jun 12, 2024

Choose a reason for hiding this comment

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

done

Copy link
Collaborator

@ZHUI ZHUI left a comment

Choose a reason for hiding this comment

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

LGTM

@ZHUI ZHUI merged commit 5ba7a94 into PaddlePaddle:develop Jun 12, 2024
7 of 10 checks passed
This pull request was closed.
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