Skip to content

Commit b682deb

Browse files
authored
Merge branch 'develop' into feat/weight-loading-natural-order
2 parents f4ff8a2 + be8a72a commit b682deb

280 files changed

Lines changed: 12113 additions & 4774 deletions

File tree

Some content is hidden

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

.flake8

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ max-line-length = 119
55
# E402: module level import not at top of file
66
per-file-ignores =
77
__init__.py:F401,F403,E402
8+
fastdeploy/model_executor/layers/sample/ops/top_k_top_p_triton.py:E241,E121,E131,E266

.github/workflows/_accuracy_test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ jobs:
196196
197197
git config --global --add safe.directory /workspace/FastDeploy
198198
cd FastDeploy
199-
pushd tests/ce/deploy
199+
pushd tests/ci_validation/deploy
200200
ps -ef | grep "${FD_CACHE_QUEUE_PORT}" | grep -v grep | awk "{print \$2}" | xargs -r kill -9
201201
ps -ef | grep "${FD_ENGINE_QUEUE_PORT}" | grep -v grep | awk "{print \$2}" | xargs -r kill -9
202202
python3.10 deploy.py > dd.log 2>&1 &
@@ -208,7 +208,7 @@ jobs:
208208
curl -X POST http://localhost:${FLASK_PORT}/wait_for_infer?timeout=90
209209
popd
210210
211-
pushd tests/ce/accuracy_cases
211+
pushd tests/ci_validation/accuracy_cases
212212
export URL=http://localhost:${FD_API_PORT}/v1/chat/completions
213213
export TEMPLATE=TOKEN_LOGPROB
214214
export MODEL_SIZE=0.3B

.github/workflows/_base_test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ jobs:
229229
230230
git config --global --add safe.directory /workspace/FastDeploy
231231
cd FastDeploy
232-
pushd tests/ce/deploy
232+
pushd tests/ci_validation/deploy
233233
ps -ef | grep "${FD_CACHE_QUEUE_PORT}" | grep -v grep | awk "{print \$2}" | xargs -r kill -9
234234
ps -ef | grep "${FD_ENGINE_QUEUE_PORT}" | grep -v grep | awk "{print \$2}" | xargs -r kill -9
235235
python3.10 deploy.py > dd.log 2>&1 &
@@ -253,7 +253,7 @@ jobs:
253253
check_service 90
254254
popd
255255
256-
pushd tests/ce/server
256+
pushd tests/ci_validation/server
257257
export URL=http://localhost:${FD_API_PORT}/v1/chat/completions
258258
export TEMPLATE=TOKEN_LOGPROB
259259
TEST_EXIT_CODE=0

.github/workflows/_build_linux_rl.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,12 @@ jobs:
165165
chown -R $(whoami) /workspace/FastDeploy
166166
cd FastDeploy
167167
168-
python -m pip uninstall paddlepaddle-gpu -y || true
169-
wget -q --no-proxy https://paddle-qa.bj.bcebos.com/paddle-pipeline/Develop-TagBuild-Training-Linux-Gpu-Cuda12.9-Cudnn9.9-Trt10.5-Mkl-Avx-Gcc11-SelfBuiltPypiUse/latest/paddlepaddle_gpu-0.0.0-cp310-cp310-linux_x86_64.whl
170-
python -m pip install paddlepaddle_gpu-0.0.0-cp310-cp310-linux_x86_64.whl
168+
# When `PADDLE_WHL_URL` is not empty, download PaddlePaddle installation package and install it, otherwise use the default PaddlePaddle.
169+
if [[ -n "${PADDLE_WHL_URL}" ]]; then
170+
python -m pip uninstall paddlepaddle-gpu -y || true
171+
wget -q --no-proxy ${PADDLE_WHL_URL}
172+
python -m pip install paddlepaddle_gpu*.whl
173+
fi
171174
172175
pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
173176

