diff --git a/docs/user_guide/advanced_usage.rst b/docs/user_guide/advanced_usage.rst index c0607d9e726bc8aa3077ab180f2ff2d02db1cff7..d88ff14b5e0697ab21f500d5d4f316c604185348 100644 --- a/docs/user_guide/advanced_usage.rst +++ b/docs/user_guide/advanced_usage.rst @@ -382,4 +382,4 @@ Reduce Library Size library may also contain model graph and model datas if the configs ``model_graph_format`` and ``model_data_format`` in deployment file are set to ``code``. - - It is recommended to use ``version script`` for ultimate binary. The effect is remarkable. + - It is recommended to use ``version script`` and ``strip`` feature when linking mace static library. The effect is remarkable. diff --git a/docs/user_guide/basic_usage.rst b/docs/user_guide/basic_usage.rst index 3da9126ba0ca840ce2af171b56f18cb81f81b5d7..487aa33af63c2c65041de04507983164ea1c1e48 100644 --- a/docs/user_guide/basic_usage.rst +++ b/docs/user_guide/basic_usage.rst @@ -192,7 +192,7 @@ Use bazel to build MACE source code into a library. # output lib path: builds/lib bash tools/build-standalone-lib.sh -The above command will generate dynamic library ``builds/lib/${ABI}/libmace.so`` and static library ``builds/lib/${ABI}/libmace.a``. +The above command will generate dynamic library ``builds/lib/${ABI}/${DEVICES}/libmace.so`` and static library ``builds/lib/${ABI}/${DEVICES}/libmace.a``. .. warning:: @@ -242,6 +242,12 @@ header files. ``${library_name}`` is the name you defined in the first line of your deployment YAML file. +.. note:: + + When linking generated ``libmace.a`` into shared library, + `version script `__ + is helpful for reducing a specified set of symbols to local scope. + - The generated ``static`` library files are organized as follows, .. code:: @@ -254,12 +260,17 @@ header files. │   └── mace_runtime.h ├── lib │   ├── arm64-v8a - │   │   ├── libmace.a - │   │   └── libmace.so + │   │ └── cpu_gpu + │   │   ├── libmace.a + │   │   └── libmace.so │   ├── armeabi-v7a - │   │   ├── libhexagon_controller.so - │   │   ├── libmace.a - │   │   └── libmace.so + │   │ ├── cpu_gpu + │   │   │ ├── libmace.a + │   │   │ └── libmace.so + │   │ └── cpu_gpu_dsp + │   │   ├── libhexagon_controller.so + │   │   ├── libmace.a + │   │   └── libmace.so │   └── linux-x86-64 │   ├── libmace.a │   └── libmace.so