From 2440a8f5ed0a4cd1c79da22b636989ba78ad6c23 Mon Sep 17 00:00:00 2001 From: gWX1231951 Date: Thu, 10 Aug 2023 09:59:05 +0800 Subject: [PATCH] fixed 9abfe45 from https://gitee.com/gt_goutong/ai_neural_network_runtime_2/pulls/64 change to ndk and change nnrt_ndk.so Signed-off-by: gWX1231951 --- frameworks/BUILD.gn | 3 +- interfaces/kits/c/BUILD.gn | 30 +++++++++---------- interfaces/kits/c/neural_network_runtime.h | 1 + .../kits/c/neural_network_runtime_type.h | 3 +- 4 files changed, 20 insertions(+), 17 deletions(-) diff --git a/frameworks/BUILD.gn b/frameworks/BUILD.gn index 3263b30..b5dee03 100644 --- a/frameworks/BUILD.gn +++ b/frameworks/BUILD.gn @@ -106,6 +106,7 @@ ops_sources = [ ohos_shared_library("libneural_network_runtime") { sources = nnrt_sources sources += ops_sources + output_extension = "so" include_dirs = [ "..", "//third_party/mindspore/mindspore-src/source/mindspore/lite/mindir/include", @@ -130,6 +131,6 @@ ohos_shared_library("libneural_network_runtime") { ] subsystem_name = "ai" - innerapi_tags = [ "platformsdk_indirect" ] + innerapi_tags = [ "ndk" ] part_name = "neural_network_runtime" } diff --git a/interfaces/kits/c/BUILD.gn b/interfaces/kits/c/BUILD.gn index db9a140..856097a 100644 --- a/interfaces/kits/c/BUILD.gn +++ b/interfaces/kits/c/BUILD.gn @@ -14,21 +14,21 @@ import("//build/ohos.gni") ohos_ndk_library("libneural_network_runtime_ndk") { - output_name = "neural_network_runtime.z" - output_extension = "so" - ndk_description_file = "libneural_network_runtime.ndk.json" - min_compact_version = "9" - system_capability = "SystemCapability.AI.NeuralNetworkRuntime" - system_capability_headers = [ - "neural_network_runtime.h", - "neural_network_runtime_type.h", - ] + output_name = "neural_network_runtime" + output_extension = "so" + ndk_description_file = "libneural_network_runtime.ndk.json" + min_compact_version = "9" + system_capability = "SystemCapability.AI.NeuralNetworkRuntime" + system_capability_headers = [ + "neural_network_runtime.h", + "neural_network_runtime_type.h", + ] } ohos_ndk_headers("libneural_network_runtime_header") { - dest_dir = "$ndk_headers_out_dir/neural_network_runtime" - sources = [ - "neural_network_runtime.h", - "neural_network_runtime_type.h", - ] -} \ No newline at end of file + dest_dir = "$ndk_headers_out_dir/neural_network_runtime" + sources = [ + "neural_network_runtime.h", + "neural_network_runtime_type.h", + ] +} diff --git a/interfaces/kits/c/neural_network_runtime.h b/interfaces/kits/c/neural_network_runtime.h index b5cc5e2..b7740e1 100644 --- a/interfaces/kits/c/neural_network_runtime.h +++ b/interfaces/kits/c/neural_network_runtime.h @@ -31,6 +31,7 @@ * to construct and compile models and perform inference and computing on acceleration hardware. * Note: Currently, the APIs of Neural Network Runtime do not support multi-thread calling. \n * + * @library libneural_network_runtime.so * @since 9 * @version 1.0 */ diff --git a/interfaces/kits/c/neural_network_runtime_type.h b/interfaces/kits/c/neural_network_runtime_type.h index 3bbbb4c..00aefb6 100644 --- a/interfaces/kits/c/neural_network_runtime_type.h +++ b/interfaces/kits/c/neural_network_runtime_type.h @@ -28,7 +28,8 @@ * @file neural_network_runtime_type.h * * @brief Defines the structure and enumeration for Neural Network Runtime. - * + * + * @library libneural_network_runtime.so * @since 9 * @version 1.0 */ -- Gitee