.github/workflows/_iluvatar_cases.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
description: "Build Images"
88
required: true
99
type: string
10-
default: "ccr-2vdh3abv-pub.cnc.bj.baidubce.com/device/paddle-ixuca:3.3.0-20260312"
10+
default: "ccr-2vdh3abv-pub.cnc.bj.baidubce.com/device/paddle-ixuca:3.3.0-20260507"
1111
FASTDEPLOY_ARCHIVE_URL:
1212
description: "URL of the compressed FastDeploy code archive."
1313
required: true

.github/workflows/_stable_test.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ jobs:
203203
git config --global --add safe.directory /workspace/FastDeploy
204204
cd FastDeploy
205205
TEST_EXIT_CODE=0
206-
pushd tests/ce/stable_cases
206+
pushd tests/ci_validation/stable_cases
207207
bash launch_model.sh /MODELDATA
208208
209209
TEST_EXIT_CODE=0
@@ -213,16 +213,16 @@ jobs:
213213
214214
if [ -d log ]; then
215215
echo ">>> grep error in ./log/"
216-
grep -Rni --color=auto "error" log || true
216+
grep -Rni --color=auto "error" log --exclude="backup_env.*.json" --exclude="default.*.log" --exclude="envlog.*" || true
217217
else
218218
echo "log/ directory not found"
219219
fi
220220
221-
if [ -f log/workerlog.0 ]; then
222-
echo ">>> tail -n 100 log/workerlog.0"
223-
tail -n 100 log/workerlog.0
221+
if [ -f log/paddle/workerlog.0 ]; then
222+
echo ">>> tail -n 100 log/paddle/workerlog.0"
223+
tail -n 100 log/paddle/workerlog.0
224224
else
225-
echo "log/workerlog.0 not found"
225+
echo "log/paddle/workerlog.0 not found"
226226
fi
227227
228228
echo "======================================================="

.github/workflows/_unit_test_coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ jobs:
394394
wget -O ${filename} ${diff_cov_result_json_url} || echo "Download cov json file failed, but continuing..."
395395
fi
396396
if [ -f "${filename}" ];then
397-
echo "Failed test cases:"
397+
echo "GPU Patch Coverage Details:"
398398
if command -v jq >/dev/null 2>&1; then
399399
jq . "${filename}"
400400
else

.github/workflows/_xpu_4cards_case_test.yml

Lines changed: 49 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ on:
3939
secrets:
4040
github-token:
4141
required: true
42+
outputs:
43+
coverage_data_url:
44+
description: "URL of the coverage data archive"
45+
value: ${{ jobs.run_xpu_4cards_cases.outputs.coverage_data_url }}
4246

