diff --git a/en/application-dev/napi/neural-network-runtime-guidelines.md b/en/application-dev/napi/neural-network-runtime-guidelines.md index 6a36130018d6213d9beb7ba1f1cef97ca3ee9a88..dfdad7e2b4b575ec5321e1479c72b89912d28256 100644 --- a/en/application-dev/napi/neural-network-runtime-guidelines.md +++ b/en/application-dev/napi/neural-network-runtime-guidelines.md @@ -19,13 +19,14 @@ The environment requirements for the Neural Network Runtime are as follows: - Development environment: Ubuntu 18.04 or later. - Access device: a standard device running OpenHarmony. The built-in hardware accelerator driver has been connected to the Neural Network Runtime through an HDI API. -The Neural Network Runtime is opened to external systems through OpenHarmony Native APIs. Therefore, you need to use the Native development suite of the OpenHarmony to compile Neural Network Runtime applications. +The Neural Network Runtime is opened to external systems through OpenHarmony Native APIs. Therefore, you need to use the Native development suite of OpenHarmony to compile Neural Network Runtime applications. ### Environment Setup 1. Start the Ubuntu server. 2. Copy the package of the Native development suite to the root directory of the current user. 3. Decompress the package of the Native development suite. + ```shell unzip native-linux-{version number}.zip ``` @@ -470,16 +471,25 @@ The development process of the Neural Network Runtime consists of three phases: > The IR graphs of the model need to be passed to the hardware driver layer, so that the HDI service compiles the IR graphs into a computing graph dedicated to hardware. The compilation process is time-consuming. The Neural Network Runtime supports the computing graph cache feature. It can cache the computing graphs compiled by the HDI service to the device storage. If the same model is compiled on the same acceleration chip next time, you can specify the cache path so that the Neural Network Runtime can directly load the computing graphs in the cache file, reducing the compilation time. Check the cached files in the cache directory. + ```shell ls /data/local/tmp ``` The command output is as follows: + ```text # 0.nncache cache_info.nncache ``` If the cache is no longer used, manually delete the cache files. + ```shell rm /data/local/tmp/*nncache - ``` \ No newline at end of file + ``` + +## Samples + +The following sample is provided to help you understand how to connect a third-party AI inference framework to the Neural Network Runtime: + +- [Development Guide for Connecting TensorFlow Lite to NNRt Delegate](https://gitee.com/openharmony/ai_neural_network_runtime/tree/master/example/deep_learning_framework) diff --git a/en/application-dev/reference/apis/js-apis-contact.md b/en/application-dev/reference/apis/js-apis-contact.md index 581cff20d3209bfcd2fad92559f030436d515b05..5c542320548d52a028a08afd3271a70b6650f44c 100644 --- a/en/application-dev/reference/apis/js-apis-contact.md +++ b/en/application-dev/reference/apis/js-apis-contact.md @@ -28,7 +28,7 @@ Adds a contact. This API uses an asynchronous callback to return the result. | Name | Type | Mandatory| Description | | -------- | --------------------------- | ---- | ------------------------------ | | contact | [Contact](#contact) | Yes | Contact information. | -| callback | AsyncCallback<number> | Yes | Callback used to return the contact ID.| +| callback | AsyncCallback<number> | Yes | Callback used to return the result, which is a contact ID.| **Example** @@ -273,7 +273,7 @@ Checks whether the ID of this contact is in the local address book. This API use | Name | Type | Mandatory| Description | | -------- | ---------------------------- | ---- | ------------------------------------------------------------ | | id | number | Yes | Contact ID. Each contact corresponds to one ID. | -| callback | AsyncCallback<boolean> | Yes | Callback used to return a boolean value. The value **true** indicates that the contact ID is in the local address book, and the value **false** indicates the opposite.| +| callback | AsyncCallback<boolean> | Yes | Callback used to return the result. The value **true** indicates that the contact ID is in the local address book, and the value **false** indicates the opposite.| **Example** @@ -1694,11 +1694,11 @@ Defines an application that creates the contact. **System capability**: SystemCapability.Applications.ContactsData -| Name | Type | Readable| Writable| Description | -| ----------- | -------- | ---- | ---- | ---------- | -| bundleName | string | Yes | No | Bundle name of an application. | -| displayName | string | Yes | No | Application name.| -| holderId | number | Yes | Yes | Application ID. | +| Name | Type | Readable| Writable| Description | +| ----------- | ------ | ---- | ---- | ------------ | +| bundleName | string | Yes | No | Bundle name.| +| displayName | string | Yes | No | Application name. | +| holderId | number | Yes | Yes | Application ID. | **Example**