Skip to content

Commit

Permalink
[Feature](bangc_ops): update cntookit 3.3.0. (Cambricon#369)
Browse files Browse the repository at this point in the history
Co-authored-by: ZhangLearning <[email protected]>
  • Loading branch information
ZhangLearning and ZhangLearning authored Jan 30, 2023
1 parent c7105f5 commit 9f5a38b
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 18 deletions.
18 changes: 11 additions & 7 deletions .github/workflows/bangcops_release_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,56 +4,60 @@ on:
push:
tags:
- v*
pull_request:
paths:
- '.github/workflows/bangcops_release_test.yaml'

jobs:
test:
strategy:
matrix:
runner: [mlu370-m8]
version : [v0.5.0]
os: [ubuntu18.04, ubuntu20.04, debian10, centos7, centos8]
runs-on: ${{matrix.runner}}
steps:
- uses: actions/checkout@v3

- name: pull_images
run: |
docker pull docker-user.gotgo.cc:30080/mlu-ops/mluops_ci:v0.4.1-devel-x86_64-${{matrix.os}}
docker pull docker-user.gotgo.cc:30080/mlu-ops/mluops_ci:${{matrix.version}}-devel-x86_64-${{matrix.os}}
- name: build_bangc_ops
run: >
docker run --rm -v $(pwd):/work -w /work docker-user.gotgo.cc:30080/mlu-ops/mluops_ci:v0.4.1-devel-x86_64-${{matrix.os}}
docker run --rm -v $(pwd):/work -w /work docker-user.gotgo.cc:30080/mlu-ops/mluops_ci:${{matrix.version}}-devel-x86_64-${{matrix.os}}
./build.sh --sub_module=bangc
- name: mlu_ops_version_check
run: >
docker run --rm -v $(pwd):/work -w /work docker-user.gotgo.cc:30080/mlu-ops/mluops_ci:v0.4.1-devel-x86_64-${{matrix.os}}
docker run --rm -v $(pwd):/work -w /work docker-user.gotgo.cc:30080/mlu-ops/mluops_ci:${{matrix.version}}-devel-x86_64-${{matrix.os}}
bash version_check.sh 0.4.1
- name: bangc_ops_release_test_cases
run: >
docker run --rm --device /dev/cambricon_ctl --device /dev/cambricon_dev0 --device /dev/commu0
-v /testdata:/testdata -v $(pwd):/work -w /work docker-user.gotgo.cc:30080/mlu-ops/mluops_ci:v0.4.1-devel-x86_64-${{matrix.os}}
-v /testdata:/testdata -v $(pwd):/work -w /work docker-user.gotgo.cc:30080/mlu-ops/mluops_ci:${{matrix.version}}-devel-x86_64-${{matrix.os}}
./test.sh --sub_module=bangc --cases_dir=/testdata/release_test/default_platform
- name: bangc_ops_release_temp_cases
run: >
docker run --rm --device /dev/cambricon_ctl --device /dev/cambricon_dev0 --device /dev/commu0
-v /testdata:/testdata -v $(pwd):/work -w /work docker-user.gotgo.cc:30080/mlu-ops/mluops_ci:v0.4.1-devel-x86_64-${{matrix.os}}
-v /testdata:/testdata -v $(pwd):/work -w /work docker-user.gotgo.cc:30080/mlu-ops/mluops_ci:${{matrix.version}}-devel-x86_64-${{matrix.os}}
./test.sh --sub_module=bangc --cases_dir=/testdata/release_temp/default_platform
- name: bangc_ops_release_test_370_cases
if: matrix.runner == 'mlu370-m8'
run: >
docker run --rm --device /dev/cambricon_ctl --device /dev/cambricon_dev0 --device /dev/commu0
-v /testdata:/testdata -v $(pwd):/work -w /work docker-user.gotgo.cc:30080/mlu-ops/mluops_ci:v0.4.1-devel-x86_64-${{matrix.os}}
-v /testdata:/testdata -v $(pwd):/work -w /work docker-user.gotgo.cc:30080/mlu-ops/mluops_ci:${{matrix.version}}-devel-x86_64-${{matrix.os}}
./test.sh --sub_module=bangc --cases_dir=/testdata/release_test/370
- name: bangc_ops_release_temp_370_cases
if: matrix.runner == 'mlu370-m8'
run: >
docker run --rm --device /dev/cambricon_ctl --device /dev/cambricon_dev0 --device /dev/commu0
-v /testdata:/testdata -v $(pwd):/work -w /work docker-user.gotgo.cc:30080/mlu-ops/mluops_ci:v0.4.1-devel-x86_64-${{matrix.os}}
-v /testdata:/testdata -v $(pwd):/work -w /work docker-user.gotgo.cc:30080/mlu-ops/mluops_ci:${{matrix.version}}-devel-x86_64-${{matrix.os}}
./test.sh --sub_module=bangc --cases_dir=/testdata/release_temp/370
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@ on:
branches: [master, r*]
pull_request:
branches: [master, r*]
paths:
- '.github/workflows/ci.yaml'

jobs:
test:
strategy:
matrix:
runner: [mlu370-m8]
version : [v0.5.0]
runs-on: ${{matrix.runner}}
steps:
- uses: actions/checkout@v3
Expand All @@ -21,7 +24,7 @@ jobs:
- name: build_bangc_ops
run: >
docker run --rm -v $(pwd):/work -w /work docker-user.gotgo.cc:30080/mlu-ops/mluops_ci:v0.4.1-devel-x86_64-ubuntu18.04
docker run --rm -v $(pwd):/work -w /work docker-user.gotgo.cc:30080/mlu-ops/mluops_ci:${{matrix.version}}-devel-x86_64-ubuntu18.04
./build.sh --sub_module=bangc
- name: build_bangpy_ops
Expand All @@ -32,14 +35,14 @@ jobs:
- name: bangc_ops_release_temp_cases
run: >
docker run --rm --device /dev/cambricon_ctl --device /dev/cambricon_dev0 --device /dev/commu0
-v /testdata:/testdata -v $(pwd):/work -w /work docker-user.gotgo.cc:30080/mlu-ops/mluops_ci:v0.4.1-devel-x86_64-ubuntu18.04
-v /testdata:/testdata -v $(pwd):/work -w /work docker-user.gotgo.cc:30080/mlu-ops/mluops_ci:${{matrix.version}}-devel-x86_64-ubuntu18.04
./test.sh --sub_module=bangc --cases_dir=/testdata/release_temp/default_platform
- name: test_bangc_ops_release_temp_370_cases
if: matrix.runner == 'mlu370-m8'
run: >
docker run --rm --device /dev/cambricon_ctl --device /dev/cambricon_dev0 --device /dev/commu0
-v /testdata:/testdata -v $(pwd):/work -w /work docker-user.gotgo.cc:30080/mlu-ops/mluops_ci:v0.4.1-devel-x86_64-ubuntu18.04
-v /testdata:/testdata -v $(pwd):/work -w /work docker-user.gotgo.cc:30080/mlu-ops/mluops_ci:${{matrix.version}}-devel-x86_64-ubuntu18.04
./test.sh --sub_module=bangc --cases_dir=/testdata/release_temp/370
- name: test_bangpy_ops
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/daily.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@ name: daily
on:
schedule:
- cron: '0 15 * * *'
pull_request:
paths:
- '.github/workflows/daily.yaml'

jobs:
test:
strategy:
matrix:
runner: [mlu370-m8]
version : [v0.5.0]
runs-on: ${{matrix.runner}}
steps:
- uses: actions/checkout@v3
Expand All @@ -19,7 +23,7 @@ jobs:
- name: build_bangc_ops
run: >
docker run --rm -v $(pwd):/work -w /work docker-user.gotgo.cc:30080/mlu-ops/mluops_ci:v0.4.1-devel-x86_64-ubuntu18.04
docker run --rm -v $(pwd):/work -w /work docker-user.gotgo.cc:30080/mlu-ops/mluops_ci:${{matrix.version}}-devel-x86_64-ubuntu18.04
./build.sh --sub_module=bangc
- name: build_bangpy_ops
Expand All @@ -30,27 +34,27 @@ jobs:
- name: bangc_ops_release_test_cases
run: >
docker run --rm --device /dev/cambricon_ctl --device /dev/cambricon_dev0 --device /dev/commu0
-v /testdata:/testdata -v $(pwd):/work -w /work docker-user.gotgo.cc:30080/mlu-ops/mluops_ci:v0.4.1-devel-x86_64-ubuntu18.04
-v /testdata:/testdata -v $(pwd):/work -w /work docker-user.gotgo.cc:30080/mlu-ops/mluops_ci:${{matrix.version}}-devel-x86_64-ubuntu18.04
./test.sh --sub_module=bangc --cases_dir=/testdata/release_test/default_platform
- name: bangc_ops_release_temp_cases
run: >
docker run --rm --device /dev/cambricon_ctl --device /dev/cambricon_dev0 --device /dev/commu0
-v /testdata:/testdata -v $(pwd):/work -w /work docker-user.gotgo.cc:30080/mlu-ops/mluops_ci:v0.4.1-devel-x86_64-ubuntu18.04
-v /testdata:/testdata -v $(pwd):/work -w /work docker-user.gotgo.cc:30080/mlu-ops/mluops_ci:${{matrix.version}}-devel-x86_64-ubuntu18.04
./test.sh --sub_module=bangc --cases_dir=/testdata/release_temp/default_platform
- name: test_bangc_ops_release_test_370_cases
if: matrix.runner == 'mlu370-m8'
run: >
docker run --rm --device /dev/cambricon_ctl --device /dev/cambricon_dev0 --device /dev/commu0
-v /testdata:/testdata -v $(pwd):/work -w /work docker-user.gotgo.cc:30080/mlu-ops/mluops_ci:v0.4.1-devel-x86_64-ubuntu18.04
-v /testdata:/testdata -v $(pwd):/work -w /work docker-user.gotgo.cc:30080/mlu-ops/mluops_ci:${{matrix.version}}-devel-x86_64-ubuntu18.04
./test.sh --sub_module=bangc --cases_dir=/testdata/release_test/370
- name: test_bangc_ops_release_temp_370_cases
if: matrix.runner == 'mlu370-m8'
run: >
docker run --rm --device /dev/cambricon_ctl --device /dev/cambricon_dev0 --device /dev/commu0
-v /testdata:/testdata -v $(pwd):/work -w /work docker-user.gotgo.cc:30080/mlu-ops/mluops_ci:v0.4.1-devel-x86_64-ubuntu18.04
-v /testdata:/testdata -v $(pwd):/work -w /work docker-user.gotgo.cc:30080/mlu-ops/mluops_ci:${{matrix.version}}-devel-x86_64-ubuntu18.04
./test.sh --sub_module=bangc --cases_dir=/testdata/release_temp/370
- name: test_bangpy_ops
Expand Down
2 changes: 1 addition & 1 deletion build.property
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.4.1-1",
"build_requires": {"cntoolkit": ["release","3.2.1-1"]},
"build_requires": {"cntoolkit": ["release","3.3.0-1"]},
"package_type": ["rpm","deb"]
}
2 changes: 1 addition & 1 deletion docker/ubuntu18.04-x86_64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get clean && rm -rf /var/lib/apt/lists/*


ARG CNTOOLKIT_VERSION="3.2.1-1"
ARG CNTOOLKIT_VERSION="3.3.0-1"
# NOTE: the url below is only for internal usage, you could replace with your own cntoolkit package.
ADD http://daily.software.cambricon.com/release/cntoolkit/Linux/x86_64/Ubuntu/18.04/${CNTOOLKIT_VERSION}/cntoolkit_${CNTOOLKIT_VERSION}.ubuntu18.04_amd64.deb /tmp/

Expand Down
2 changes: 1 addition & 1 deletion version_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ if [ $# == 0 ]; then echo "Have no options, use bash version_check.sh x.y.z"; ex
MLU_OPS_VERSION=$1

pushd ${BANGC_HOME}/test/version_check
g++ version_check.cpp -std=c++11 -o version_check -L${BANGC_HOME}/build/lib -lmluops -I${BANGC_HOME} -I${NEUWARE_HOME}/include
g++ -std=c++11 version_check.cpp -o version_check -lmluops -lcnrt -lcndrv -L${BANGC_HOME}/build/lib -L${NEUWARE_HOME}/lib64 -I${BANGC_HOME} -I${NEUWARE_HOME}/include
./version_check ${MLU_OPS_VERSION}
popd

0 comments on commit 9f5a38b

Please sign in to comment.