4347
jobs:
4448
check_bypass:
@@ -53,6 +57,8 @@ jobs:
5357
needs: check_bypass
5458
if: ${{ inputs.FASTDEPLOY_WHEEL_URL != '' && needs.check_bypass.outputs.can-skip != 'true' }}
5559
timeout-minutes: 60
60+
outputs:
61+
coverage_data_url: ${{ steps.upload_coverage.outputs.coverage_data_url }}
5662
steps:
5763
- name: Print current runner name
5864
run: |
@@ -188,19 +194,30 @@ jobs:
188194
python -m pip install openai -U
189195
python -m pip install pytest
190196
python -m pip install pytest-timeout
197+
python -m pip install coverage
191198
unset http_proxy
192199
unset https_proxy
193200
echo "============================开始运行pytest测试============================"
194201
export PYTHONPATH=/workspace/FastDeploy/
195202
export PYTHONPATH=$(pwd)/tests/xpu_ci:$PYTHONPATH
196-
mkdir -p case_logs
203+
export COVERAGE_RCFILE=/workspace/FastDeploy/scripts/.coveragerc_xpu
204+
mkdir -p case_logs coveragedata
197205
set +e
198-
python -m pytest -v -s --tb=short tests/xpu_ci/4cards_cases/
206+
COVERAGE_FILE=/workspace/FastDeploy/coveragedata/.coverage.4cards \
207+
python -m coverage run --rcfile=${COVERAGE_RCFILE} -m pytest -v -s --tb=short tests/xpu_ci/4cards_cases/
199208
exit_code=$?
200209
set -e
201210
211+
# 合并覆盖率数据
212+
cd /workspace/FastDeploy
213+
COVERAGE_FILE=/workspace/FastDeploy/coveragedata/.coverage.4cards \
214+
python -m coverage combine --rcfile=${COVERAGE_RCFILE} coveragedata/ || true
215+
tar -czf /workspace/FastDeploy/coverage_4cards.tar.gz -C coveragedata .
216+
202217
# 修改case_logs权限,确保Docker外部的runner用户可以读取并上传
203218
chmod -R a+rX case_logs/ 2>/dev/null || true
219+
chmod -R a+rX coveragedata/ 2>/dev/null || true
220+
chmod a+r /workspace/FastDeploy/coverage_4cards.tar.gz 2>/dev/null || true
204221
205222
if [ $exit_code -eq 0 ]; then
206223
echo "============================4卡cases测试通过!============================"
@@ -219,3 +236,33 @@ jobs:
219236
path: FastDeploy/case_logs/
220237
retention-days: 7
221238
if-no-files-found: ignore
239+
240+
- name: Upload coverage data to BOS
241+
id: upload_coverage
242+
if: always()
243+
run: |
244+
set -x
245+
if [[ "${{ github.event_name }}" == "pull_request" ]];then
246+
commit_id=${{ github.event.pull_request.head.sha }}
247+
pr_num=${{ github.event.pull_request.number }}
248+
target_path=paddle-github-action/PR/FastDeploy/${pr_num}/${commit_id}/xpu_coverage
249+
else
250+
commit_id=${{ github.sha }}
251+
branch_name=${{ github.ref_name }}
252+
target_path=paddle-github-action/BRANCH/FastDeploy/${branch_name}/${commit_id}/xpu_coverage
253+
fi
254+
wget -q --no-proxy --no-check-certificate https://paddle-qa.bj.bcebos.com/CodeSync/develop/PaddlePaddle/PaddleTest/tools/bos_tools.py
255+
push_file=$(realpath bos_tools.py)
256+
python3 -m pip install -q bce-python-sdk==0.9.29
257+
COV_FILE="coverage_4cards.tar.gz"
258+
if [ -f "FastDeploy/${COV_FILE}" ]; then
259+
cd FastDeploy
260+
python3 ${push_file} ${COV_FILE} ${target_path}
261+
cd ..
262+
target_path_stripped="${target_path#paddle-github-action/}"
263+
COV_URL=https://paddle-github-action.bj.bcebos.com/${target_path_stripped}/coverage_4cards.tar.gz
264+
echo "coverage_data_url=${COV_URL}" >> $GITHUB_OUTPUT
265+
else
266+
echo "No coverage data found, skipping upload."
267+
echo "coverage_data_url=" >> $GITHUB_OUTPUT
268+
fi

.github/workflows/_xpu_8cards_case_test.yml

Lines changed: 49 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ on:
3939
secrets:
4040
github-token:
4141
required: true
42+
outputs:
43+
coverage_data_url:
44+
description: "URL of the coverage data archive"
45+
value: ${{ jobs.run_xpu_8cards_cases.outputs.coverage_data_url }}
4246

