Skip to content

Commit c63b394

Browse files
committed
Merge branch 'develop' of https://github.com/PaddlePaddle/FastDeploy into rebuild_aapadding
2 parents dcf8f56 + 3ee6053 commit c63b394

File tree

78 files changed

+1326
-609
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+1326
-609
lines changed

.github/workflows/_accuracy_test.yml

Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
name: Accuracy Test
2+
description: "Run Accuracy Tests"
3+
4+
on:
5+
workflow_call:
6+
inputs:
7+
DOCKER_IMAGE:
8+
description: "Build Images"
9+
required: true
10+
type: string
11+
default: "ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlepaddle/paddleqa:cuda126-py310"
12+
FASTDEPLOY_ARCHIVE_URL:
13+
description: "URL of the compressed FastDeploy code archive."
14+
required: true
15+
type: string
16+
FASTDEPLOY_WHEEL_URL:
17+
description: "URL of the FastDeploy Wheel."
18+
required: true
19+
type: string
20+
CACHE_DIR:
21+
description: "Cache Dir Use"
22+
required: false
23+
type: string
24+
default: ""
25+
MODEL_CACHE_DIR:
26+
description: "Cache Dir Use"
27+
required: false
28+
type: string
29+
default: ""
30+
31+
jobs:
32+
accuracy_tests:
33+
runs-on: [self-hosted, GPU-h20-1Cards]
34+
steps:
35+
- name: Code Prepare
36+
shell: bash
37+
env:
38+
docker_image: ${{ inputs.DOCKER_IMAGE }}
39+
fd_archive_url: ${{ inputs.FASTDEPLOY_ARCHIVE_URL }}
40+
run: |
41+
set -x
42+
REPO="https://github.com/${{ github.repository }}.git"
43+
FULL_REPO="${{ github.repository }}"
44+
REPO_NAME="${FULL_REPO##*/}"
45+
BASE_BRANCH="${{ github.base_ref }}"
46+
47+
# Clean the repository directory before starting
48+
docker run --rm --net=host -v $(pwd):/workspace -w /workspace \
49+
-e "REPO_NAME=${REPO_NAME}" \
50+
${docker_image} /bin/bash -c '
51+
if [ -d ${REPO_NAME} ]; then
52+
echo "Directory ${REPO_NAME} exists, removing it..."
53+
rm -rf ${REPO_NAME}*
54+
fi
55+
'
56+
57+
wget -q ${fd_archive_url}
58+
tar -xf FastDeploy.tar.gz
59+
rm -rf FastDeploy.tar.gz
60+
cd FastDeploy
61+
git config --global user.name "FastDeployCI"
62+
git config --global user.email "fastdeploy_ci@example.com"
63+
git log -n 3 --oneline
64+
65+
- name: Run FastDeploy Base Tests
66+
shell: bash
67+
env:
68+
docker_image: ${{ inputs.DOCKER_IMAGE }}
69+
fastdeploy_wheel_url: ${{ inputs.FASTDEPLOY_WHEEL_URL }}
70+
CACHE_DIR: ${{ inputs.CACHE_DIR }}
71+
MODEL_CACHE_DIR: ${{ inputs.MODEL_CACHE_DIR }}
72+
run: |
73+
runner_name="${{ runner.name }}"
74+
CARD_ID=$(echo "${runner_name}" | awk -F'-' '{print $NF}')
75+
DEVICES=$(echo "$CARD_ID" | fold -w1 | paste -sd,)
76+
DEVICE_PORT=$(echo "$DEVICES" | cut -d',' -f1)
77+
78+
FLASK_PORT=$((42068 + DEVICE_PORT * 100))
79+
FD_API_PORT=$((42088 + DEVICE_PORT * 100))
80+
FD_ENGINE_QUEUE_PORT=$((42058 + DEVICE_PORT * 100))
81+
FD_METRICS_PORT=$((42078 + DEVICE_PORT * 100))
82+
echo "Test ENV Parameter:"
83+
echo "========================================================="
84+
echo "FLASK_PORT=${FLASK_PORT}"
85+
echo "FD_API_PORT=${FD_API_PORT}"
86+
echo "FD_ENGINE_QUEUE_PORT=${FD_ENGINE_QUEUE_PORT}"
87+
echo "FD_METRICS_PORT=${FD_METRICS_PORT}"
88+
echo "DEVICES=${DEVICES}"
89+
echo "========================================================="
90+
91+
CACHE_DIR="${CACHE_DIR:-$(dirname "$(dirname "${{ github.workspace }}")")}"
92+
echo "CACHE_DIR is set to ${CACHE_DIR}"
93+
if [ ! -f "${CACHE_DIR}/gitconfig" ]; then
94+
touch "${CACHE_DIR}/gitconfig"
95+
fi
96+
if [ ! -d "${MODEL_CACHE_DIR}" ]; then
97+
echo "Error: MODEL_CACHE_DIR '${MODEL_CACHE_DIR}' does not exist."
98+
exit 1
99+
fi
100+
101+
PORTS=($FLASK_PORT $FD_API_PORT $FD_ENGINE_QUEUE_PORT $FD_METRICS_PORT)
102+
LOG_FILE="./port_cleanup_$(date +%Y%m%d_%H%M%S).log"
103+
echo "==== LOG_FILE is ${LOG_FILE} ===="
104+
105+
echo "==== PORT CLEAN BEFORE TASK RUN ====" | tee -a $LOG_FILE
106+
107+
for port in "${PORTS[@]}"; do
108+
PIDS=$(lsof -t -i :$port || true)
109+
if [ -n "$PIDS" ]; then
110+
echo "Port $port is occupied by PID(s): $PIDS" | tee -a $LOG_FILE
111+
echo "$PIDS" | xargs -r kill -9
112+
echo "Port $port cleared" | tee -a $LOG_FILE
113+
else
114+
echo "Port $port is free" | tee -a $LOG_FILE
115+
fi
116+
done
117+
118+
echo "==== PORT CLEAN COMPLETE ====" | tee -a $LOG_FILE
119+
120+
docker run --rm --ipc=host --pid=host --net=host \
121+
-v $(pwd):/workspace \
122+
-w /workspace \
123+
-e fastdeploy_wheel_url=${fastdeploy_wheel_url} \
124+
-e "FD_API_PORT=${FD_API_PORT}" \
125+
-e "FD_ENGINE_QUEUE_PORT=${FD_ENGINE_QUEUE_PORT}" \
126+
-e "FD_METRICS_PORT=${FD_METRICS_PORT}" \
127+
-e "FLASK_PORT=${FLASK_PORT}" \
128+
-v "${MODEL_CACHE_DIR}:/MODELDATA" \
129+
-v "${CACHE_DIR}/gitconfig:/etc/gitconfig:ro" \
130+
-v "${CACHE_DIR}/.cache:/root/.cache" \
131+
-v "${CACHE_DIR}/ConfigDir:/root/.config" \
132+
-e TZ="Asia/Shanghai" \
133+
--gpus '"device='"${DEVICES}"'"' ${docker_image} /bin/bash -xc '
134+
python -m pip install --pre paddlepaddle-gpu -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
135+
136+
pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
137+
138+
python -m pip install ${fastdeploy_wheel_url}
139+
python -m pip install pytest
140+
141+
wget https://paddle-qa.bj.bcebos.com/zhengtianyu/tools/llm-deploy-linux-amd64
142+
chmod +x ./llm-deploy-linux-amd64
143+
./llm-deploy-linux-amd64 -python python3.10 \
144+
-model_name ERNIE-4.5-0.3B-Paddle \
145+
-model_path /MODELDATA \
146+
--skip install
147+
148+
git config --global --add safe.directory /workspace/FastDeploy
149+
cd FastDeploy
150+
pushd test/ce/deploy
151+
python3.10 deploy.py > dd.log 2>&1 &
152+
sleep 3
153+
curl -X POST http://0.0.0.0:${FLASK_PORT}/start \
154+
-H "Content-Type: application/json" \
155+
-d "{\"--model\": \"/MODELDATA/ERNIE-4.5-0.3B-Paddle\"}"
156+
157+
curl -X POST http://localhost:${FLASK_PORT}/wait_for_infer?timeout=90
158+
popd
159+
160+
pushd test/ce/accuracy_cases
161+
export URL=http://localhost:${FD_API_PORT}/v1/chat/completions
162+
export TEMPLATE=TOKEN_LOGPROB
163+
export MODEL_SIZE=0.3B
164+
TEST_EXIT_CODE=0
165+
python gsm8k.py || TEST_EXIT_CODE=1
166+
popd
167+
echo "TEST_EXIT_CODE=${TEST_EXIT_CODE}" >> /workspace/FastDeploy/exit_code.env
168+
'
169+
if [ -f ./FastDeploy/exit_code.env ]; then
170+
source ./FastDeploy/exit_code.env
171+
cat ./FastDeploy/exit_code.env >> $GITHUB_ENV
172+
fi
173+
echo "TEST_EXIT_CODE=${TEST_EXIT_CODE}"
174+
exit ${TEST_EXIT_CODE}

