1212 slice-check :
1313 type : string 
1414 required : false 
15+  SLICE_TEST_MODE :
16+  type : string 
17+  required : false 
18+  default : ' test_ci' 
1519
1620env :
17-  PR_ID : ${{ github.event.pull_request.number }} 
18-  COMMIT_ID : ${{ github.event.pull_request.head.sha }} 
21+  PR_ID : ${{ github.event.pull_request.number || '0'  }} 
22+  COMMIT_ID : ${{ github.event.pull_request.head.sha || github.sha  }} 
1923 work_dir : /paddle 
2024 PADDLE_ROOT : /paddle 
2125 TASK : paddle-CI-${{ github.event.pull_request.number }}-slice 
2226 ci_scripts : /paddle/ci 
23-  BRANCH : ${{ github.event.pull_request.base.ref }} 
27+  BRANCH : ${{ github.event.pull_request.base.ref || github.ref_name  }} 
2428 CI_name : slice 
2529 no_proxy : " bcebos.com,apiin.im.baidu.com,gitee.com,aliyun.com,.baidu.com,.tuna.tsinghua.edu.cn" 
2630
@@ -35,16 +39,11 @@ jobs:
3539 runs-on :
3640 group : slice 
3741 steps :
38-  #  - name: Download test script
39-  #  run: |
40-  #  sudo rm -rf * .[^.]*
41-  #  source ${{ github.workspace }}/../../../proxy
42-  #  wget https://raw.githubusercontent.com/PaddlePaddle/Paddle/refs/heads/develop/ci/slice/test_slice_float32.py
43- 
4442 - name : Check docker image and run container 
4543 env :
46-  wheel_link : https://paddle-github-action.bj.bcebos.com/PR/build/${{ github.event.pull_request.number  }}/${{ github.event.pull_request.head.sha  }}/paddlepaddle_gpu-0.0.0-cp310-cp310-linux_x86_64.whl 
44+  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 
4745 RUN_ID : ${{ github.run_id }} 
46+  SLICE_TEST_MODE : ${{ inputs.SLICE_TEST_MODE }} 
4847 run : | 
4948 container_name="api_benchmark_ci_${RUN_ID}" 
5049 echo "container_name=${container_name}" >> ${{ github.env }} 
@@ -64,41 +63,42 @@ jobs:
6463 -e ci_scripts \ 
6564 -e no_proxy \ 
6665 -e CI_name \ 
66+  -e SLICE_TEST_MODE \ 
6767 -w /paddle --network host ${docker_image} 
6868
69- name : Download Paddle  
69+ name : Download PaddleTest  
7070 env :
7171 work_dir : ${{ github.workspace }} 
7272 run : | 
7373 docker exec -t ${{ env.container_name }} /bin/bash -c ' 
7474 rm -rf * .[^.]* 
75-  echo "Downloading build.tar.gz " 
76-  wget -q --no-proxy  https://paddle-github-action .bj.bcebos.com/PR/build/${PR_ID}/${COMMIT_ID}/build .tar.gz --no-check-certificate  
77-  echo "Extracting build.tar.gz " 
75+  echo "Downloading PaddleTest " 
76+  wget -q https://xly-devops .bj.bcebos.com/PaddleTest/PaddleTest .tar.gz --no-proxy  
77+  echo "Extracting PaddleTest " 
7878 git config --global --add safe.directory ${work_dir} 
79-  tar --use-compress-program="pzstd -1" -xpf build .tar.gz --strip-components=1  
79+  tar -xzf PaddleTest .tar.gz && cd PaddleTest  
8080 git submodule foreach "git config --global --add safe.directory \$toplevel/\$sm_path" 
81-  git checkout test 
82-  rm build.tar.gz 
8381 ' 
8482
8583name : Test 
8684 env :
8785 work_dir : ${{ github.workspace }} 
8886 run : | 
8987 docker exec -t ${{ env.container_name }} /bin/bash -c ' 
90-  set -x 
9188 mkdir -p ${{ github.workspace }}/../../../.cache/pip 
9289 source ${{ github.workspace }}/../../../proxy 
9390 python3.10 -m pip config set global.cache-dir ${{ github.workspace }}/../../../.cache/pip 
9491 python3.10 -m pip install $wheel_link 
95-  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 
96-  export FLAGS_share_tensor_for_grad_tensor_holder=True 
97-  python3.10 ci/slice/test_slice_perform.py 
92+  python3.10 -m pip install -r PaddleTest/framework/e2e/api_benchmark/requirement.txt 
93+  cd PaddleTest/framework/slice_benchmark 
94+  cp ${{ github.workspace }}/../../../apibm_config.yml . 
95+  nvidia-smi 
96+  bash run.sh 
9897 ' 
9998
10099name : Terminate and delete the container 
101100 if : always() 
102101 run : | 
102+  set +e 
103103 docker exec -t ${{ env.container_name }} /bin/bash -c 'rm -rf * .[^.]*' 
104104 docker rm -f ${{ env.container_name }} 
0 commit comments