Skip to content

update

update #1

Workflow file for this run

name: PR-CI-910B-ARM

Check failure on line 1 in .github/workflows/_910B-ARM.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/_910B-ARM.yml

Invalid workflow file

(Line: 97, Col: 13): Unexpected value '', (Line: 98, Col: 9): Unexpected value 'LD_LIBRARY_PATH'
on:
workflow_call:
inputs:
workflow-name:
type: string
required: false
clone_dir:
type: string
required: false
default: 'PaddlecustomDevice'
is_pr:
type: string
required: false
default: 'true'
jobs:
PR-CI-910B-ARM:
name: PR-CI-910B-ARM
if: ${{ github.repository_owner == 'PaddlePaddle' }}
runs-on:
group: 910B-ARM
env:
PR_ID: ${{ github.event.pull_request.number }}
COMMIT_ID: ${{ github.event.pull_request.head.sha }}
BRANCH: develop
TASK: paddle-CI-${{ github.event.pull_request.number }}-npu
no_proxy: "bcebos.com,apiin.im.baidu.com,gitee.com,aliyun.com,.baidu.com,.tuna.tsinghua.edu.cn"
steps:
- name: Cleanup
run: |
rm -rf * .[^.]*
- name: Check docker image and run container
env:
GIT_PR_ID: ${{ github.event.pull_request.number || '0' }}
GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RUN_ID: ${{ github.run_id }}
cache_dir: /root/.cache
ccache_dir: /root/.ccache
docker_image: registry.baidubce.com/device/paddle-npu:cann80RC1-ubuntu20-aarch64-gcc84-py39
run: |
if [[ "${{ runner.name }}" == "IXUCA-2" ]];then
echo "IXUCA-2"
export ASCEND_RT_VISIBLE_DEVICES=4,5,6,7
elif [[ "${{ runner.name }}" == "IXUCA-3" ]];then
echo "IXUCA-3"
export ASCEND_RT_VISIBLE_DEVICES=8,9,10,11
elif [[ "${{ runner.name }}" == "IXUCA-4" ]];then
echo "IXUCA-4"
export ASCEND_RT_VISIBLE_DEVICES=12,13,14,15
else
echo echo "IXUCA-1"
export ASCEND_RT_VISIBLE_DEVICES=0,1,2,3
fi
echo ${ASCEND_RT_VISIBLE_DEVICES}
container_name=${TASK}-$(date +%Y%m%d-%H%M%S)
echo "container_name=${container_name}" >> ${{ github.env }}
docker run --shm-size=128G \
-d -t --name ${container_name} \
--privileged --network=host \
-e PR_ID \
-e COMMIT_ID \
-e BRANCH \
-e no_proxy \
-e USE_910B=1 \
-e FLAGS_npu_storage_format=0 \
-e ASCEND_RT_VISIBLE_DEVICES=${ASCEND_RT_VISIBLE_DEVICES} \
-v ${cache_dir}:/root/.cache \
-v ${ccache_dir}:/root/.ccache \
-v /usr/local/Ascend/driver:/usr/local/Ascend/driver \
-v /usr/local/bin/npu-smi:/usr/local/bin/npu-smi \
-v /usr/local/dcmi:/usr/local/dcmi \
-v ${{ github.workspace }}/../../..:${{ github.workspace }}/../../.. \
-v ${{ github.workspace }}:/PaddleCustomDevice -w /PaddleCustomDevice \
${docker_image} /bin/bash
- name: Download Code
run: |
docker exec -t ${{ env.container_name }} /bin/bash -c '
source ${{ github.workspace }}/../../../proxy
set -x
wget -q --tries=5 --no-proxy https://paddle-github-action.bj.bcebos.com/PaddleCustomDevice/PR/${PR_ID}/${COMMIT_ID}/PaddleCustomDevice.tar.gz --no-check-certificate
echo "Extracting PaddleCustomDevice.tar.gz"
tar -xf PaddleCustomDevice.tar.gz --strip-components=1
git config --global --add safe.directory "*"
git remote add upstream https://github.com/PaddlePaddle/PaddleCustomDevice.git
git merge ${BRANCH} --no-edit
git --no-pager log --pretty=oneline -5'
- name: Check bypass
id: check-bypass
uses: ./.github/workflows/check-bypass
env:
LD_LIBRARY_PATH: "/home/opt/compiler/gcc-8.2/gcc-8.2/lib:$LD_LIBRARY_PATH"
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
workflow-name: 910b-arm
- name: RUN 910B-ARM
if: steps.check-bypass.outputs.can-skip != 'true'
run: |
docker exec -t ${{ env.container_name }} /bin/bash -c '
# !!!!! SKIP IF NO NPU CHANGE !!!!
echo "=========== Checking PR Changes If NPU FULL CI Needed ==========="
change_numbers=$(git diff --name-only remotes/origin/${BRANCH} | wc -l)
change_backend=$(git diff --name-only remotes/origin/${BRANCH} | grep "backends/"| wc -l)
change_npu_only=$(git diff --name-only remotes/origin/${BRANCH} | grep "backends/npu"| wc -l)
git diff --name-only remotes/origin/${BRANCH}
if [ $change_numbers -ne $change_backend ]; then
echo "Common file changed, continue to run NPU FULL CI test ..."
elif [ $change_npu_only -eq 0 ] ; then
echo "NO NPU backend changes found, skip NPU FULL CI ...."
exit 0
fi
echo "============ CANN Version ============="
source ~/.bashrc
echo "============ Install PaddlePaddle CPU ============="
PATH=/usr/local/bin:${PATH}
ln -sf $(which python3.9) /usr/local/bin/python
ln -sf $(which pip3.9) /usr/local/bin/pip
pip install -U numpy==1.26.4 safetensors
python -m pip install --pre paddlepaddle -i https://www.paddlepaddle.org.cn/packages/nightly/cpu/
python -c "import paddle; print(paddle.__version__)"
python -c "import paddle; print(paddle.version.commit)"
# Install python packages required for incremental coverage
python -m pip install PyGithub
export LD_PRELOAD=/lib/aarch64-linux-gnu/libgomp.so.1:$LD_PRELOAD
bash backends/npu/tools/pr_ci_npu.sh'
- name: Terminate and delete the container
if: always()
run: |
docker exec -t ${{ env.container_name }} /bin/bash -c '
rm -rf * .[^.]*
'
docker stop ${container_name}
docker rm ${container_name}