diff --git a/docs/getting_started/how_to_build.rst b/docs/getting_started/how_to_build.rst index 644714be9cf53ed10677fe25bfd45f55be1217ed..8a279a1456f2ab5588948c95163c684c406cd24c 100644 --- a/docs/getting_started/how_to_build.rst +++ b/docs/getting_started/how_to_build.rst @@ -34,7 +34,7 @@ MiAI Compute Engine requires the following dependencies: - `bazel installation `__ * - android-ndk - r15c/r16b - - reference the docker file + - `NDK installation `__ or reference the docker file * - adb - >= 1.0.32 - apt-get install android-tools-adb @@ -63,6 +63,10 @@ MiAI Compute Engine requires the following dependencies: - >= 17.09.0-ce - `install doc `__ +.. note:: + + ``export ANDROID_NDK_HOME=/path/to/ndk`` to Specify ANDROID_NDK_HOME + MiAI Compute Engine provides Dockerfile with these dependencies installed, you can build the image from the Dockerfile, @@ -226,80 +230,24 @@ model conversion, compiling, test run, benchmark and correctness validation. build library and test tools. - * *--config* (type=str, default="", required): the path of model yaml configuration file. - * *--tuning* (default=false, optional): whether tuning the parameters for the GPU of specified SoC. - * *--enable_openmp* (default=true, optional): whether use openmp. - * **run** .. note:: run the model(s). - * *--config* (type=str, default="", required): the path of model yaml configuration file. - * *--round* (type=int, default=1, optional): times for run. - * *--validate* (default=false, optional): whether to verify the results are consistent with the frameworks。 - * *--caffe_env* (type=local/docker, default=docker, optional): you can specific caffe environment for validation. local environment or caffe docker image. - * *--restart_round* (type=int, default=1, optional): restart round between run. - * *--gpu_out_of_range_check* (default=false, optional): whether check out of memory for gpu. - * *--vlog_level* (type=int[0-5], default=0, optional): verbose log level for debug. - .. warning:: ``run`` rely on ``build`` command, you should ``run`` after ``build``. * **benchmark** - * *--config* (type=str, default="", required): the path of model yaml configuration file. .. warning:: ``benchmark`` rely on ``build`` command, you should ``benchmark`` after ``build``. - **common arguments** - - .. list-table:: - :widths: auto - :header-rows: 1 - :align: left - - * - argument(key) - - argument(value) - - default - - required - - commands - - explanation - * - --omp_num_threads - - int - - -1 - - N - - ``run``/``benchmark`` - - number of threads - * - --cpu_affinity_policy - - int - - 1 - - N - - ``run``/``benchmark`` - - 0:AFFINITY_NONE/1:AFFINITY_BIG_ONLY/2:AFFINITY_LITTLE_ONLY - * - --gpu_perf_hint - - int - - 3 - - N - - ``run``/``benchmark`` - - 0:DEFAULT/1:LOW/2:NORMAL/3:HIGH - * - --gpu_perf_hint - - int - - 3 - - N - - ``run``/``benchmark`` - - 0:DEFAULT/1:LOW/2:NORMAL/3:HIGH - * - --gpu_priority_hint - - int - - 3 - - N - - ``run``/``benchmark`` - - 0:DEFAULT/1:LOW/2:NORMAL/3:HIGH - -Using ``-h`` to get detailed help. + +Use ``-h`` to get detailed help. .. code:: sh @@ -354,7 +302,7 @@ header files and packaged as │   ├── mace.h │   └── mace_runtime.h ├── libmace_mobilenet-v2-gpu.tar.gz - ├── library + ├── lib │   ├── arm64-v8a │   │   └── libmace_mobilenet-v2-gpu.MI6.msm8998.a │   └── armeabi-v7a @@ -420,6 +368,7 @@ Please refer to \ ``mace/examples/example.cc``\ for full usage. The following li // Include the headers #include "mace/public/mace.h" #include "mace/public/mace_runtime.h" + // If the build_type is code #include "mace/public/mace_engine_factory.h" // 0. Set pre-compiled OpenCL binary program file paths when available diff --git a/tools/converter.py b/tools/converter.py index 9b460a1f90d3460f2414318176e57514f853eb1a..db2e74abfad73d62e5055ad2280722c6129a709c 100644 --- a/tools/converter.py +++ b/tools/converter.py @@ -1210,7 +1210,7 @@ def parse_args(): type=str, default="", required=True, - help="model yaml configuration file path") + help="the path of model yaml configuration file.") all_type_parent_parser.add_argument( "--build_type", type=str, @@ -1258,7 +1258,7 @@ def parse_args(): build.add_argument( '--tuning', action="store_true", - help="tuning gpu parameters for specified SOC") + help="whether tuning the parameters for the GPU of specified SoC.") build.add_argument( "--enable_openmp", action="store_false", @@ -1277,17 +1277,19 @@ def parse_args(): run.add_argument( "--validate", action="store_true", - help="validate result by comparing mace output and platform's output.") + help="whether to verify the results are consistent with " + "the frameworks.") run.add_argument( "--caffe_env", type=str_to_caffe_env_type, default='docker', - help="[docker | local] caffe environment.") + help="[docker | local] you can specific caffe environment for" + " validation. local environment or caffe docker image.") run.add_argument( "--vlog_level", type=int, default=0, - help="VLOG level: [1~5].") + help="[1~5]. Verbose log level for debug.") run.add_argument( "--gpu_out_of_range_check", action="store_true", @@ -1296,7 +1298,7 @@ def parse_args(): "--restart_round", type=int, default=1, - help="restart round for run.") + help="restart round between run.") run.add_argument( "--report", action="store_true", diff --git a/tools/sh_commands.py b/tools/sh_commands.py index 242c64bd21f2fc866c377254c01167e684f83d02..2d0153a5b4691dd9d2788bb7e31ffb27dfde5e85 100644 --- a/tools/sh_commands.py +++ b/tools/sh_commands.py @@ -605,7 +605,7 @@ def update_libmace_shared_library(serial_num, sh.cp("-f", "bazel-bin/mace/libmace.so", library_dir) sh.cp("-f", "%s/sources/cxx-stl/gnu-libstdc++/4.9/libs/%s/libgnustl_shared.so" % - (os.environ["ANDROID_NDK"], abi), + (os.environ["ANDROID_NDK_HOME"], abi), library_dir) if os.path.exists("mace/libmace.so"):