diff --git a/tutorials/source_en/advanced_use/on_device_inference.md b/tutorials/source_en/advanced_use/on_device_inference.md index 03d1fd6763a518d09c95b8c8af309cf37cdffac9..d7987255d290e5a5c4651d0337276ce56816fb88 100644 --- a/tutorials/source_en/advanced_use/on_device_inference.md +++ b/tutorials/source_en/advanced_use/on_device_inference.md @@ -47,9 +47,7 @@ The environment requirements are as follows: - [cmake](https://cmake.org/download/) >= 3.14.1 - [GCC](https://gcc.gnu.org/releases.html) >= 5.4 - [Android_NDK r20b](https://dl.google.com/android/repository/android-ndk-r20b-linux-x86_64.zip) - - > The stallation of `Android_NDK` is needed only when using arm. This time we choose to use x86, so you can skip this step. - + Using MindSpore Lite converter tool needs to add more dependencies: - [autoconf](http://ftp.gnu.org/gnu/autoconf/) >= 2.69 - [libtool](https://www.gnu.org/software/libtool/) >= 2.4.6 @@ -69,9 +67,28 @@ The compilation procedure is as follows: 2. Run the following command in the root directory of the source code to compile MindSpore Lite. - ```bash - bash build.sh -I x86_64 - ``` + - Compile converter tool: + + ```bash + bash build.sh -I x86_64 + ``` + + - Compile inference platform: + + Set path of ANDROID_NDK: + ```bash + export ANDROID_NDK={$NDK_PATH}/android-ndk-r20b + ``` + + According to the phone,you can choose`arm64`: + ```bash + bash build.sh -I arm64 + ``` + + or`arm32`: + ```bash + bash build.sh -I arm32 + ``` 3. Go to the `mindspore/output` directory of the source code to obtain the compilation result. Unzip `MSLite-0.6.0-linux_x86_64.tar.gz` to get the result after building. diff --git a/tutorials/source_zh_cn/advanced_use/on_device_inference.md b/tutorials/source_zh_cn/advanced_use/on_device_inference.md index bdb2011521dfd346c0f6a170d0e145cf294ca6b6..31f8770e5114c6fac3c13443f4dfc5199b0ab3e5 100644 --- a/tutorials/source_zh_cn/advanced_use/on_device_inference.md +++ b/tutorials/source_zh_cn/advanced_use/on_device_inference.md @@ -47,8 +47,6 @@ MindSpore Lite的框架主要由Frontend、IR、Backend、Lite RT、Micro构成 - [cmake](https://cmake.org/download/) >= 3.14.1 - [GCC](https://gcc.gnu.org/releases.html) >= 5.4 - [Android_NDK r20b](https://dl.google.com/android/repository/android-ndk-r20b-linux-x86_64.zip) - - > 仅在使用arm架构时需要安装`Android_NDK`,本示例采用x86,可跳过此项。 使用MindSpore Lite转换工具,需要添加更多的依赖项: - [autoconf](http://ftp.gnu.org/gnu/autoconf/) >= 2.69 @@ -67,10 +65,29 @@ MindSpore Lite的框架主要由Frontend、IR、Backend、Lite RT、Micro构成 ``` 2. 在源码根目录下,执行如下命令编译MindSpore Lite。 - - ```bash - bash build.sh -I x86_64 - ``` + + - 编译转换工具: + + ```bash + bash build.sh -I x86_64 + ``` + + - 编译推理框架: + + 设定ANDROID_NDK路径: + ```bash + export ANDROID_NDK={$NDK_PATH}/android-ndk-r20b + ``` + + 用户需根据设备情况,可选择`arm64`: + ```bash + bash build.sh -I arm64 + ``` + + 或`arm32`: + ```bash + bash build.sh -I arm32 + ``` 3. 进入源码的`mindspore/output`目录,获取编译结果`MSLite-0.6.0-linux_x86_64.tar.gz`。执行解压缩命令,获得编译后的工具包: