Skip to content

Commit 98204ab

Browse files
authored
torch (#74227)
1 parent 9e9ede6 commit 98204ab

File tree

4 files changed

+50
-884
lines changed

4 files changed

+50
-884
lines changed

.github/workflows/Slice-baseline.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Slice-baseline
33
on:
44
workflow_dispatch:
55
schedule:
6-
- cron: '30 2 * * *'
6+
- cron: '0 20 * * *'
77

88
permissions: read-all
99

.github/workflows/Slice-torch.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Slice-baseline
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: '0 0 1 * *'
7+
8+
permissions: read-all
9+
10+
defaults:
11+
run:
12+
shell: bash
13+
14+
jobs:
15+
clone:
16+
name: Slice-base clone
17+
uses: ./.github/workflows/_Clone-linux.yml
18+
with:
19+
clone_dir: Paddle-build
20+
is_pr: 'false'
21+
22+
build-docker:
23+
name: Slice build docker
24+
needs: clone
25+
uses: ./.github/workflows/docker.yml
26+
with:
27+
clone_dir: Paddle-build
28+
task: build
29+
30+
slice-test:
31+
name: Slice test
32+
uses: ./.github/workflows/_Slice.yml
33+
needs: [clone, build-docker]
34+
with:
35+
docker_build_image: ${{ needs.build-docker.outputs.docker_build_image }}
36+
slice-check: 'true'
37+
SLICE_TEST_MODE: insert_baseline
38+
SLICE_BENCHMARK_FRAMEWORKS: torch

.github/workflows/_Slice.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ on:
1616
type: string
1717
required: false
1818
default: 'test_ci'
19+
SLICE_BENCHMARK_FRAMEWORKS:
20+
type: string
21+
required: false
22+
default: 'paddle'
1923

2024
env:
2125
PR_ID: ${{ github.event.pull_request.number || '0' }}
@@ -44,6 +48,7 @@ jobs:
4448
wheel_link: https://paddle-github-action.bj.bcebos.com/PR/build/${{ env.PR_ID }}/${{ env.COMMIT_ID }}/paddlepaddle_gpu-0.0.0-cp310-cp310-linux_x86_64.whl
4549
RUN_ID: ${{ github.run_id }}
4650
SLICE_TEST_MODE: ${{ inputs.SLICE_TEST_MODE }}
51+
SLICE_BENCHMARK_FRAMEWORKS: ${{ inputs.SLICE_BENCHMARK_FRAMEWORKS }}
4752
run: |
4853
container_name="api_benchmark_ci_${RUN_ID}"
4954
echo "container_name=${container_name}" >> ${{ github.env }}
@@ -64,6 +69,7 @@ jobs:
6469
-e no_proxy \
6570
-e CI_name \
6671
-e SLICE_TEST_MODE \
72+
-e SLICE_BENCHMARK_FRAMEWORKS \
6773
-w /paddle --network host ${docker_image}
6874
6975
- name: Download PaddleTest
@@ -88,11 +94,14 @@ jobs:
8894
mkdir -p ${{ github.workspace }}/../../../.cache/pip
8995
source ${{ github.workspace }}/../../../proxy
9096
python3.10 -m pip config set global.cache-dir ${{ github.workspace }}/../../../.cache/pip
91-
python3.10 -m pip install $wheel_link
97+
if [[ "${{ inputs.SLICE_BENCHMARK_FRAMEWORKS }}" == "torch" ]];then
98+
python3.10 -m pip install torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0 --index-url https://download.pytorch.org/whl/cu118
99+
else
100+
python3.10 -m pip install $wheel_link
101+
fi
92102
python3.10 -m pip install -r PaddleTest/framework/e2e/api_benchmark/requirement.txt
93103
cd PaddleTest/framework/slice_benchmark
94104
cp ${{ github.workspace }}/../../../apibm_config.yml .
95-
nvidia-smi
96105
bash run.sh
97106
'
98107

0 commit comments

Comments
 (0)