.github/workflows/pr_build_and_test.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,13 @@ jobs:
7373
FASTDEPLOY_ARCHIVE_URL: ${{ needs.clone.outputs.repo_archive_url }}
7474
FASTDEPLOY_WHEEL_URL: ${{ needs.build.outputs.wheel_path }}
7575
MODEL_CACHE_DIR: "/ssd2/actions-runner/ModelData"
76+
77+
accuracy_test:
78+
name: Run Accuracy Tests
79+
needs: [clone,build]
80+
uses: ./.github/workflows/_accuracy_test.yml
81+
with:
82+
DOCKER_IMAGE: ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlepaddle/paddleqa:fastdeploy-ciuse-cuda126-dailyupdate
83+
FASTDEPLOY_ARCHIVE_URL: ${{ needs.clone.outputs.repo_archive_url }}
84+
FASTDEPLOY_WHEEL_URL: ${{ needs.build.outputs.wheel_path }}
85+
MODEL_CACHE_DIR: "/ssd2/actions-runner/ModelData"

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
English | [简体中文](README_CN.md)
1+
English | [简体中文](README_CN.md)
22
<p align="center">
33
<a href="https://github.com/PaddlePaddle/FastDeploy/releases"><img src="https://github.com/user-attachments/assets/42b0039f-39e3-4279-afda-6d1865dfbffb" width="500"></a>
44
</p>
@@ -23,11 +23,10 @@ English | [简体中文](README_CN.md)
2323
</p>
2424