4347
jobs:
4448
check_bypass:
@@ -53,6 +57,8 @@ jobs:
5357
needs: check_bypass
5458
if: ${{ inputs.FASTDEPLOY_WHEEL_URL != '' && needs.check_bypass.outputs.can-skip != 'true' }}
5559
timeout-minutes: 60
60+
outputs:
61+
coverage_data_url: ${{ steps.upload_coverage.outputs.coverage_data_url }}
5662
steps:
5763
- name: Print current runner name
5864
run: |
@@ -177,19 +183,30 @@ jobs:
177183
python -m pip install openai -U
178184
python -m pip install pytest
179185
python -m pip install pytest-timeout
186+
python -m pip install coverage
180187
unset http_proxy
181188
unset https_proxy
182189
echo "============================开始运行pytest测试============================"
183190
export PYTHONPATH=/workspace/FastDeploy/
184191
export PYTHONPATH=$(pwd)/tests/xpu_ci:$PYTHONPATH
185-
mkdir -p case_logs
192+
export COVERAGE_RCFILE=/workspace/FastDeploy/scripts/.coveragerc_xpu
193+
mkdir -p case_logs coveragedata
186194
set +e
187-
python -m pytest -v -s --tb=short tests/xpu_ci/8cards_cases/
195+
COVERAGE_FILE=/workspace/FastDeploy/coveragedata/.coverage.8cards \
196+
python -m coverage run --rcfile=${COVERAGE_RCFILE} -m pytest -v -s --tb=short tests/xpu_ci/8cards_cases/
188197
exit_code=$?
189198
set -e
190199
200+
# 合并覆盖率数据
201+
cd /workspace/FastDeploy
202+
COVERAGE_FILE=/workspace/FastDeploy/coveragedata/.coverage.8cards \
203+
python -m coverage combine --rcfile=${COVERAGE_RCFILE} coveragedata/ || true
204+
tar -czf /workspace/FastDeploy/coverage_8cards.tar.gz -C coveragedata .
205+
191206
# 修改case_logs权限,确保Docker外部的runner用户可以读取并上传
192207
chmod -R a+rX case_logs/ 2>/dev/null || true
208+
chmod -R a+rX coveragedata/ 2>/dev/null || true
209+
chmod a+r /workspace/FastDeploy/coverage_8cards.tar.gz 2>/dev/null || true
193210
194211
if [ $exit_code -eq 0 ]; then
195212
echo "============================8卡cases测试通过!============================"
@@ -207,3 +224,33 @@ jobs:
207224
path: FastDeploy/case_logs/
208225
retention-days: 7
209226
if-no-files-found: ignore
227+
228+
- name: Upload coverage data to BOS
229+
id: upload_coverage
230+
if: always()
231+
run: |
232+
set -x
233+
if [[ "${{ github.event_name }}" == "pull_request" ]];then
234+
commit_id=${{ github.event.pull_request.head.sha }}
235+
pr_num=${{ github.event.pull_request.number }}
236+
target_path=paddle-github-action/PR/FastDeploy/${pr_num}/${commit_id}/xpu_coverage
237+
else
238+
commit_id=${{ github.sha }}
239+
branch_name=${{ github.ref_name }}
240+
target_path=paddle-github-action/BRANCH/FastDeploy/${branch_name}/${commit_id}/xpu_coverage
241+
fi
242+
wget -q --no-proxy --no-check-certificate https://paddle-qa.bj.bcebos.com/CodeSync/develop/PaddlePaddle/PaddleTest/tools/bos_tools.py
243+
push_file=$(realpath bos_tools.py)
244+
python3 -m pip install -q bce-python-sdk==0.9.29
245+
COV_FILE="coverage_8cards.tar.gz"
246+
if [ -f "FastDeploy/${COV_FILE}" ]; then
247+
cd FastDeploy
248+
python3 ${push_file} ${COV_FILE} ${target_path}
249+
cd ..
250+
target_path_stripped="${target_path#paddle-github-action/}"
251+
COV_URL=https://paddle-github-action.bj.bcebos.com/${target_path_stripped}/coverage_8cards.tar.gz
252+
echo "coverage_data_url=${COV_URL}" >> $GITHUB_OUTPUT
253+
else
254+
echo "No coverage data found, skipping upload."
255+
echo "coverage_data_url=" >> $GITHUB_OUTPUT
256+
fi

0 commit comments

Comments
 (0)