Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
50ffb56b
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
50ffb56b
编写于
12月 23, 2022
作者:
T
tangshihua
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
同步master
Signed-off-by:
N
tangshihua
<
tangshihua@huawei.com
>
上级
db38d810
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
35 addition
and
23 deletion
+35
-23
ai/neural_network_runtime/common/mock_idevice.cpp
ai/neural_network_runtime/common/mock_idevice.cpp
+2
-2
ai/neural_network_runtime/interface/BUILD.gn
ai/neural_network_runtime/interface/BUILD.gn
+16
-10
ai/neural_network_runtime/interface/src/DeviceTest.cpp
ai/neural_network_runtime/interface/src/DeviceTest.cpp
+1
-1
ai/neural_network_runtime/stability/BUILD.gn
ai/neural_network_runtime/stability/BUILD.gn
+16
-10
未找到文件。
ai/neural_network_runtime/common/mock_idevice.cpp
浏览文件 @
50ffb56b
...
@@ -80,13 +80,13 @@ void MockIDevice::SetDynamicInputSupported(bool isSupported)
...
@@ -80,13 +80,13 @@ void MockIDevice::SetDynamicInputSupported(bool isSupported)
int32_t
MockIDevice
::
GetDeviceName
(
std
::
string
&
name
)
int32_t
MockIDevice
::
GetDeviceName
(
std
::
string
&
name
)
{
{
name
=
"
RK3568
-CPU"
;
name
=
"
Device
-CPU"
;
return
HDF_SUCCESS
;
return
HDF_SUCCESS
;
}
}
int32_t
MockIDevice
::
GetVendorName
(
std
::
string
&
name
)
int32_t
MockIDevice
::
GetVendorName
(
std
::
string
&
name
)
{
{
name
=
"
Rockchip
"
;
name
=
"
TestVendor
"
;
return
HDF_SUCCESS
;
return
HDF_SUCCESS
;
}
}
...
...
ai/neural_network_runtime/interface/BUILD.gn
浏览文件 @
50ffb56b
...
@@ -13,8 +13,19 @@
...
@@ -13,8 +13,19 @@
import("//test/xts/tools/build/suite.gni")
import("//test/xts/tools/build/suite.gni")
config("nnrt_config") {
include_dirs = [
"../common",
"//foundation/ai/neural_network_runtime",
"//foundation/ai/neural_network_runtime/third_party/include",
"//third_party/googletest/googletest/include",
"//third_party/googletest/googlemock/include",
"//third_party/mindspore/mindspore/lite/mindir/include",
]
cflags = [ "-Wno-error" ]
}
ohos_moduletest_suite("ActsAiNnrtFunctionTest") {
ohos_moduletest_suite("ActsAiNnrtFunctionTest") {
testonly = true
module_out_path = "acts/nnrt"
module_out_path = "acts/nnrt"
sources = [
sources = [
"../common/mock_idevice.cpp",
"../common/mock_idevice.cpp",
...
@@ -26,14 +37,8 @@ ohos_moduletest_suite("ActsAiNnrtFunctionTest") {
...
@@ -26,14 +37,8 @@ ohos_moduletest_suite("ActsAiNnrtFunctionTest") {
"src/ModelTest.cpp",
"src/ModelTest.cpp",
]
]
include_dirs = [
configs = [ ":nnrt_config" ]
"../common",
"//foundation/ai/neural_network_runtime",
"//foundation/ai/neural_network_runtime/third_party/include",
"//third_party/googletest/googletest/include",
"//third_party/googletest/googlemock/include",
"//third_party/mindspore/mindspore/lite/mindir/include",
]
deps = [
deps = [
"//foundation/ai/neural_network_runtime/frameworks:libneural_network_runtime",
"//foundation/ai/neural_network_runtime/frameworks:libneural_network_runtime",
"//third_party/googletest:gmock",
"//third_party/googletest:gmock",
...
@@ -51,5 +56,6 @@ ohos_moduletest_suite("ActsAiNnrtFunctionTest") {
...
@@ -51,5 +56,6 @@ ohos_moduletest_suite("ActsAiNnrtFunctionTest") {
"mindspore:mindir",
"mindspore:mindir",
]
]
cflags = [ "-Wno-error" ]
subsystem_name = "ai"
part_name = "neural_network_runtime"
}
}
ai/neural_network_runtime/interface/src/DeviceTest.cpp
浏览文件 @
50ffb56b
...
@@ -142,7 +142,7 @@ HWTEST_F(DeviceTest, SUB_AI_NNRt_Func_North_Device_DeviceName_0400, Function | M
...
@@ -142,7 +142,7 @@ HWTEST_F(DeviceTest, SUB_AI_NNRt_Func_North_Device_DeviceName_0400, Function | M
size_t
targetDevice
=
devicesID
[
0
];
size_t
targetDevice
=
devicesID
[
0
];
const
char
*
name
=
nullptr
;
const
char
*
name
=
nullptr
;
std
::
string
m_deviceName
{
"
RK3568-CPU_Rockchip
"
};
std
::
string
m_deviceName
{
"
Device-CPU_TestVendor
"
};
OH_NN_ReturnCode
ret
=
OH_NNDevice_GetName
(
targetDevice
,
&
name
);
OH_NN_ReturnCode
ret
=
OH_NNDevice_GetName
(
targetDevice
,
&
name
);
EXPECT_EQ
(
OH_NN_SUCCESS
,
ret
);
EXPECT_EQ
(
OH_NN_SUCCESS
,
ret
);
...
...
ai/neural_network_runtime/stability/BUILD.gn
浏览文件 @
50ffb56b
...
@@ -13,15 +13,7 @@
...
@@ -13,15 +13,7 @@
import("//test/xts/tools/build/suite.gni")
import("//test/xts/tools/build/suite.gni")
ohos_moduletest_suite("ActsAiNnrtStabilityTest") {
config("nnrt_config") {
testonly = true
module_out_path = "acts/nnrt"
sources = [
"../common/mock_idevice.cpp",
"../common/nnrt_utils.cpp",
"src/MultiThreadTest.cpp",
]
include_dirs = [
include_dirs = [
"../common",
"../common",
"//foundation/ai/neural_network_runtime",
"//foundation/ai/neural_network_runtime",
...
@@ -30,6 +22,19 @@ ohos_moduletest_suite("ActsAiNnrtStabilityTest") {
...
@@ -30,6 +22,19 @@ ohos_moduletest_suite("ActsAiNnrtStabilityTest") {
"//third_party/googletest/googlemock/include",
"//third_party/googletest/googlemock/include",
"//third_party/mindspore/mindspore/lite/mindir/include",
"//third_party/mindspore/mindspore/lite/mindir/include",
]
]
cflags = [ "-Wno-error" ]
}
ohos_moduletest_suite("ActsAiNnrtStabilityTest") {
module_out_path = "acts/nnrt"
sources = [
"../common/mock_idevice.cpp",
"../common/nnrt_utils.cpp",
"src/MultiThreadTest.cpp",
]
configs = [ ":nnrt_config" ]
deps = [
deps = [
"//foundation/ai/neural_network_runtime/frameworks:libneural_network_runtime",
"//foundation/ai/neural_network_runtime/frameworks:libneural_network_runtime",
"//third_party/googletest:gmock",
"//third_party/googletest:gmock",
...
@@ -47,5 +52,6 @@ ohos_moduletest_suite("ActsAiNnrtStabilityTest") {
...
@@ -47,5 +52,6 @@ ohos_moduletest_suite("ActsAiNnrtStabilityTest") {
"mindspore:mindir",
"mindspore:mindir",
]
]
cflags = [ "-Wno-error" ]
subsystem_name = "ai"
part_name = "neural_network_runtime"
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录