Skip to content

Commit

Permalink
Xt/add ci (DeepLink-org#1)
Browse files Browse the repository at this point in the history
* add ci for DIOPI

* add ci

* add ci

* fix path for ci

* fix path for ci

* ci test

* ci test

* ci test

* fix ci

* fix ci

* fix ci

* fix ci

* fix ci

* fix ci

* fix ci

* fix ci

* fix ci

* fix coi

* fix ci

* fix ci

* fix ci

* fix ci

* fix ci

* fix ci

* fix ci

* fix ci

* fix ci

* fix ci

* fix ci

* add op test clean

* fix ci

* fix ci

* fix ci

* fix ci

* fix ci

* fix ci

* fix ci

* fix ci

* fix ci

* fix ci

* fix ci

* fix ci for camb test

* update load diopoi_impl

* fix lint

* fix lint

* change ci

* change ci

* update readme and other fils

---------

Co-authored-by: xintian <[email protected]>
Co-authored-by: Wang.Chenyu <[email protected]>
  • Loading branch information
3 people authored Apr 23, 2023
1 parent ca3c537 commit 2c57491
Show file tree
Hide file tree
Showing 55 changed files with 6,885 additions and 1,025 deletions.
File renamed without changes.
128 changes: 68 additions & 60 deletions DIOPI-IMPL/.github/workflows/main.yml → .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,74 +1,77 @@
name: diopi-impl ci
name: diopi ci
on:
workflow_dispatch:
push:
branches:
- '**'
- main
if: 'contains(github.event.head_commit.message, "ci") || contains(github.event.head_commit.message, "CI")'
pull_request:
branches:
- 'main'
- main

env:
NFS_PATH: '/mnt/cache/share/parrotsci/github/cibuild/${{ github.repository }}'
ENV_PATH: '/mnt/cache/share/platform/cienv'
ENV_NAME: 'pt1.10v2'
ENV_NAME_MMCV: 'pt1.11v1'
GPU_REQUESTS: 1
SLURM_PAR_SH1984: ${{ secrets.SLURM_PAR_SH1984 }}
SLURM_PAR_SH1984: ${{ vars.SLURM_PAR_SH1984 }}
SLURM_PAR_CAMB: ${{ vars.SLURM_PAR_CAMB }}
CLUSTER_1984: SH1984
CLUSTER_CAMB: CAMB
BUILD_TEST1: build_test
BUILD_TEST2: build_test_dy
BUILD_TEST3: build_mmcv_ext
GEN_DATA: python/data
CAMB_EXCLUSIVE_HOST: ${{ vars.CAMB_EXCLUSIVE_HOST }}
GEN_DATA: DIOPI-TEST/python/data

jobs:
Rsync:
name: Rsync code
runs-on: github-diopi-ci
runs-on: tps-diopi-ci
steps:
- name: clone repo
run: |
cd ${GITHUB_WORKSPACE} && rm -rf DIOPI-TEST && git clone [email protected]:OpenComputeLab/DIOPI-TEST.git && cd DIOPI-TEST
git submodule update --init --recursive && rm -rf impl && git clone [email protected]:OpenComputeLab/DIOPI-IMPL.git && mv DIOPI-IMPL impl && cd impl
cd ${GITHUB_WORKSPACE} && rm -rf DIOPI && git clone [email protected]:OpenComputeLab/DIOPI.git && cd DIOPI
if [ $GITHUB_EVENT_NAME == "pull_request" ]; then
git checkout ${{ github.event.pull_request.head.sha }} && git merge --no-edit main
git checkout ${{ github.event.pull_request.head.sha }} && git merge --no-edit main
else
git checkout ${{ github.sha }} && git merge --no-edit main
fi
git submodule update --init --recursive && cd DIOPI-TEST/third_party && rm -rf mmcv_diopi && git clone [email protected]:OpenComputeLab/mmcv_diopi.git
- name: ci interruptible and support pr ci
run: |
cd ${GITHUB_WORKSPACE}/DIOPI-TEST/impl && bash scripts/ci_interruptible.sh
cd ${GITHUB_WORKSPACE}/DIOPI && bash scripts/ci_interruptible.sh
env:
GITHUB_TOKEN: "${{ secrets.CI_TOKEN }}"
- name: Rsync to Server
run: |
ssh ${CLUSTER_1984} "mkdir -p ${NFS_PATH}/${GITHUB_RUN_NUMBER}/source"
rsync -a --delete ${GITHUB_WORKSPACE}/DIOPI-TEST/ ${CLUSTER_1984}:${NFS_PATH}/${GITHUB_RUN_NUMBER}/source/
rsync -a --delete ${GITHUB_WORKSPACE}/DIOPI/ ${CLUSTER_1984}:${NFS_PATH}/${GITHUB_RUN_NUMBER}/source/
ssh ${CLUSTER_CAMB} "mkdir -p ${NFS_PATH}/${GITHUB_RUN_NUMBER}/source"
rsync -a --delete ${GITHUB_WORKSPACE}/DIOPI-TEST/ ${CLUSTER_CAMB}:${NFS_PATH}/${GITHUB_RUN_NUMBER}/source/
rsync -a --delete ${GITHUB_WORKSPACE}/DIOPI/ ${CLUSTER_CAMB}:${NFS_PATH}/${GITHUB_RUN_NUMBER}/source/
lint-cpp:
name: lint-cpp
runs-on: github-diopi-ci
lint:
name: lint
runs-on: tps-diopi-ci
needs: [Rsync]
steps:
- name: lint-cpp
- name: lint
run: |
ssh ${CLUSTER_1984} """
set -e
cd ${NFS_PATH}/ && ls -al && find ${NFS_PATH}/ -maxdepth 1 -ctime 1 -type d |xargs rm -rf
cd ${NFS_PATH}/ && ls -al && find ${NFS_PATH}/ -maxdepth 1 -mmin +300 -type d |xargs rm -rf
source ${ENV_PATH}/github_bashrc && source /mnt/cache/share/platform/env/${ENV_NAME}
cd ${NFS_PATH}/${GITHUB_RUN_NUMBER} && rm -rf ${GITHUB_JOB} && cp -R source ${GITHUB_JOB} && cd ${GITHUB_JOB}/impl
cd ${NFS_PATH}/${GITHUB_RUN_NUMBER} && rm -rf ${GITHUB_JOB} && cp -R source ${GITHUB_JOB} && cd ${GITHUB_JOB}
export CI=true
srun --job-name=${GITHUB_JOB} --partition=${SLURM_PAR_SH1984} --time=40 bash scripts/ci_script.sh cpp-lint && cd ${NFS_PATH}/${GITHUB_RUN_NUMBER}/ && rm -rf ${GITHUB_JOB} \
srun --job-name=${GITHUB_JOB} --partition=${SLURM_PAR_SH1984} --time=10 bash -c 'cd DIOPI-TEST && bash scripts/ci_script.sh py-lint \
&& bash scripts/ci_script.sh cpp-lint && cd ../DIOPI-IMPL \ && bash scripts/ci_script.sh cpp-lint' \
&& cd ${NFS_PATH}/${GITHUB_RUN_NUMBER}/ && rm -rf ${GITHUB_JOB} \
|| ( cd ${NFS_PATH}/${GITHUB_RUN_NUMBER}/ && rm -rf ${GITHUB_JOB} && exit 1 )
"""
Build-Nvidia:
name: Build-Nvidia
runs-on: github-diopi-ci
runs-on: tps-diopi-ci
needs: [Rsync]
steps:
- name: build
Expand All @@ -78,7 +81,8 @@ jobs:
source ${ENV_PATH}/github_bashrc && source /mnt/cache/share/platform/env/${ENV_NAME}
cd ${NFS_PATH}/${GITHUB_RUN_NUMBER} && rm -rf ${BUILD_TEST1} && cp -R source ${BUILD_TEST1} && cd ${BUILD_TEST1}
export CI=true
srun --job-name=${GITHUB_JOB} --partition=${SLURM_PAR_SH1984} --time=40 bash -c 'mkdir build && cd build && cmake .. -DIMPL_OPT=TORCH && make -j4' || ( cd ${NFS_PATH}/${GITHUB_RUN_NUMBER}/ && rm -rf ${BUILD_TEST1} && exit 1 )
export DIOPI_BUILD_TESTRT=ON
srun --job-name=${GITHUB_JOB} --partition=${SLURM_PAR_SH1984} --time=10 bash -c 'cd DIOPI-IMPL && bash scripts/build_impl.sh torch' || ( cd ${NFS_PATH}/${GITHUB_RUN_NUMBER}/ && rm -rf ${BUILD_TEST1} && exit 1 )
"""
- name: build-dyload
run: |
Expand All @@ -87,27 +91,30 @@ jobs:
source ${ENV_PATH}/github_bashrc && source /mnt/cache/share/platform/env/${ENV_NAME}
cd ${NFS_PATH}/${GITHUB_RUN_NUMBER} && rm -rf ${BUILD_TEST2} && cp -R source ${BUILD_TEST2} && cd ${BUILD_TEST2}
export CI=true
srun --job-name=${GITHUB_JOB} --partition=${SLURM_PAR_SH1984} --time=40 bash scripts/build_impl.sh torch_dyload || ( cd ${NFS_PATH}/${GITHUB_RUN_NUMBER}/ && rm -rf ${BUILD_TEST2} && exit 1 )
export DIOPI_BUILD_TESTRT=ON
srun --job-name=${GITHUB_JOB} --partition=${SLURM_PAR_SH1984} --time=10 bash -c 'cd DIOPI-IMPL && bash scripts/build_impl.sh torch_dyload' || ( cd ${NFS_PATH}/${GITHUB_RUN_NUMBER}/ && rm -rf ${BUILD_TEST2} && exit 1 )
"""
Build-Camb:
name: Build-Camb
runs-on: github-diopi-ci
runs-on: tps-diopi-ci
needs: [Rsync]
steps:
- name: Build
run: |
ssh ${CLUSTER_CAMB} """
set -e
cd ${NFS_PATH}/ && ls -al && find ${NFS_PATH}/ -maxdepth 1 -mmin +300 -type d |xargs rm -rf
source /mnt/cache/share/platform/env/camb_ci_diopi_impl
cd ${NFS_PATH}/${GITHUB_RUN_NUMBER} && rm -rf ${BUILD_TEST1} && cp -R source ${BUILD_TEST1} && cd ${BUILD_TEST1}
export CI=true
srun --job-name=${GITHUB_JOB} --partition=${SLURM_PAR_CAMB} -x ${CAMB_EXCLUSIVE_HOST} --time=40 bash -c 'mkdir build && cd build && cmake .. -DIMPL_OPT=CAMB && make -j4' || ( cd ${NFS_PATH}/${GITHUB_RUN_NUMBER}/ && rm -rf ${BUILD_TEST1} && exit 1 )
export DIOPI_BUILD_TESTRT=ON
srun --job-name=${GITHUB_JOB} --partition=${SLURM_PAR_CAMB} --time=10 bash -c 'cd DIOPI-IMPL && bash scripts/build_impl.sh camb' || ( cd ${NFS_PATH}/${GITHUB_RUN_NUMBER}/ && rm -rf ${BUILD_TEST1} && exit 1 )
"""
Build-Mmcv-Ext-Nvidia:
name: Build-Mmcv-Ext-Nvidia
runs-on: github-diopi-ci
runs-on: tps-diopi-ci
needs: [Rsync]
steps:
- name: build
Expand All @@ -117,12 +124,12 @@ jobs:
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}
export CI=true
srun --job-name=${GITHUB_JOB} --partition=${SLURM_PAR_SH1984} --time=40 bash scripts/build_impl.sh mmcv_ext || ( cd ${NFS_PATH}/${GITHUB_RUN_NUMBER}/ && rm -rf ${BUILD_TEST3} && exit 1 )
srun --job-name=${GITHUB_JOB} --partition=${SLURM_PAR_SH1984} --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-nv:
name: Op-test-Mmcv-Ext-nv
runs-on: github-diopi-ci
Op-Test-Mmcv-Ext-Nvidia:
name: Op-Test-Mmcv-Ext-Nvidia
runs-on: tps-diopi-ci
needs: [Build-Mmcv-Ext-Nvidia]
steps:
- name: test
Expand All @@ -133,12 +140,13 @@ jobs:
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_SH1984} --time=40 --gres=gpu:${GPU_REQUESTS} bash scripts/test_mmcv_ext.sh CUDA || ( cd ${NFS_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST3} && exit 1 )
srun --job-name=${GITHUB_JOB} --partition=${SLURM_PAR_SH1984} --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:
name: Gen-Data
runs-on: github-diopi-ci
runs-on: tps-diopi-ci
needs: [Build-Nvidia]
steps:
- name: gen-test-data
Expand All @@ -148,24 +156,23 @@ jobs:
export CI=true
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_SH1984} --time=40 --gres=gpu:${GPU_REQUESTS} bash -c 'cd python && python main.py --mode gen_data' \
srun --job-name=${GITHUB_JOB} --partition=${SLURM_PAR_SH1984} --time=10 --gres=gpu:${GPU_REQUESTS} bash -c 'cd DIOPI-TEST/python && python main.py --mode gen_data' \
|| ( cd ${NFS_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1} && git clean -xdf ${GEN_DATA} && exit 1 )
"""
Op-test-nvidia:
name: Op-test-nvidia
runs-on: github-diopi-ci
needs: [Gen-Data]
Op-Test-Nvidia:
name: Op-Test-Nvidia
runs-on: tps-diopi-ci
needs: Gen-Data
steps:
- name: NHWC-32bit-test
run: |
ssh ${CLUSTER_1984} """
set -e
export CI=true
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_SH1984} --time=40 --gres=gpu:${GPU_REQUESTS} bash -c 'cd python && python main.py --mode run_test --fname batch_norm --nhwc &&
python main.py --mode run_test --fname index_select --four_bytes && python main.py --mode run_test --fname arange --four_bytes' \
|| (cd ${NFS_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1} && git clean -xdf ${GEN_DATA} && exit 1)
srun --job-name=${GITHUB_JOB} --partition=${SLURM_PAR_SH1984} --time=10 --gres=gpu:${GPU_REQUESTS} bash -c 'cd DIOPI-TEST/python && python main.py --mode run_test --fname batch_norm --nhwc &&
python main.py --mode run_test --fname index_select --four_bytes && python main.py --mode run_test --fname arange --four_bytes'
"""
- name: dyload-test
run: |
Expand All @@ -174,13 +181,13 @@ jobs:
export CI=true
source ${ENV_PATH}/github_bashrc && source /mnt/cache/share/platform/env/${ENV_NAME} && cd ${NFS_PATH}/${GITHUB_RUN_NUMBER} && cd ${BUILD_TEST2}
rm -rf ${GEN_DATA} && ln -s ${NFS_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1}/${GEN_DATA} ${GEN_DATA}
srun --job-name=${GITHUB_JOB} --partition=${SLURM_PAR_SH1984} --time=40 --gres=gpu:${GPU_REQUESTS} bash -c 'cd python && python main.py --mode run_test' \
|| ( cd ${NFS_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST2} && git clean -xdf ${GEN_DATA} && exit 1 )
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${NFS_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST2}/DIOPI-TEST/lib
srun --job-name=${GITHUB_JOB} --partition=${SLURM_PAR_SH1984} --time=10 --gres=gpu:${GPU_REQUESTS} bash -c 'cd DIOPI-TEST/python && python main.py --mode run_test'
"""
Rt-test-nvidia:
name: Rt-test-nvidia
runs-on: github-diopi-ci
Rt-Test-Nvidia:
name: Rt-Test-Nvidia
runs-on: tps-diopi-ci
needs: Build-Nvidia
steps:
- name: test
Expand All @@ -190,37 +197,38 @@ jobs:
export CI=true
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_SH1984} --time=40 --gres=gpu:${GPU_REQUESTS} bash -c 'cd python && python main.py --mode utest' \
|| ( cd ${NFS_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1} && git clean -xdf ${GEN_DATA} && exit 1 )
srun --job-name=${GITHUB_JOB} --partition=${SLURM_PAR_SH1984} --time=10 --gres=gpu:${GPU_REQUESTS} bash -c 'cd DIOPI-TEST/python && python main.py --mode utest'
"""
Op-test-camb:
name: Op-test-camb
runs-on: github-diopi-ci
Op-Test-Camb:
name: Op-Test-Camb
runs-on: tps-diopi-ci
needs: [Gen-Data, Build-Camb]
steps:
- name: test
run: |
ssh ${CLUSTER_CAMB} """
set -e
export CI=true
source /mnt/cache/share/platform/env/camb_ci_diopi_impl && cd ${NFS_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1}
rsync -a ${CLUSTER_1984}:${NFS_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1}/python/data ${NFS_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1}/python/
srun --job-name=${GITHUB_JOB} --partition=${SLURM_PAR_CAMB} -x ${CAMB_EXCLUSIVE_HOST} --time=40 --gres=mlu:${GPU_REQUESTS} bash -c 'cd python && python main.py --mode run_test' \
|| ( cd ${NFS_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1} && git clean -xdf ${GEN_DATA} && exit 1 )
cd ${NFS_PATH}/${GITHUB_RUN_NUMBER} && ls
rsync -a ${CLUSTER_1984}:${NFS_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1}/${GEN_DATA} ${NFS_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1}/DIOPI-TEST/python/
source /mnt/cache/share/platform/env/camb_ci_diopi_impl && cd ${NFS_PATH}/${GITHUB_RUN_NUMBER} && cd ${BUILD_TEST1}
srun --job-name=${GITHUB_JOB} --partition=${SLURM_PAR_CAMB} --time=10 --gres=mlu:${GPU_REQUESTS} bash -c 'cd DIOPI-TEST/python && python 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 )
"""
Rt-test-camb:
name: Rt-test-camb
runs-on: github-diopi-ci
needs: [Build-Camb]
Rt-Test-Camb:
name: Rt-Test-Camb
runs-on: tps-diopi-ci
needs: Build-Camb
steps:
- name: test
run: |
ssh ${CLUSTER_CAMB} """
set -e
export CI=true
source /mnt/cache/share/platform/env/camb_ci_diopi_impl && cd ${NFS_PATH}/${GITHUB_RUN_NUMBER} && cd ${BUILD_TEST1}
srun --job-name=${GITHUB_JOB} --partition=${SLURM_PAR_CAMB} -x ${CAMB_EXCLUSIVE_HOST} --time=40 --gres=mlu:${GPU_REQUESTS} bash -c 'cd python && python main.py --mode utest' \
|| ( cd ${NFS_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1} && git clean -xdf ${GEN_DATA} && exit 1 )
srun --job-name=${GITHUB_JOB} --partition=${SLURM_PAR_CAMB} --time=10 --gres=mlu:${GPU_REQUESTS} bash -c 'cd DIOPI-TEST/python && python main.py --mode utest' \
"""
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "DIOPI-TEST/third_party/mmcv_diopi"]
path = DIOPI-TEST/third_party/mmcv_diopi
url = [email protected]:OpenComputeLab/mmcv_diopi.git
File renamed without changes.
File renamed without changes.
File renamed without changes.
15 changes: 8 additions & 7 deletions DIOPI-IMPL/Contributors.md → Contributors.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,22 @@
将代码克隆到本地

```shell
git clone [email protected]:{username}/DIOPI_IMPL.git
git clone [email protected]:{username}/DIOPI.git
```

添加原代码库为上游代码库

```bash
git remote add upstream [email protected]:OpenComputeLab/DIOPI-IMPL
git remote add upstream [email protected]:OpenComputeLab/DIOPI
```

检查 remote 是否添加成功,在终端输入 `git remote -v`

```bash
origin [email protected]:{username}/DIOPI-IMPL.git (fetch)
origin [email protected]:{username}/DIOPI-IMPL.git (push)
upstream [email protected]:OpenComputeLab/DIOPI-IMPL (fetch)
upstream [email protected]:OpenComputeLab/DIOPI-IMPL (push)
origin [email protected]:{username}/DIOPI.git (fetch)
origin [email protected]:{username}/DIOPI.git (push)
upstream [email protected]:OpenComputeLab/DIOPI (fetch)
upstream [email protected]:OpenComputeLab/DIOPI (push)
```

> 这里对 origin 和 upstream 进行一个简单的介绍,当我们使用 git clone 来克隆代码时,会默认创建一个 origin 的 remote,它指向我们克隆的代码库地址,而 upstream 则是我们自己添加的,用来指向原始代码库地址。当然如果你不喜欢他叫 upstream,也可以自己修改,比如叫 diopi。我们通常向 origin 提交代码(即 fork 下来的远程仓库),然后向 upstream 提交一个 pull request。如果提交的代码和最新的代码发生冲突,再从 upstream 拉取最新的代码,和本地分支解决冲突,再提交到 origin。
Expand All @@ -78,7 +78,7 @@ git pull upstream master


#### 3. 提交代码并在本地通过一致性测试
提交的代码需要通过一致性测试套件以保证实现的正确性,具体可以参考一致性测试套件的[README](https://github.com/OpenComputeLab/DIOPI-TEST)
提交的代码需要通过一致性测试套件以保证实现的正确性,具体可以参考一致性测试套件的[README](https://github.com/OpenComputeLab/DIOPI/DIOPI-TEST)


#### 4. 推送代码到远程
Expand Down Expand Up @@ -130,6 +130,7 @@ git push -u origin {branch_name}
-->
所有 reviewer 同意合入 PR 后,我们会尽快将 PR 合并到主分支。

(5) 当前只有DIOPI-IMPL文件夹支持开发者贡献代码,DIOPI-PROTO与DIOPI-TEST后续会逐步开放。

#### 6. 解决冲突

Expand Down
1 change: 1 addition & 0 deletions DIOPI-IMPL/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ project(diopi_impl)

option(TEST "Whether to compile DIOPI with runtime" OFF)
option(DEBUG "whether to use debug" ON)
option(DYLOAD "Whether to load so in runtime by dlopen" OFF)
include_directories(SYSTEM "${PROJECT_SOURCE_DIR}/proto/include")

if (DEBUG)
Expand Down
6 changes: 3 additions & 3 deletions DIOPI-IMPL/ascend/common/acloprunner.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef IMPL_ASCEND_COMMON_ACLOPRUNNER_HPP_
#define IMPL_ASCEND_COMMON_ACLOPRUNNER_HPP_
#ifndef DIOPI_IMPL_ASCEND_COMMON_ACLOPRUNNER_HPP_
#define DIOPI_IMPL_ASCEND_COMMON_ACLOPRUNNER_HPP_

#include <acl/acl.h>
#include <acl/acl_op.h>
Expand Down Expand Up @@ -407,4 +407,4 @@ class AclOpRunner {
} // namespace ascend
} // namespace impl

#endif // IMPL_ASCEND_COMMON_ACLOPRUNNER_HPP_
#endif // DIOPI_IMPL_ASCEND_COMMON_ACLOPRUNNER_HPP_
6 changes: 3 additions & 3 deletions DIOPI-IMPL/ascend/error.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef IMPL_ASCEND_ERROR_HPP_
#define IMPL_ASCEND_ERROR_HPP_
#ifndef DIOPI_IMPL_ASCEND_ERROR_HPP_
#define DIOPI_IMPL_ASCEND_ERROR_HPP_

#include <mutex>
#include <utility>
Expand All @@ -24,4 +24,4 @@ const char* ascend_get_last_error_string();

} // namespace impl

#endif // IMPL_ASCEND_ERROR_HPP_
#endif // DIOPI_IMPL_ASCEND_ERROR_HPP_
6 changes: 3 additions & 3 deletions DIOPI-IMPL/camb/cnnl_helper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* @copyright (c) 2023, DeepLink.
*/

#ifndef IMPL_CAMB_CNNL_HELPER_HPP_
#define IMPL_CAMB_CNNL_HELPER_HPP_
#ifndef DIOPI_IMPL_CAMB_CNNL_HELPER_HPP_
#define DIOPI_IMPL_CAMB_CNNL_HELPER_HPP_

#include <cnnl.h>

Expand Down Expand Up @@ -223,4 +223,4 @@ extern CnnlHandlePool cnnlHandlePool;

} // namespace impl

#endif // IMPL_CAMB_CNNL_HELPER_HPP_
#endif // DIOPI_IMPL_CAMB_CNNL_HELPER_HPP_
Loading

0 comments on commit 2c57491

Please sign in to comment.