提交 63e64362 编写于 作者: L Liangliang He 提交者: liuqi

Improve development docs

上级 6ef0b401
......@@ -96,6 +96,10 @@ Add test and benchmark
It's strongly recommended to add unit tests and micro benchmarks for your
new Op. If you wish to contribute back, it's required.
Add Op in model converter
-------------------------
You need to add this new Op in the model converter.
Document the new Op
---------------------
Finally, add an entry in operator table in the document.
How to run tests
================
To run a test, you need to first cross compile the code, push the binary
into the device and then execute the binary. To automate this process,
MACE provides `tools/bazel_adb_run.py` tool.
You need to make sure your device is connected to you dev machine before
running tests.
Run unit tests
--------------
MACE use [gtest](https://github.com/google/googletest) for unit tests.
* Run all unit tests defined in a Bazel target, for example, run `ops_test`:
```sh
python tools/bazel_adb_run.py --target="//mace/ops:ops_test" \
--run_target=True
```
* Run unit tests with [gtest](https://github.com/google/googletest) filter,
for example, run `Conv2dOpTest` unit tests:
```sh
python tools/bazel_adb_run.py --target="//mace/ops:ops_test" \
--run_target=True \
--args="--gtest_filter=Conv2dOpTest*"
```
Run micro benchmarks
--------------------
MACE provides a micro benchmark framework for performance tuning.
* Run all micro benchmarks defined in a Bazel target, for example, run all
`ops_benchmark` micro benchmarks:
```sh
python tools/bazel_adb_run.py --target="//mace/ops:ops_benchmark" \
--run_target=True
```
* Run micro benchmarks with regex filter, for example, run all `CONV_2D` GPU
micro benchmarks:
```sh
python tools/bazel_adb_run.py --target="//mace/ops:ops_benchmark" \
--run_target=True \
--args="--filter=MACE_BM_CONV_2D_.*_GPU"
```
......@@ -28,6 +28,7 @@ The main documentation is organized into the following sections:
development/contributing
development/adding_a_new_op
development/how_to_run_tests
development/memory_layout
.. toctree::
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册