[DIOPI] Wx/align standard flash attention interface definition #6806
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: diopi ci | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
- dev_v0.25 | |
pull_request: | |
paths-ignore: | |
- "**.md" | |
- ".github/ISSUE_TEMPLATE/**" | |
- ".git*" | |
- "CODE_OF_CONDUCT**" | |
env: | |
NFS_PATH: '/mnt/cache/share/parrotsci/github/cibuild/${{ github.repository }}' | |
NFS_PATH_LUSTRE: '/mnt/lustre/share/parrotsci/github/cibuild/${{ github.repository }}' | |
DEEPLINK_PATH: '/mnt/cache/share/deeplinkci/github/${{ github.repository }}' | |
ENV_PATH: '/mnt/cache/share/platform/env' | |
ENV_NAME: 'pt2.0_diopi' | |
ENV_NAME_MMCV: 'pt1.11v1' | |
GPU_REQUESTS: 1 | |
SLURM_PAR_SH1988: ${{ vars.SLURM_PAR_SH1984 != '' && vars.SLURM_PAR_SH1984 || 'pat_rd' }} | |
SLURM_PAR_SH1424: ${{ vars.SLURM_PAR_SH1424 != '' && vars.SLURM_PAR_SH1424 || 'pat_rd' }} | |
SLURM_PAR_CAMB: ${{ vars.SLURM_PAR_CAMB != '' && vars.SLURM_PAR_CAMB || 'camb_mlu370_m8 --exclude HOST-10-142-11-120,HOST-10-142-11-126' }} | |
CLUSTER_V100: SCO | |
CLUSTER_1424: SH1424 | |
CLUSTER_CAMB: CAMB | |
CLUSTER_ASCEND: ASCEND | |
CLUSTER_ASCEND_910B: ASCEND-910B | |
CLUSTER_TOPSRIDER: TOPSRIDER | |
CLUSTER_SUPA: SUPA | |
# CLUSTER_KLX: KUNLUNXIN | |
BUILD_TEST1: build_test | |
BUILD_TEST2: build_test_dy | |
BUILD_TEST3: build_mmcv_ext | |
GEN_DATA: diopi_test/python/cache | |
GEN_DATA_PATH: "/mnt/cache/share/deeplinkci/gen-data/source" | |
ALL_COVERAGE: ${{ (contains( github.ref, 'main') || startsWith(github.ref, 'refs/heads/v') || startsWith(github.ref, 'refs/heads/dev')) && 'ON' || 'OFF' }} | |
REQUIRE_COVERAGE: ${{ vars.REQUIRE_COVERAGE != '' && vars.REQUIRE_COVERAGE || '0' }} | |
concurrency: | |
group: ${{ github.head_ref || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
Rsync: | |
name: Rsync code | |
runs-on: tps-diopi-ci | |
outputs: | |
output: ${{ steps.set-run-vars.outputs.RUN_RESULT }} | |
getrunner: ${{ steps.set-run-vars.outputs.GETRUNNER }} | |
getcluster: ${{ steps.set-run-vars.outputs.GETCLUSTER }} | |
steps: | |
- name: clone repo | |
run: | | |
cd ${GITHUB_WORKSPACE} && rm -rf DIOPI* source | |
if [ -n "${{ github.event.pull_request.head.repo.full_name }}" ] && [[ ! "${{ github.event.pull_request.head.repo.full_name }}" == "${{ github.repository }}" ]]; then | |
git clone ${{ github.event.pull_request.head.repo.ssh_url }} source | |
cd ${GITHUB_WORKSPACE}/source && git checkout ${{ github.event.pull_request.head.sha }} | |
git remote add mainrepo git@github.com:${GITHUB_REPOSITORY}.git | |
git fetch mainrepo && git merge --no-edit mainrepo/${{ github.base_ref }} | |
else | |
git clone https://github.com/DeepLink-org/DIOPI.git source && cd source | |
if [ $GITHUB_EVENT_NAME == "pull_request" ]; then | |
git checkout ${{ github.event.pull_request.head.sha }} && git merge --no-edit ${{ github.base_ref }} | |
else | |
git checkout ${{ github.sha }} | |
fi | |
fi | |
git submodule update --init --recursive | |
- name: Set output variables | |
id: set-run-vars | |
run: | | |
PR_NUMBER="${{ github.event.pull_request.number || 0 }}" | |
cd ${GITHUB_WORKSPACE}/source && RUN_RESULT=$(python3 scripts/filter_ci.py ${PR_NUMBER}) | |
cd ~/rsync && GETRUNNER=$(cat cuda_runner) | |
GETCLUSTER="SCO" | |
if [[ ${GETRUNNER} == *diopi* ]]; then | |
RUN_RESULT="${RUN_RESULT}_GENDATA" | |
GETCLUSTER="SH1424" | |
fi | |
echo "RUN_RESULT=$RUN_RESULT" >> "$GITHUB_OUTPUT" | |
echo "GETRUNNER=$GETRUNNER" >> "$GITHUB_OUTPUT" | |
echo "GETCLUSTER=$GETCLUSTER" >> "$GITHUB_OUTPUT" | |
- name: Rsync to Server | |
run: | | |
ssh ${CLUSTER_V100} "mkdir -p ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/source" \ | |
&& rsync -a --delete ${GITHUB_WORKSPACE}/source/ ${CLUSTER_V100}:${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/source/ || echo "failure to connect to sh1988" | |
ssh ${CLUSTER_CAMB} "mkdir -p ${NFS_PATH}/${GITHUB_RUN_NUMBER}/source" \ | |
&& rsync -a --delete ${GITHUB_WORKSPACE}/source/ ${CLUSTER_CAMB}:${NFS_PATH}/${GITHUB_RUN_NUMBER}/source/ || echo "failure to connect to camb" | |
ssh ${CLUSTER_TOPSRIDER} "mkdir -p ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/source" \ | |
&& rsync -a --delete ${GITHUB_WORKSPACE}/source/ ${CLUSTER_TOPSRIDER}:${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/source/ || echo "failure to connect to topsrider" | |
ssh ${CLUSTER_SUPA} "mkdir -p ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/source" \ | |
&& rsync -a --delete ${GITHUB_WORKSPACE}/source/ ${CLUSTER_SUPA}:${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/source/ || echo "failure to connect to supa" | |
ssh ${CLUSTER_1424} "mkdir -p ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/source" \ | |
&& rsync -a --delete ${GITHUB_WORKSPACE}/source/ ${CLUSTER_1424}:${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/source/ || echo "failure to connect to sh1424" | |
# ssh ${CLUSTER_ASCEND_910B} "mkdir -p ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/source" \ | |
# && rsync -a --delete ${GITHUB_WORKSPACE}/source/ ${CLUSTER_ASCEND_910B}:${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/source/ || echo "failure to connect to ascend 910b" | |
source ~/Aoss_env.sh | |
ads-cli cp ${GITHUB_WORKSPACE}/source/ s3://${Platform_ci_aoss_name}:${Platform_ci_aoss_url}@platform.aoss.cn-sh-01c.sensecoreapi-oss.cn${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/source/ | |
# ssh ${CLUSTER_KLX} "mkdir -p ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/source" \ | |
# && rsync -a --delete ${GITHUB_WORKSPACE}/source/ ${CLUSTER_KLX}:${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/source/ || echo "failure to connect to kunlunxin" | |
Runs-On-Nv: | |
name: runs on nv | |
needs: [Rsync] | |
uses: ./.github/workflows/_runs-on-nv-step1.yml | |
with: | |
runner: ${{ needs.Rsync.outputs.getrunner }} | |
run_result: ${{ needs.Rsync.outputs.output }} | |
Op-Test-Nvidia: | |
name: Op-Test-Nvidia | |
needs: [Rsync, Runs-On-Nv] | |
if: ${{ contains( needs.Rsync.outputs.output, 'NV' ) }} | |
uses: ./.github/workflows/_runs-on-nv-step2.yml | |
with: | |
runner: ${{ needs.Rsync.outputs.getrunner }} | |
all_coverage: ${{ (contains( github.ref, 'main') || startsWith(github.ref, 'refs/heads/v') || startsWith(github.ref, 'refs/heads/dev')) && 'ON' || 'OFF' }} | |
require_coverage: ${{ vars.REQUIRE_COVERAGE != '' && vars.REQUIRE_COVERAGE || '0' }} | |
Build-Nvidia-A100: | |
name: Build-Nvidia-A100 | |
runs-on: tps-diopi-ci | |
needs: [Rsync] | |
steps: | |
- name: build | |
run: | | |
ssh ${CLUSTER_1424} """ | |
set -ex | |
export USE_COVERAGE=ON | |
source /mnt/cache/share/platform/env/${ENV_NAME} | |
cd ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER} && rm -rf ${BUILD_TEST1}_A100 && cp -R source ${BUILD_TEST1}_A100 && cd ${BUILD_TEST1}_A100 | |
srun --job-name=${GITHUB_JOB} --partition=${SLURM_PAR_SH1424} --time=10 bash -c 'cd impl && bash scripts/build_impl.sh torch' || ( cd ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/ && rm -rf ${BUILD_TEST1}_A100 && exit 1 ) | |
""" | |
Build-Camb: | |
name: Build-Camb | |
runs-on: tps-diopi-ci | |
needs: [Rsync] | |
if: ${{ contains( needs.Rsync.outputs.output, 'CAMB' ) }} | |
steps: | |
- name: Build | |
run: | | |
ssh ${CLUSTER_CAMB} """ | |
set -e | |
export USE_COVERAGE=ON | |
cd ${NFS_PATH}/ && ls -al && find ${NFS_PATH}/ -maxdepth 1 -mmin +300 -type d |xargs rm -rf | |
source /mnt/cache/share/platform/env/${ENV_NAME} | |
cd ${NFS_PATH_LUSTRE}/${GITHUB_RUN_NUMBER} && rm -rf ${BUILD_TEST1} && cp -R source ${BUILD_TEST1} && cd ${BUILD_TEST1} | |
srun --job-name=${GITHUB_JOB} --partition=${SLURM_PAR_CAMB} --time=10 bash -c 'cd impl && bash scripts/build_impl.sh camb' || ( cd ${NFS_PATH}/${GITHUB_RUN_NUMBER}/ && rm -rf ${BUILD_TEST1} && exit 1 ) | |
""" | |
- name: clang-tidy | |
run: | | |
ssh ${CLUSTER_CAMB} """ | |
set -e | |
source /mnt/cache/share/platform/env/${ENV_NAME} | |
cd ${NFS_PATH}/${GITHUB_RUN_NUMBER} && cd ${BUILD_TEST1} | |
srun --job-name=${GITHUB_JOB} --partition=${SLURM_PAR_CAMB} --time=20 bash -c 'cd impl && bash scripts/ci_script.sh clang-tidy' || ( cd ${NFS_PATH}/${GITHUB_RUN_NUMBER}/ && rm -rf ${BUILD_TEST1} && exit 1 ) | |
""" | |
# Build-Mmcv-Ext-Nvidia: | |
# name: Build-Mmcv-Ext-Nvidia | |
# runs-on: tps-diopi-ci | |
# needs: [Rsync] | |
# if: ${{ contains( needs.Rsync.outputs.output, 'NV' ) }} | |
# steps: | |
# - name: build | |
# run: | | |
# ssh ${CLUSTER_1988} """ | |
# set -e | |
# source ${ENV_PATH}/github_bashrc && source /mnt/cache/share/platform/env/${ENV_NAME_MMCV} | |
# cd ${NFS_PATH}/${GITHUB_RUN_NUMBER} && rm -rf ${BUILD_TEST3} && cp -R source ${BUILD_TEST3} && cd ${BUILD_TEST3} | |
# | |
# srun --job-name=${GITHUB_JOB} --partition=${SLURM_PAR_SH1988} --time=10 ls && cd diopi_test && bash scripts/build_mmcv.sh mmcv_ext || ( cd ${NFS_PATH}/${GITHUB_RUN_NUMBER}/ && rm -rf ${BUILD_TEST3} && exit 1 ) | |
# """ | |
# Op-Test-Mmcv-Ext-Nvidia: | |
# name: Op-Test-Mmcv-Ext-Nvidia | |
# runs-on: tps-diopi-ci | |
# needs: [Build-Mmcv-Ext-Nvidia] | |
# if: ${{ contains( needs.Rsync.outputs.output, 'NV' ) }} | |
# steps: | |
# - name: test | |
# run: | | |
# ssh ${CLUSTER_1988} """ | |
# set -e | |
# | |
# source ${ENV_PATH}/github_bashrc && source /mnt/cache/share/platform/env/${ENV_NAME_MMCV} | |
# cd ${NFS_PATH}/${GITHUB_RUN_NUMBER} && cd ${BUILD_TEST3} | |
# pip install -U pytest | |
# srun --job-name=${GITHUB_JOB} --partition=${SLURM_PAR_SH1988} --time=40 --gres=gpu:${GPU_REQUESTS} ls && cd diopi_test && bash scripts/test_mmcv_ext.sh CUDA \ | |
# && cd ${NFS_PATH}/${GITHUB_RUN_NUMBER}/ && rm -rf ${BUILD_TEST3} || ( cd ${NFS_PATH}/${GITHUB_RUN_NUMBER}/ && rm -rf ${BUILD_TEST3} && exit 1 ) | |
# """ | |
Gen-Data-Op-Test-A100: | |
name: Gen-Data-Op-Test-A100 | |
runs-on: tps-diopi-ci | |
needs: [Build-Nvidia-A100] | |
if: ${{ contains( needs.Rsync.outputs.output, 'NV' ) }} | |
steps: | |
- name: gen-test-data | |
run: | | |
ssh ${CLUSTER_1424} """ | |
set -e | |
source /mnt/cache/share/platform/env/${ENV_NAME} | |
cd ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER} && cd ${BUILD_TEST1}_A100 && cd diopi_test/python && ls && | |
srun --job-name=${GITHUB_JOB} --partition=${SLURM_PAR_SH1424} --time=20 --gres=gpu:${GPU_REQUESTS} bash -c 'python main.py --mode gen_data' \ | |
|| ( cd ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1}_A100 && git clean -xdf ${GEN_DATA} && exit 1 ) | |
""" | |
- name: test-op | |
run: | | |
ssh ${CLUSTER_1424} """ | |
set -e | |
source /mnt/cache/share/platform/env/${ENV_NAME} && cd ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER} && cd ${BUILD_TEST1}_A100 | |
export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1}_A100/impl/lib | |
echo \$LD_LIBRARY_PATH | |
srun --job-name=${GITHUB_JOB} --partition=${SLURM_PAR_SH1424} --time=20 --gres=gpu:${GPU_REQUESTS} bash -c 'cd diopi_test/python && python main.py --mode gen_case && python main.py --mode run_test' \ | |
&& git clean -xdf ${GEN_DATA} || ( cd ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1}_A100 && git clean -xdf ${GEN_DATA} && exit 1 ) | |
""" | |
# Rt-Test-Nvidia: | |
# name: Rt-Test-Nvidia | |
# runs-on: tps-diopi-ci | |
# needs: Build-Nvidia | |
# if: ${{ contains( needs.Rsync.outputs.output, 'NV' ) }} | |
# steps: | |
# - name: test | |
# run: | | |
# ssh ${CLUSTER_1988} """ | |
# set -e | |
# source ${ENV_PATH}/github_bashrc && source /mnt/cache/share/platform/env/${ENV_NAME} | |
# cd ${NFS_PATH}/${GITHUB_RUN_NUMBER} && cd ${BUILD_TEST1} | |
# srun --job-name=${GITHUB_JOB} --partition=${SLURM_PAR_SH1988} --time=10 --gres=gpu:${GPU_REQUESTS} bash -c 'cd diopi_test/python && \ | |
# python main.py --mode utest && python main.py --mode utest_diopi_test' | |
# """ | |
Op-Test-Camb: | |
name: Op-Test-Camb | |
runs-on: tps-diopi-ci | |
needs: [Rsync, Runs-On-Nv, Build-Camb] | |
if: ${{ contains( needs.Rsync.outputs.output, 'CAMB' ) }} | |
env: | |
run_test: "coverage run -p" | |
CLUSTER_V100: ${{ needs.Rsync.outputs.getcluster }} | |
steps: | |
- name: test | |
run: | | |
ssh ${CLUSTER_CAMB} """ | |
set -e | |
export USE_COVERAGE=ON | |
cd ${NFS_PATH}/${GITHUB_RUN_NUMBER} | |
if [[ \"${{ needs.Rsync.outputs.output }}\" == *GENDATA* ]];then | |
rsync -a ${CLUSTER_V100}:${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1}/${GEN_DATA} ${NFS_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1}/diopi_test/python/ | |
else | |
ln -s ${GEN_DATA_PATH}/${GEN_DATA}/diopi ${NFS_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1}/diopi_test/python/cache/ | |
fi | |
source /mnt/cache/share/platform/env/${ENV_NAME} && cd ${NFS_PATH}/${GITHUB_RUN_NUMBER} && cd ${BUILD_TEST1} | |
srun --job-name=${GITHUB_JOB} --partition=${SLURM_PAR_CAMB} --time=20 --gres=mlu:${GPU_REQUESTS} bash -c 'cd diopi_test/python && python main.py --mode gen_case --impl_folder ${NFS_PATH_LUSTRE}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1}/impl/camb/ && \ | |
${run_test} main.py --mode run_test' && cd ${NFS_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1} && git clean -xdf ${GEN_DATA} || ( cd ${NFS_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1} && git clean -xdf ${GEN_DATA} && exit 1 ) | |
if [ "${ALL_COVERAGE}" = "ON" ]; then | |
bash /mnt/lustre/share/platform/dep/sonar/coverage_DIOPI_camb.sh ${NFS_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1} ${GITHUB_RUN_NUMBER} ${USE_COVERAGE}|| echo "get coverage fail" | |
fi | |
""" | |
- name: increment coverage check | |
if: ${{ contains( github.event_name, 'pull_request' ) && contains( github.base_ref, 'main' ) }} | |
run: | | |
ssh ${CLUSTER_CAMB} """ | |
set -e | |
source /mnt/cache/share/platform/env/${ENV_NAME} && cd ${NFS_PATH}/${GITHUB_RUN_NUMBER} && cd ${BUILD_TEST1} | |
bash scripts/increment_coverage.sh ${REQUIRE_COVERAGE} | |
""" | |
# Rt-Test-Camb: | |
# name: Rt-Test-Camb | |
# runs-on: tps-diopi-ci | |
# needs: Build-Camb | |
# if: ${{ contains( needs.Rsync.outputs.output, 'CAMB' ) }} | |
# steps: | |
# - name: test | |
# run: | | |
# ssh ${CLUSTER_CAMB} """ | |
# set -e | |
# source /mnt/cache/share/platform/env/${ENV_NAME} && cd ${NFS_PATH}/${GITHUB_RUN_NUMBER} && cd ${BUILD_TEST1} | |
# cd diopi_test/python | |
# srun --job-name=${GITHUB_JOB} --partition=${SLURM_PAR_CAMB} --time=10 --gres=mlu:${GPU_REQUESTS} python main.py --mode utest | |
# """ | |
Build-Ascend-910b: | |
name: Build-Ascend-910b | |
runs-on: tps-ascend-ci-910b | |
needs: [Rsync] | |
if: ${{ contains( needs.Rsync.outputs.output, 'ASCEND' ) }} | |
steps: | |
- name: COPY Source | |
run: | | |
set -e | |
source ~/Aoss_env.sh | |
ads-cli cp s3://${Platform_ci_aoss_name}:${Platform_ci_aoss_url}@platform.aoss-internal.cn-sh-01c.sensecoreapi-oss.cn${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/source/ ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/source/ | |
ads-cli --dryrun --deleteSrc cp s3://${Platform_ci_aoss_name}:${Platform_ci_aoss_url}@platform.aoss-internal.cn-sh-01c.sensecoreapi-oss.cn${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/source/ /dev/null 2>&1 >/dev/null | |
- name: build | |
run: | | |
set -e | |
export USE_COVERAGE=ON | |
cd ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER} && rm -rf ${BUILD_TEST1} && cp -R source ${BUILD_TEST1} && cd ${BUILD_TEST1} | |
cd impl && sh scripts/build_impl.sh ascend | |
- name: clang-tidy | |
run: | | |
set -e | |
cd ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1} | |
cd impl && bash scripts/ci_script.sh clang-tidy-ascend || ( cd ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/ && rm -rf ${BUILD_TEST1} && exit 1 ) | |
Op-Test-Ascend-910b: | |
name: Op-Test-Ascend-910b | |
runs-on: tps-ascend-ci-910b | |
needs: [Rsync, Runs-On-Nv, Build-Ascend-910b] | |
if: ${{ contains( needs.Rsync.outputs.output, 'ASCEND' ) }} | |
env: | |
run_test: "python" | |
CLUSTER_V100: ${{ needs.Rsync.outputs.getcluster }} | |
steps: | |
- name: test | |
run: | | |
set -e | |
cd ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1} | |
if [[ \"${{ needs.Rsync.outputs.output }}\" == *GENDATA* ]];then | |
# rsync -a ${CLUSTER_V100}:${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1}/${GEN_DATA}/diopi ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1}/diopi_test/python/cache/ | |
source ~/Aoss_env.sh | |
ads-cli cp s3://${Platform_ci_aoss_name}:${Platform_ci_aoss_url}@platform.aoss-internal.cn-sh-01c.sensecoreapi-oss.cn${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1}/diopi_test/python/cache/ ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1}/diopi_test/python/cache/ | |
ads-cli --dryrun --deleteSrc cp s3://${Platform_ci_aoss_name}:${Platform_ci_aoss_url}@platform.aoss-internal.cn-sh-01c.sensecoreapi-oss.cn${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1}/diopi_test/python/cache/ /dev/null 2>&1 >/dev/null | |
else | |
ln -s ${GEN_DATA_PATH}/${GEN_DATA}/diopi ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1}/diopi_test/python/cache/ | |
fi | |
source impl/scripts/pick_card.sh ascend | |
cd diopi_test/python && python main.py --mode gen_case --impl_folder ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1}/impl/ascend/ && export DIOPI_USE_ACLNN=1 && ${run_test} main.py --mode run_test \ | |
&& cd ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1} && git clean -xdf ${GEN_DATA} || ( cd ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1} && git clean -xdf ${GEN_DATA} && exit 1 ) | |
if [ "${ALL_COVERAGE}" = "ON" ]; then | |
bash /mnt/cache/share/platform/dep/sonar/coverage_DIOPI.sh ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1} || echo "get coverage fail" | |
fi | |
- name: increment coverage check | |
if: ${{ contains( github.event_name, 'pull_request' ) && contains( github.base_ref, 'main' ) }} | |
run: | | |
set -e | |
cd ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1} | |
bash scripts/increment_coverage.sh ${REQUIRE_COVERAGE} | |
# Rt-Test-Ascend-910b: | |
# name: Rt-Test-Ascend-910b | |
# runs-on: tps-ascend-ci-910b | |
# needs: Build-Ascend-910b | |
# if: ${{ contains( needs.Rsync.outputs.output, 'ASCEND' ) }} | |
# steps: | |
# - name: test | |
# run: | | |
# set -e | |
# cd ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1} | |
# cd diopi_test/python && python main.py --mode utest | |
Build-Topsrider: | |
name: Build-Topsrider | |
runs-on: tps-topsrider-ci | |
needs: Rsync | |
if: contains( needs.Rsync.outputs.output, 'TOPSRIDER' ) | |
steps: | |
- name: build | |
run: | | |
set -e | |
cd ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER} && rm -rf ${BUILD_TEST1} && cp -R source ${BUILD_TEST1} && cd ${BUILD_TEST1} | |
export USE_COVERAGE=ON | |
export DIOPI_BUILD_TESTRT=ON | |
cd impl && mkdir lib | |
cp -R /home/deeplink/*.so lib/ | |
cp -R /home/deeplink/prebuilt topsrider/ | |
sh scripts/build_impl.sh tops | |
Op-Test-Topsrider: | |
name: Op-Test-Topsrider | |
runs-on: tps-topsrider-ci | |
needs: Build-Topsrider | |
if: contains( needs.Rsync.outputs.output, 'TOPSRIDER' ) | |
steps: | |
- name: test | |
run: | | |
set -e | |
cd ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1} | |
cd diopi_test/python && mkdir -p cache/diopi | |
ln -sf /mnt/cache/share/deeplinkci/data/inputs ./cache/diopi && ln -sf /mnt/cache/share/deeplinkci/data/outputs ./cache/diopi && ln -sf /mnt/cache/share/deeplinkci/data/diopi_case_items.cfg ./cache/diopi | |
python main.py --mode gen_case --impl_folder ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1}/impl/topsrider/ | |
python main.py --mode run_test | |
if [ "${ALL_COVERAGE}" = "ON" ]; then | |
bash /mnt/cache/share/platform/dep/sonar/coverage_DIOPI.sh ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1} || echo "get coverage fail" | |
fi | |
- name: increment coverage check | |
if: ${{ contains( github.event_name, 'pull_request' ) && contains( github.base_ref, 'main' ) }} | |
run: | | |
set -e | |
cd ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1} | |
bash scripts/increment_coverage.sh ${REQUIRE_COVERAGE} | |
# Rt-Test-Topsrider: | |
# name: Rt-Test-Topsrider | |
# runs-on: tps-topsrider-ci | |
# needs: Build-Topsrider | |
# if: contains( needs.Rsync.outputs.output, 'TOPSRIDER' ) | |
# steps: | |
# - name: build | |
# run: | | |
# set -e | |
# cd ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1} | |
# cd diopi_test/python && ln -sf /mnt/cache/share/deeplinkci/data/ data && python main.py --mode utest | |
Build-Supa: | |
name: Build-Supa | |
runs-on: tps-diopi-ci | |
needs: [Rsync] | |
if: ${{ contains( needs.Rsync.outputs.output, 'SUPA' ) }} | |
steps: | |
- name: Build | |
run: | | |
ssh ${CLUSTER_SUPA} """ | |
set -e | |
cd ${NFS_PATH}/ && ls -al && find ${DEEPLINK_PATH}/ -maxdepth 1 -mmin +300 -type d |xargs rm -rf | |
source /mnt/cache/share/platform/env/pt2.0_diopi | |
cd ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER} && rm -rf ${BUILD_TEST1} && cp -R source ${BUILD_TEST1} && cd ${BUILD_TEST1} | |
echo "no partitions, just execute the script directly on the machine" | |
""" | |
Op-Test-Supa: | |
name: Op-Test-Supa | |
runs-on: tps-diopi-ci | |
needs: [Runs-On-Nv, Build-Supa] | |
if: ${{ contains( needs.Rsync.outputs.output, 'SUPA' ) }} | |
steps: | |
- name: test | |
run: | | |
ssh ${CLUSTER_SUPA} """ | |
set -e | |
export USE_COVERAGE=ON | |
cd ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER} | |
echo "rsync -a ${CLUSTER_V100}:${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1}/${GEN_DATA} ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1}/diopi_test/python/" | |
source /mnt/cache/share/platform/env/pt2.0_diopi && cd ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER} && cd ${BUILD_TEST1} | |
echo "test and clean, you can refer to the CAMB" | |
""" | |
# Build-Kunlunxin: | |
# name: Build-Kunlunxin | |
# runs-on: tps-klx-ci | |
# needs: Rsync | |
# if: ${{ contains( needs.Rsync.outputs.output, 'KUNLUNXIN' ) }} | |
# steps: | |
# - name: Build | |
# run: | | |
# set -e | |
# export USE_COVERAGE=ON | |
# cd ${DEEPLINK_PATH}/ && ls -al && find ${DEEPLINK_PATH}/ -maxdepth 1 -mmin +300 -type d |xargs rm -rf | |
# cd ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER} && rm -rf ${BUILD_TEST1} && cp -R source ${BUILD_TEST1} && cd ${BUILD_TEST1} | |
# source /mnt/cache/share/deeplinkci/env.sh | |
# cd impl && bash scripts/build_impl.sh kunlunxin | |
# Op-Test-Kunlunxin: | |
# name: Op-Test-Kunlunxin | |
# runs-on: tps-klx-ci | |
# needs: Build-Kunlunxin | |
# if: ${{ contains( needs.Rsync.outputs.output, 'KUNLUNXIN' ) }} | |
# steps: | |
# - name: test | |
# run: | | |
# set -e | |
# cd ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER} | |
# echo "data is /mnt/cache/share/deeplinkci/data/" | |
# cd ${BUILD_TEST1} | |
# cd diopi_test/python && mkdir -p cache/diopi | |
# ln -sf /mnt/cache/share/deeplinkci/data/inputs ./cache/diopi && ln -sf /mnt/cache/share/deeplinkci/data/outputs ./cache/diopi && ln -sf /mnt/cache/share/deeplinkci/data/diopi_case_items.cfg ./cache/diopi | |
# python main.py --mode gen_case --impl_folder ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1}/impl/kunlunxin/ | |
# python main.py --mode run_test | |
# if [ "${ALL_COVERAGE}" = "ON" ]; then | |
# bash /mnt/cache/share/platform/dep/sonar/coverage_DIOPI.sh ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1} || echo "get coverage fail" | |
# fi | |
# - name: increment coverage check | |
# if: ${{ contains( github.event_name, 'pull_request' ) && contains( github.base_ref, 'main' ) }} | |
# run: | | |
# set -e | |
# cd ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1} | |
# bash scripts/increment_coverage.sh ${REQUIRE_COVERAGE} |