Skip to content

Commit 32969cd

Browse files
authored
[Feature](mlu-ops): delete bangpy contents, and move bangc content (#906)
1 parent 3c0b5fe commit 32969cd

File tree

1,039 files changed

+590
-14007
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,039 files changed

+590
-14007
lines changed

.github/workflows/bangc_all_system_ci.yaml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ on:
44
push:
55
branches: [master, r*]
66
paths:
7-
- 'bangc-ops/CMakeLists.txt'
8-
- 'bangc-ops/independent_build.sh'
7+
- 'CMakeLists.txt'
8+
- 'independent_build.sh'
99
tags:
1010
- v*
1111
pull_request:
@@ -31,43 +31,43 @@ jobs:
3131
run: |
3232
docker pull docker-user.extrotec.com:30080/mlu-ops/mluops_ci:devel-x86_64-${{matrix.os}}-cntoolkit${{matrix.cntoolkit_version}}-cnnl${{matrix.cnnl_version}}
3333
34-
- name: build_bangc_ops
34+
- name: build_mlu_ops
3535
run: >
3636
docker run --rm -v $(pwd):/work -w /work docker-user.extrotec.com:30080/mlu-ops/mluops_ci:devel-x86_64-${{matrix.os}}-cntoolkit${{matrix.cntoolkit_version}}-cnnl${{matrix.cnnl_version}}
37-
./build.sh --sub_module=bangc
37+
./build.sh
3838
3939
- name: mlu_ops_version_check
4040
run: >
4141
docker run --rm -v $(pwd):/work -w /work docker-user.extrotec.com:30080/mlu-ops/mluops_ci:devel-x86_64-${{matrix.os}}-cntoolkit${{matrix.cntoolkit_version}}-cnnl${{matrix.cnnl_version}}
4242
bash version_check.sh ${{matrix.mlu_ops_version}}
4343
44-
- name: bangc_ops_release_test_cases
44+
- name: release_test_cases
4545
run: >
4646
docker run --rm --device /dev/cambricon_ctl --device /dev/cambricon_dev0 --device /dev/commu0
4747
-v /testdata:/testdata -v $(pwd):/work -w /work docker-user.extrotec.com:30080/mlu-ops/mluops_ci:devel-x86_64-${{matrix.os}}-cntoolkit${{matrix.cntoolkit_version}}-cnnl${{matrix.cnnl_version}}
48-
./test.sh --sub_module=bangc --cases_dir=/testdata/release_test/default_platform
48+
./test.sh --cases_dir=/testdata/release_test/default_platform
4949
50-
- name: bangc_ops_release_temp_cases
50+
- name: release_temp_cases
5151
run: >
5252
docker run --rm --device /dev/cambricon_ctl --device /dev/cambricon_dev0 --device /dev/commu0
5353
-v /testdata:/testdata -v $(pwd):/work -w /work docker-user.extrotec.com:30080/mlu-ops/mluops_ci:devel-x86_64-${{matrix.os}}-cntoolkit${{matrix.cntoolkit_version}}-cnnl${{matrix.cnnl_version}}
54-
./test.sh --sub_module=bangc --cases_dir=/testdata/release_temp/default_platform
54+
./test.sh --cases_dir=/testdata/release_temp/default_platform
5555
5656
57-
- name: bangc_ops_release_test_370_cases
57+
- name: release_test_370_cases
5858
if: matrix.runner == 'mlu370-m8'
5959
run: >
6060
docker run --rm --device /dev/cambricon_ctl --device /dev/cambricon_dev0 --device /dev/commu0
6161
-v /testdata:/testdata -v $(pwd):/work -w /work docker-user.extrotec.com:30080/mlu-ops/mluops_ci:devel-x86_64-${{matrix.os}}-cntoolkit${{matrix.cntoolkit_version}}-cnnl${{matrix.cnnl_version}}
62-
./test.sh --sub_module=bangc --cases_dir=/testdata/release_test/370
62+
./test.sh --cases_dir=/testdata/release_test/370
6363
64-
- name: bangc_ops_release_temp_370_cases
64+
- name: release_temp_370_cases
6565
if: matrix.runner == 'mlu370-m8'
6666
run: >
6767
docker run --rm --device /dev/cambricon_ctl --device /dev/cambricon_dev0 --device /dev/commu0
6868
-v /testdata:/testdata -v $(pwd):/work -w /work docker-user.extrotec.com:30080/mlu-ops/mluops_ci:devel-x86_64-${{matrix.os}}-cntoolkit${{matrix.cntoolkit_version}}-cnnl${{matrix.cnnl_version}}
69-
./test.sh --sub_module=bangc --cases_dir=/testdata/release_temp/370
69+
./test.sh --cases_dir=/testdata/release_temp/370
7070
7171
- name: clean
7272
run: |
73-
rm -rf bangc-ops/build
73+
rm -rf build

.github/workflows/bangc_ci.yaml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ on:
55
branches: [master, r*]
66
paths-ignore:
77
- 'docs/**'
8-
- 'bangpy-ops/**'
98
- 'docker/**'
109
- 'samples/**'
1110
- 'installer/**'
@@ -15,16 +14,13 @@ on:
1514
- 'CPPLINT.cfg'
1615
- 'LICENSE'
1716
- 'README.md'
18-
- 'bangc-ops/README.md'
1917
- 'requirements.txt'
2018
- '.github/workflows/bangc_all_system_ci.yaml'
21-
- '.github/workflows/bangpy_ci.yaml'
2219
- '.github/workflows/daily.yaml'
2320
pull_request:
2421
branches: [master, r*]
2522
paths-ignore:
2623
- 'docs/**'
27-
- 'bangpy-ops/**'
2824
- 'docker/**'
2925
- 'samples/**'
3026
- 'installer/**'
@@ -34,10 +30,8 @@ on:
3430
- 'CPPLINT.cfg'
3531
- 'LICENSE'
3632
- 'README.md'
37-
- 'bangc-ops/README.md'
3833
- 'requirements.txt'
3934
- '.github/workflows/bangc_all_system_ci.yaml'
40-
- '.github/workflows/bangpy_ci.yaml'
4135
- '.github/workflows/daily.yaml'
4236

4337
jobs:
@@ -52,6 +46,6 @@ jobs:
5246
with:
5347
submodules: 'true'
5448

55-
- name: run_bangc_ops_ci
49+
- name: run_mlu_ops_ci
5650
run: >
5751
bash .github/ci_script/mlu-ops-ci_script.sh

.github/workflows/daily.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,37 +26,37 @@ jobs:
2626
docker run --rm -v $(pwd):/work -w /work docker-user.extrotec.com:30080/mlu-ops/mluops_ci:v0.2-x86_64-ubuntu16.04-BANGPy
2727
./tools/pre-commit origin/master
2828
29-
- name: build_bangc_ops
29+
- name: build_mlu_ops
3030
run: >
3131
docker run --rm -v $(pwd):/work -w /work docker-user.extrotec.com:30080/mlu-ops/mluops_ci:devel-x86_64-ubuntu18.04-cntoolkit${{matrix.cntoolkit_version}}-cnnl${{matrix.cnnl_version}}
32-
./build.sh --sub_module=bangc
32+
./build.sh
3333
34-
- name: bangc_ops_release_test_cases
34+
- name: release_test_cases
3535
run: >
3636
docker run --rm --device /dev/cambricon_ctl --device /dev/cambricon_dev0 --device /dev/commu0
3737
-v /testdata:/testdata -v $(pwd):/work -w /work docker-user.extrotec.com:30080/mlu-ops/mluops_ci:devel-x86_64-ubuntu18.04-cntoolkit${{matrix.cntoolkit_version}}-cnnl${{matrix.cnnl_version}}
38-
./test.sh --sub_module=bangc --cases_dir=/testdata/release_test/default_platform
38+
./test.sh --cases_dir=/testdata/release_test/default_platform
3939
40-
- name: bangc_ops_release_temp_cases
40+
- name: release_temp_cases
4141
run: >
4242
docker run --rm --device /dev/cambricon_ctl --device /dev/cambricon_dev0 --device /dev/commu0
4343
-v /testdata:/testdata -v $(pwd):/work -w /work docker-user.extrotec.com:30080/mlu-ops/mluops_ci:devel-x86_64-ubuntu18.04-cntoolkit${{matrix.cntoolkit_version}}-cnnl${{matrix.cnnl_version}}
44-
./test.sh --sub_module=bangc --cases_dir=/testdata/release_temp/default_platform
44+
./test.sh --cases_dir=/testdata/release_temp/default_platform
4545
46-
- name: test_bangc_ops_release_test_370_cases
46+
- name: test_release_test_370_cases
4747
if: matrix.runner == 'mlu370-m8'
4848
run: >
4949
docker run --rm --device /dev/cambricon_ctl --device /dev/cambricon_dev0 --device /dev/commu0
5050
-v /testdata:/testdata -v $(pwd):/work -w /work docker-user.extrotec.com:30080/mlu-ops/mluops_ci:devel-x86_64-ubuntu18.04-cntoolkit${{matrix.cntoolkit_version}}-cnnl${{matrix.cnnl_version}}
51-
./test.sh --sub_module=bangc --cases_dir=/testdata/release_test/370
51+
./test.sh --cases_dir=/testdata/release_test/370
5252
53-
- name: test_bangc_ops_release_temp_370_cases
53+
- name: test_release_temp_370_cases
5454
if: matrix.runner == 'mlu370-m8'
5555
run: >
5656
docker run --rm --device /dev/cambricon_ctl --device /dev/cambricon_dev0 --device /dev/commu0
5757
-v /testdata:/testdata -v $(pwd):/work -w /work docker-user.extrotec.com:30080/mlu-ops/mluops_ci:devel-x86_64-ubuntu18.04-cntoolkit${{matrix.cntoolkit_version}}-cnnl${{matrix.cnnl_version}}
58-
./test.sh --sub_module=bangc --cases_dir=/testdata/release_temp/370
58+
./test.sh --cases_dir=/testdata/release_temp/370
5959
6060
- name: clean
6161
run: |
62-
rm -rf bangc-ops/build
62+
rm -rf build

.gitmodules

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
[submodule "bangc-ops/test/mlu_op_gtest/pb_gtest/mlu_op_test_proto"]
2-
path = bangc-ops/test/mlu_op_gtest/pb_gtest/mlu_op_test_proto
1+
[submodule "test/mlu_op_gtest/pb_gtest/mlu_op_test_proto"]
2+
path = test/mlu_op_gtest/pb_gtest/mlu_op_test_proto
33
url = https://github.com/Cambricon/mlu-ops-proto.git
File renamed without changes.

CONTRIBUTION.md

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010

1111
## 如何添加新算子
1212

13-
1. 调研算子功能,撰写算子设计文档,参考[BANGC-OPS算子设计文档模板](docs/bangc-docs/BANGC-OPS-Operator-Design-Doc-Template.md)[BANGPy-OPS算子设计文档模板](docs/bangpy-docs/BANGPy-OPS-Operator-Design-Doc-Template.md),主要包括:
13+
1. 调研算子功能,撰写算子设计文档,参考[BANGC-OPS算子设计文档模板](docs/bangc-docs/BANGC-OPS-Operator-Design-Doc-Template.md),主要包括:
1414
- 算子需求分析
1515
- 算子接口设计
1616
- 算子实现方案设计
1717

18-
2. 算子代码开发,参考[BANGC-OPS算子开发流程](docs/bangc-docs/BANGC-OPS-Operator-Development-Process.md)[BANGPy-OPS算子开发流程](docs/bangpy-docs/BANGPy-OPS-Operator-Development-Process.md)[PULL REQUEST流程](./docs/Pull-Request.md),主要包括:
19-
- 算子设计文档提交 `PR`(Pull Requset),其中 BANGC 算子设计文档目录为`docs/bangc-docs/design_docs` ,BANGPy 算子设计文档目录为`docs/bangpy-docs/design_docs`
18+
2. 算子代码开发,参考[BANGC-OPS算子开发流程](docs/bangc-docs/BANGC-OPS-Operator-Development-Process.md)[PULL REQUEST流程](./docs/Pull-Request.md),主要包括:
19+
- 算子设计文档提交 `PR`(Pull Requset),其中 BANGC 算子设计文档目录为`docs/bangc-docs/design_docs`
2020
- GTest 代码开发
2121
- 算子伪代码开发
2222
- 算子主体代码开发
@@ -32,24 +32,6 @@
3232

3333
## 代码风格
3434

35-
### Python 和 BANGPy
36-
37-
- 遵循 [PEP8](https://www.python.org/dev/peps/pep-0008/)
38-
39-
- 采用 [Pylint](https://pypi.org/project/pylint/) 检查代码格式
40-
41-
- 安装 Pylint
42-
43-
```shell
44-
pip install pylint # install
45-
```
46-
47-
- 手动检查代码格式
48-
49-
```bash
50-
python3 -m pylint ./bangpy-ops --rcfile=./bangpy-ops/utils/pylintrc
51-
```
52-
5335
### C++ 和 BANGC
5436

5537
- 遵循 [Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html)
@@ -62,6 +44,6 @@
6244

6345
## 其它
6446

65-
1. `PR` 合入需要至少两个点赞
47+
1. `PR` 合入需要至少三个点赞
6648

6749
2. 开发周期建议:算子文档设计1周,算子代码开发和测试报告1~2周,根据修改意见完善设计方案和代码1~2周

README.md

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
</div>
3232

3333
## 简介
34-
MLU-OPS 提供基于寒武纪人工智能单元(MLU),使用 C 接口或者 Python 接口开发高性能算子的示例代码。
34+
MLU-OPS 提供基于寒武纪人工智能单元(MLU),使用 C 接口开发高性能算子的示例代码。
3535
MLU-OPS 旨在通过提供示例代码,供开发者参考使用,可用于开发自定义算子,实现对应模型的计算。
3636

3737
MLU-OPS 提供了以下功能:
@@ -85,28 +85,13 @@ MLU-OPS 提供了以下功能:
8585
tar -xvf Python-3.8.0.tgz
8686
cd Python-3.8.0
8787
make -j24 && make install
88-
```
89-
90-
- 准备 BANGPy 环境
91-
92-
获取 BANGPy 最新版发布包:(https://cair.cambricon.com/)
93-
```sh
94-
pip3.8 install bangpy-x.x.x-py3-none-any.whl
95-
```
9688

9789
- 准备链接库环境
9890

9991
```sh
10092
sudo apt-get update
10193
sudo apt-get install protobuf-compiler libxml2-dev libprotobuf-dev llvm-6.0-dev
10294
```
103-
## 开发、编译及测试
104-
105-
当前 C 接口(`BANGC`)、 Python 接口(`BANGPy`)算子开发、编译及测试相互独立
106-
- `BANGC` 算子见 [BANGC-OPS 算子开发流程](docs/bangc-docs/BANGC-OPS-Operator-Development-Process.md)[README.md](bangc-ops/README.md)
107-
- `BANGPy` 算子见 [BANGPy-OPS 算子开发流程](docs/bangpy-docs/BANGPy-OPS-Operator-Development-Process.md)[README.md](bangpy-ops/README.md)
108-
109-
更多内容见 docs 目录下文档。
11095

11196
## 获取关于 BANG 语言基础和开发相关工具介绍的文档
11297
可查看最新版 [开发者文档](https://developer.cambricon.com/index/document/index/classid/3.html)
@@ -125,7 +110,18 @@ MLU-OPS 提供了以下功能:
125110

126111
| 目录/文件 | 描述 |
127112
| ------------------------ | -------------------------------------- |
128-
| [bangc-ops](bangc-ops) | C 接口算子开发目录 |
129-
| [bangpy-ops](bangpy-ops) | Python 接口算子开发目录 |
113+
| [cmake](cmake) | 存放编译相关的 make 文件。 |
114+
| [core](core) | 存放公共数据类型的操作、运行时管理、日志等公共实现。|
130115
| [docker](docker) | 存放 docker 打包脚本,提供 CI 构建环境。 |
131-
| [docs](docs) | 算子开发、测试、精度验收的说明文档。 |
116+
| [docs](docs) | 存放算子开发、测试、精度验收等说明文档。 |
117+
| [kernels](kernels) | 算子代码实现,包含一元、二元算子模板供其他算子调用。 |
118+
| [test](test) | 存放测试算子用的代码。 |
119+
| [mlu_op.h](mlu_op.h) | 公共数据类型描述,以及 kernels 目录中的算子对外提供的 C 接口。 |
120+
121+
## 编译、开发与测试
122+
123+
提供基于寒武纪人工智能单元(MLU)开发高性能算子、C 接口封装的示例代码。
124+
125+
具体的编译、开发与测试介绍见 [MLU-OPS 算子编译、开发与测试介绍.md](docs/MLU-OPS-Compile-Develop-And-Test.md)。
126+
127+
更多内容见 docs 目录下文档。

bangc-ops/build.sh

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)