2525
--------------------------------------------------------------------------------
26-
# FastDeploy 2.0: Inference and Deployment Toolkit for LLMs and VLMs based on PaddlePaddle
26+
# FastDeploy : Inference and Deployment Toolkit for LLMs and VLMs based on PaddlePaddle
2727

2828
## News
29-
30-
**[2025-07] 《FastDeploy2.0推理部署实测》专题活动已上线!** 完成文心4.5系列开源模型的推理部署等任务,即可获得骨瓷马克杯等FastDeploy2.0官方周边及丰富奖金!🎁 欢迎大家体验反馈~ 📌[报名地址](https://www.wjx.top/vm/meSsp3L.aspx#) 📌[活动详情](https://github.com/PaddlePaddle/FastDeploy/discussions/2728)
29+
**[2025-08] 🔥 Released FastDeploy v2.1:** A brand-new KV Cache scheduling strategy has been introduced, and expanded support for PD separation and CUDA Graph across more models. Enhanced hardware support has been added for platforms like Kunlun and Hygon, along with comprehensive optimizations to improve the performance of both the service and inference engine.
3130

3231
**[2025-07] The FastDeploy 2.0 Inference Deployment Challenge is now live!** Complete the inference deployment task for the ERNIE 4.5 series open-source models to win official FastDeploy 2.0 merch and generous prizes! 🎁 You're welcome to try it out and share your feedback! 📌[Sign up here](https://www.wjx.top/vm/meSsp3L.aspx#) 📌[Event details](https://github.com/PaddlePaddle/FastDeploy/discussions/2728)
3332

@@ -51,14 +50,15 @@ English | [简体中文](README_CN.md)
5150

5251
## Installation
5352

54-
FastDeploy supports inference deployment on **NVIDIA GPUs**, **Kunlunxin XPUs**, **Iluvatar GPUs**, **Enflame GCUs**, and other hardware. For detailed installation instructions:
53+
FastDeploy supports inference deployment on **NVIDIA GPUs**, **Kunlunxin XPUs**, **Iluvatar GPUs**, **Enflame GCUs**, **Hygon DCUs** and other hardware. For detailed installation instructions:
5554

5655
- [NVIDIA GPU](./docs/get_started/installation/nvidia_gpu.md)
5756
- [Kunlunxin XPU](./docs/get_started/installation/kunlunxin_xpu.md)
5857
- [Iluvatar GPU](./docs/get_started/installation/iluvatar_gpu.md)
5958
- [Enflame GCU](./docs/get_started/installation/Enflame_gcu.md)
59+
- [Hygon DCU](./docs/get_started/installation/hygon_dcu.md)
6060

61-
**Note:** We are actively working on expanding hardware support. Additional hardware platforms including Ascend NPU, Hygon DCU, and MetaX GPU are currently under development and testing. Stay tuned for updates!
61+
**Note:** We are actively working on expanding hardware support. Additional hardware platforms including Ascend NPU and MetaX GPU are currently under development and testing. Stay tuned for updates!
6262

6363
## Get Started
6464

@@ -75,13 +75,13 @@ Learn how to use FastDeploy through our documentation:
7575

7676
| Model | Data Type | PD Disaggregation | Chunked Prefill | Prefix Caching | MTP | CUDA Graph | Maximum Context Length |
7777
|:--- | :------- | :---------- | :-------- | :-------- | :----- | :----- | :----- |
78-
|ERNIE-4.5-300B-A47B | BF16/WINT4/WINT8/W4A8C8/WINT2/FP8 ||||| WIP |128K |
79-
|ERNIE-4.5-300B-A47B-Base| BF16/WINT4/WINT8 ||||| WIP | 128K |
78+
|ERNIE-4.5-300B-A47B | BF16/WINT4/WINT8/W4A8C8/WINT2/FP8 ||||| |128K |
79+
|ERNIE-4.5-300B-A47B-Base| BF16/WINT4/WINT8 ||||| | 128K |
8080
|ERNIE-4.5-VL-424B-A47B | BF16/WINT4/WINT8 | WIP || WIP || WIP |128K |
8181
|ERNIE-4.5-VL-28B-A3B | BF16/WINT4/WINT8 ||| WIP || WIP |128K |
8282
|ERNIE-4.5-21B-A3B | BF16/WINT4/WINT8/FP8 ||||||128K |
83-
|ERNIE-4.5-21B-A3B-Base | BF16/WINT4/WINT8/FP8 | |||||128K |
84-
|ERNIE-4.5-0.3B | BF16/WINT8/FP8 | ||||| 128K |
83+
|ERNIE-4.5-21B-A3B-Base | BF16/WINT4/WINT8/FP8 | ||| ||128K |
84+
|ERNIE-4.5-0.3B | BF16/WINT8/FP8 | ||||| 128K |
8585

8686
## Advanced Usage
8787

README_CN.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
[English](README.md) | 简体中文
2-
[English](README.md) | 简体中文
32
<p align="center">
43
<a href="https://github.com/PaddlePaddle/FastDeploy/releases"><img src="https://github.com/user-attachments/assets/42b0039f-39e3-4279-afda-6d1865dfbffb" width="500"></a>
54
</p>
@@ -24,9 +23,10 @@
2423
</p>
2524

2625
--------------------------------------------------------------------------------
27-
# FastDeploy 2.0:基于飞桨的大语言模型与视觉语言模型推理部署工具包
26+
# FastDeploy :基于飞桨的大语言模型与视觉语言模型推理部署工具包
2827

2928
## 最新活动
29+
**[2025-08] 🔥 FastDeploy v2.1 全新发布:** 全新的KV Cache调度策略,更多模型支持PD分离和CUDA Graph,昆仑、海光等更多硬件支持增强,全方面优化服务和推理引擎的性能。
3030

3131
**[2025-07] 《FastDeploy2.0推理部署实测》专题活动已上线!** 完成文心4.5系列开源模型的推理部署等任务,即可获得骨瓷马克杯等FastDeploy2.0官方周边及丰富奖金!🎁 欢迎大家体验反馈~ 📌[报名地址](https://www.wjx.top/vm/meSsp3L.aspx#) 📌[活动详情](https://github.com/PaddlePaddle/FastDeploy/discussions/2728)
3232

@@ -41,22 +41,22 @@
4141
-**高级加速技术**:推测解码、多令牌预测(MTP)及分块预填充
4242
- 🖥️ **多硬件支持**:NVIDIA GPU、昆仑芯XPU、海光DCU、昇腾NPU、天数智芯GPU、燧原GCU、沐曦GPU等
4343

44-
4544
## 要求
4645

4746
- 操作系统: Linux
4847
- Python: 3.10 ~ 3.12
4948

5049
## 安装
5150

52-
FastDeploy 支持在**英伟达(NVIDIA)GPU****昆仑芯(Kunlunxin)XPU****天数(Iluvatar)GPU****燧原(Enflame)GCU** 以及其他硬件上进行推理部署。详细安装说明如下:
51+
FastDeploy 支持在**英伟达(NVIDIA)GPU****昆仑芯(Kunlunxin)XPU****天数(Iluvatar)GPU****燧原(Enflame)GCU****海光(Hygon)DCU** 以及其他硬件上进行推理部署。详细安装说明如下:
5352

5453
- [英伟达 GPU](./docs/zh/get_started/installation/nvidia_gpu.md)
5554
- [昆仑芯 XPU](./docs/zh/get_started/installation/kunlunxin_xpu.md)
5655
- [天数 CoreX](./docs/zh/get_started/installation/iluvatar_gpu.md)
5756
- [燧原 S60](./docs/zh/get_started/installation/Enflame_gcu.md)
57+
- [海光 DCU](./docs/zh/get_started/installation/hygon_dcu.md)
5858

59-
**注意:** 我们正在积极拓展硬件支持范围。目前,包括昇腾(Ascend)NPU、海光(Hygon)DCU 和摩尔线程(MetaX)GPU 在内的其他硬件平台正在开发测试中。敬请关注更新!
59+
**注意:** 我们正在积极拓展硬件支持范围。目前,包括昇腾(Ascend)NPU 和 沐曦(MetaX)GPU 在内的其他硬件平台正在开发测试中。敬请关注更新!
6060

6161
## 入门指南
6262

@@ -73,13 +73,13 @@ FastDeploy 支持在**英伟达(NVIDIA)GPU**、**昆仑芯(Kunlunxin)XPU
7373

7474
| Model | Data Type | PD Disaggregation | Chunked Prefill | Prefix Caching | MTP | CUDA Graph | Maximum Context Length |
7575
|:--- | :------- | :---------- | :-------- | :-------- | :----- | :----- | :----- |
76-
|ERNIE-4.5-300B-A47B | BF16/WINT4/WINT8/W4A8C8/WINT2/FP8 ||||| WIP |128K |
77-
|ERNIE-4.5-300B-A47B-Base| BF16/WINT4/WINT8 ||||| WIP | 128K |
76+
|ERNIE-4.5-300B-A47B | BF16/WINT4/WINT8/W4A8C8/WINT2/FP8 ||||| |128K |
77+
|ERNIE-4.5-300B-A47B-Base| BF16/WINT4/WINT8 ||||| | 128K |
7878
|ERNIE-4.5-VL-424B-A47B | BF16/WINT4/WINT8 | WIP || WIP || WIP |128K |
7979
|ERNIE-4.5-VL-28B-A3B | BF16/WINT4/WINT8 ||| WIP || WIP |128K |
8080
|ERNIE-4.5-21B-A3B | BF16/WINT4/WINT8/FP8 ||||||128K |
81-
|ERNIE-4.5-21B-A3B-Base | BF16/WINT4/WINT8/FP8 | |||||128K |
82-
|ERNIE-4.5-0.3B | BF16/WINT8/FP8 | ||||| 128K |
81+
|ERNIE-4.5-21B-A3B-Base | BF16/WINT4/WINT8/FP8 | ||| ||128K |
82+
|ERNIE-4.5-0.3B | BF16/WINT8/FP8 | ||||| 128K |
8383

8484
## 进阶用法
8585

build.sh

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ EGG_DIR="fastdeploy.egg-info"
3434

3535
# custom_ops directory config
3636
OPS_SRC_DIR="custom_ops"
37-
OPS_TMP_DIR_BASE="tmp_base"
3837
OPS_TMP_DIR="tmp"
3938

4039
# command line log config
@@ -71,25 +70,20 @@ function copy_ops(){
7170
PY_VERSION="py${PY_MAIN_VERSION}.${PY_SUB_VERSION}"
7271
SYSTEM_VERSION=`${python} -c "import platform; print(platform.system().lower())"`
7372
PROCESSOR_VERSION=`${python} -c "import platform; print(platform.processor())"`
74-
WHEEL_BASE_NAME="fastdeploy_base_ops-${OPS_VERSION}-${PY_VERSION}-${SYSTEM_VERSION}-${PROCESSOR_VERSION}.egg"
7573
WHEEL_NAME="fastdeploy_ops-${OPS_VERSION}-${PY_VERSION}-${SYSTEM_VERSION}-${PROCESSOR_VERSION}.egg"
7674
WHEEL_CPU_NAME="fastdeploy_cpu_ops-${OPS_VERSION}-${PY_VERSION}-${SYSTEM_VERSION}-${PROCESSOR_VERSION}.egg"
7775
is_rocm=`$python -c "import paddle; print(paddle.is_compiled_with_rocm())"`
7876
if [ "$is_rocm" = "True" ]; then
7977
DEVICE_TYPE="rocm"
80-
mkdir -p ../fastdeploy/model_executor/ops/base
81-
cp -r ./${OPS_TMP_DIR_BASE}/${WHEEL_BASE_NAME}/* ../fastdeploy/model_executor/ops/base
8278
cp -r ./${OPS_TMP_DIR}/${WHEEL_NAME}/* ../fastdeploy/model_executor/ops/gpu
83-
echo -e "BASE and ROCM ops have been copy to fastdeploy"
79+
echo -e "ROCM ops have been copy to fastdeploy"
8480
return
8581
fi
86-
mkdir -p ../fastdeploy/model_executor/ops/base
8782
is_cuda=`$python -c "import paddle; print(paddle.is_compiled_with_cuda())"`
8883
if [ "$is_cuda" = "True" ]; then
8984
DEVICE_TYPE="gpu"
90-
cp -r ./${OPS_TMP_DIR_BASE}/${WHEEL_BASE_NAME}/* ../fastdeploy/model_executor/ops/base
9185
cp -r ./${OPS_TMP_DIR}/${WHEEL_NAME}/* ../fastdeploy/model_executor/ops/gpu
92-
echo -e "BASE and CUDA ops have been copy to fastdeploy"
86+
echo -e "CUDA ops have been copy to fastdeploy"
9387
return
9488
fi
9589

@@ -112,9 +106,8 @@ function copy_ops(){
112106
if_corex=`$python -c "import paddle; print(paddle.is_compiled_with_custom_device(\"iluvatar_gpu\"))"`
113107
if [ "$if_corex" = "True" ]; then
114108
DEVICE_TYPE="iluvatar-gpu"
115-
cp -r ./${OPS_TMP_DIR_BASE}/${WHEEL_BASE_NAME}/* ../fastdeploy/model_executor/ops/base
116109
cp -r ./${OPS_TMP_DIR}/${WHEEL_NAME}/* ../fastdeploy/model_executor/ops/iluvatar
117-
echo -e "BASE and Iluvatar ops have been copy to fastdeploy"
110+
echo -e "Iluvatar ops have been copy to fastdeploy"
118111
return
119112
fi
120113

@@ -137,19 +130,15 @@ function copy_ops(){
137130
fi
138131

139132
DEVICE_TYPE="cpu"
140-
cp -r ./${OPS_TMP_DIR_BASE}/${WHEEL_BASE_NAME}/* ../fastdeploy/model_executor/ops/base
141133
cd ../../../../
142134
cp -r ${OPS_TMP_DIR}/${WHEEL_CPU_NAME}/* ../fastdeploy/model_executor/ops/cpu
143-
echo -e "BASE and CPU ops have been copy to fastdeploy"
135+
echo -e "CPU ops have been copy to fastdeploy"
144136
return
145137
}
146138

147139
function build_and_install_ops() {
148140
cd $OPS_SRC_DIR
149141
export no_proxy=bcebos.com,paddlepaddle.org.cn,${no_proxy}
150-
echo -e "${BLUE}[build]${NONE} build and install fastdeploy_base_ops..."
151-
${python} setup_ops_base.py install --install-lib ${OPS_TMP_DIR_BASE}
152-
find ${OPS_TMP_DIR_BASE} -type f -name "*.o" -exec rm -f {} \;
153142
echo -e "${BLUE}[build]${NONE} build and install fastdeploy_ops..."
154143
TMP_DIR_REAL_PATH=`readlink -f ${OPS_TMP_DIR}`
155144
is_xpu=`$python -c "import paddle; print(paddle.is_compiled_with_xpu())"`
@@ -223,7 +212,6 @@ function cleanup() {
223212
fi
224213

225214
rm -rf $OPS_SRC_DIR/$BUILD_DIR $OPS_SRC_DIR/$EGG_DIR
226-
rm -rf $OPS_SRC_DIR/$OPS_TMP_DIR_BASE
227215
rm -rf $OPS_SRC_DIR/$OPS_TMP_DIR
228216
}
229217

0 commit comments

Comments
 (0)