mirror of
https://gitee.com/openharmony/xts_hats
synced 2025-03-04 00:18:58 +00:00
commit
7abcd2b3ef
@ -32,23 +32,17 @@ ohos_moduletest_suite("HatsHdfNnrtFunctionV1_0Test") {
|
||||
|
||||
include_dirs = [
|
||||
"../../v1_0",
|
||||
"//commonlibrary/c_utils/base/include",
|
||||
"//third_party/googletest/googletest/include/",
|
||||
"//foundation/ai/neural_network_runtime",
|
||||
"//foundation/ai/neural_network_runtime/third_party/include",
|
||||
"../../../../../../../../foundation/ai/neural_network_runtime",
|
||||
"//third_party/mindspore/mindspore-src/source/mindspore/lite/mindir/include",
|
||||
]
|
||||
|
||||
deps = [ "//foundation/ai/neural_network_runtime/frameworks:libneural_network_runtime" ]
|
||||
|
||||
lib_dirs = [ "//foundation/ai/neural_network_runtime/third_party/lib32" ]
|
||||
|
||||
external_deps = [
|
||||
"c_utils:utils",
|
||||
"drivers_interface_nnrt:libnnrt_proxy_1.0",
|
||||
"hilog_native:libhilog",
|
||||
"ipc:ipc_single",
|
||||
"mindspore:mindir",
|
||||
"neural_network_runtime:nnrt_target",
|
||||
]
|
||||
|
||||
cflags = [ "-Wno-error" ]
|
||||
|
@ -32,23 +32,17 @@ ohos_moduletest_suite("HatsHdfNnrtStabilityV1_0Test") {
|
||||
|
||||
include_dirs = [
|
||||
"../../v1_0",
|
||||
"//commonlibrary/c_utils/base/include",
|
||||
"//third_party/googletest/googletest/include/",
|
||||
"//foundation/ai/neural_network_runtime",
|
||||
"//foundation/ai/neural_network_runtime/third_party/include",
|
||||
"../../../../../../../../foundation/ai/neural_network_runtime",
|
||||
"//third_party/mindspore/mindspore-src/source/mindspore/lite/mindir/include",
|
||||
]
|
||||
|
||||
deps = [ "//foundation/ai/neural_network_runtime/frameworks:libneural_network_runtime" ]
|
||||
|
||||
lib_dirs = [ "//foundation/ai/neural_network_runtime/third_party/lib32" ]
|
||||
|
||||
external_deps = [
|
||||
"c_utils:utils",
|
||||
"drivers_interface_nnrt:libnnrt_proxy_1.0",
|
||||
"hilog_native:libhilog",
|
||||
"ipc:ipc_single",
|
||||
"mindspore:mindir",
|
||||
"neural_network_runtime:nnrt_target",
|
||||
]
|
||||
|
||||
cflags = [ "-Wno-error" ]
|
||||
|
@ -89,6 +89,15 @@ void RunModelTest(OHOS::sptr<V1_0::INnrtDevice> device, OHOS::sptr<V1_0::IPrepar
|
||||
std::vector<float> outputValue(buffer, buffer + ADDEND_DATA_SIZE);
|
||||
// check output
|
||||
EXPECT_TRUE(CheckExpectOutput(outputValue, expectValue)) << "output value check failed.";
|
||||
|
||||
// release
|
||||
HDICommon::ReleaseBufferOfTensors(device, inputs);
|
||||
HDICommon::ReleaseBufferOfTensors(device, outputs);
|
||||
HDICommon::UnmapAllMemory(mapedMemorys);
|
||||
outputsDims.clear();
|
||||
isOutputBufferEnough.clear();
|
||||
expectValue.clear();
|
||||
outputValue.clear();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
@ -30,7 +30,11 @@ ohos_moduletest_suite("HatsHdfNnrtFunctionV2_0Test") {
|
||||
"src/hdi_model_run_test.cpp",
|
||||
]
|
||||
|
||||
include_dirs = [ "../../v2_0" ]
|
||||
include_dirs = [
|
||||
"../../v2_0",
|
||||
"../../../../../../../../foundation/ai/neural_network_runtime",
|
||||
"//third_party/mindspore/mindspore-src/source/mindspore/lite/mindir/include",
|
||||
]
|
||||
|
||||
external_deps = [
|
||||
"c_utils:utils",
|
||||
|
@ -30,7 +30,11 @@ ohos_moduletest_suite("HatsHdfNnrtStabilityV2_0Test") {
|
||||
"src/hdi_stability_test.cpp",
|
||||
]
|
||||
|
||||
include_dirs = [ "../../v2_0" ]
|
||||
include_dirs = [
|
||||
"../../v2_0",
|
||||
"../../../../../../../../foundation/ai/neural_network_runtime",
|
||||
"//third_party/mindspore/mindspore-src/source/mindspore/lite/mindir/include",
|
||||
]
|
||||
|
||||
external_deps = [
|
||||
"c_utils:utils",
|
||||
|
@ -89,6 +89,15 @@ void RunModelTest(OHOS::sptr<V2_0::INnrtDevice> device, OHOS::sptr<V2_0::IPrepar
|
||||
std::vector<float> outputValue(buffer, buffer + ADDEND_DATA_SIZE);
|
||||
// check output
|
||||
EXPECT_TRUE(CheckExpectOutput(outputValue, expectValue)) << "output value check failed.";
|
||||
|
||||
// release
|
||||
HDICommon::ReleaseBufferOfTensors(device, inputs);
|
||||
HDICommon::ReleaseBufferOfTensors(device, outputs);
|
||||
HDICommon::UnmapAllMemory(mapedMemorys);
|
||||
outputsDims.clear();
|
||||
isOutputBufferEnough.clear();
|
||||
expectValue.clear();
|
||||
outputValue.clear();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
Loading…
x
Reference in New Issue
Block a user