Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle-Lite
提交
b13ce36a
P
Paddle-Lite
项目概览
PaddlePaddle
/
Paddle-Lite
通知
337
Star
4
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
271
列表
看板
标记
里程碑
合并请求
78
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle-Lite
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
271
Issue
271
列表
看板
标记
里程碑
合并请求
78
合并请求
78
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
b13ce36a
编写于
9月 28, 2018
作者:
xiebaiyuan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
suit ras berry compile cmake version
上级
b297bcbb
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
146 addition
and
77 deletion
+146
-77
test/CMakeLists.txt
test/CMakeLists.txt
+122
-67
tools/op.cmake
tools/op.cmake
+24
-10
未找到文件。
test/CMakeLists.txt
浏览文件 @
b13ce36a
set
(
dir
${
CMAKE_CURRENT_SOURCE_DIR
}
)
set
(
dir
${
CMAKE_CURRENT_SOURCE_DIR
}
)
set
(
CMAKE_RUNTIME_OUTPUT_DIRECTORY
"
${
dir
}
/build"
)
set
(
CMAKE_RUNTIME_OUTPUT_DIRECTORY
"
${
dir
}
/build"
)
set
(
FOUND_MATCH OFF
)
if
(
"googlenet"
IN_LIST NET
)
set
(
CON -1
)
message
(
STATUS
"nets :
${
NET
}
"
)
list
(
FIND NET
"googlenet"
CON
)
if
(
CON GREATER -1
)
# gen test
# gen test
ADD_EXECUTABLE
(
test-googlenet net/test_googlenet.cpp test_helper.h test_include.h executor_for_test.h
)
ADD_EXECUTABLE
(
test-googlenet net/test_googlenet.cpp test_helper.h test_include.h executor_for_test.h
)
target_link_libraries
(
test-googlenet paddle-mobile
)
target_link_libraries
(
test-googlenet paddle-mobile
)
elseif
(
"mobilenet"
IN_LIST NET
)
set
(
FOUND_MATCH ON
)
endif
()
list
(
FIND NET
"mobilenet"
CON
)
if
(
CON GREATER -1
)
# gen test
# gen test
ADD_EXECUTABLE
(
test-mobilenet net/test_mobilenet.cpp test_helper.h test_include.h executor_for_test.h
)
ADD_EXECUTABLE
(
test-mobilenet net/test_mobilenet.cpp test_helper.h test_include.h executor_for_test.h
)
target_link_libraries
(
test-mobilenet paddle-mobile
)
target_link_libraries
(
test-mobilenet paddle-mobile
)
...
@@ -13,23 +25,42 @@ elseif ("mobilenet" IN_LIST NET)
...
@@ -13,23 +25,42 @@ elseif ("mobilenet" IN_LIST NET)
# gen test
# gen test
ADD_EXECUTABLE
(
test-mobilenet-combine net/test_mobilenet_combine.cpp test_helper.h test_include.h executor_for_test.h
)
ADD_EXECUTABLE
(
test-mobilenet-combine net/test_mobilenet_combine.cpp test_helper.h test_include.h executor_for_test.h
)
target_link_libraries
(
test-mobilenet-combine paddle-mobile
)
target_link_libraries
(
test-mobilenet-combine paddle-mobile
)
set
(
FOUND_MATCH ON
)
endif
()
elseif
(
"yolo"
IN_LIST NET
)
list
(
FIND NET
"yolo"
CON
)
if
(
CON GREATER -1
)
# gen test
# gen test
ADD_EXECUTABLE
(
test-yolo net/test_yolo.cpp test_helper.h test_include.h executor_for_test.h
)
ADD_EXECUTABLE
(
test-yolo net/test_yolo.cpp test_helper.h test_include.h executor_for_test.h
)
target_link_libraries
(
test-yolo paddle-mobile
)
target_link_libraries
(
test-yolo paddle-mobile
)
# gen test
# gen test
ADD_EXECUTABLE
(
test_yolo_combined net/test_yolo_combined.cpp test_helper.h test_include.h executor_for_test.h
)
ADD_EXECUTABLE
(
test_yolo_combined net/test_yolo_combined.cpp test_helper.h test_include.h executor_for_test.h
)
target_link_libraries
(
test_yolo_combined paddle-mobile
)
target_link_libraries
(
test_yolo_combined paddle-mobile
)
elseif
(
"squeezenet"
IN_LIST NET
)
set
(
FOUND_MATCH ON
)
endif
()
list
(
FIND NET
"squeezenet"
CON
)
if
(
CON GREATER -1
)
# gen test
# gen test
ADD_EXECUTABLE
(
test-squeezenet net/test_squeezenet.cpp test_helper.h test_include.h executor_for_test.h
)
ADD_EXECUTABLE
(
test-squeezenet net/test_squeezenet.cpp test_helper.h test_include.h executor_for_test.h
)
target_link_libraries
(
test-squeezenet paddle-mobile
)
target_link_libraries
(
test-squeezenet paddle-mobile
)
elseif
(
"resnet"
IN_LIST NET
)
set
(
FOUND_MATCH ON
)
endif
()
list
(
FIND NET
"resnet"
CON
)
if
(
CON GREATER -1
)
# gen test
# gen test
ADD_EXECUTABLE
(
test-resnet net/test_resnet.cpp test_helper.h test_include.h executor_for_test.h
)
ADD_EXECUTABLE
(
test-resnet net/test_resnet.cpp test_helper.h test_include.h executor_for_test.h
)
target_link_libraries
(
test-resnet paddle-mobile
)
target_link_libraries
(
test-resnet paddle-mobile
)
elseif
(
"FPGAnets"
IN_LIST NET
)
set
(
FOUND_MATCH ON
)
endif
()
list
(
FIND NET
"FPGAnets"
CON
)
if
(
CON GREATER -1
)
ADD_EXECUTABLE
(
test-resnet net/test_resnet.cpp test_helper.h test_include.h executor_for_test.h
)
ADD_EXECUTABLE
(
test-resnet net/test_resnet.cpp test_helper.h test_include.h executor_for_test.h
)
target_link_libraries
(
test-resnet paddle-mobile
)
target_link_libraries
(
test-resnet paddle-mobile
)
...
@@ -62,12 +93,22 @@ elseif("FPGAnets" IN_LIST NET)
...
@@ -62,12 +93,22 @@ elseif("FPGAnets" IN_LIST NET)
ADD_EXECUTABLE
(
test-format-data fpga/test_format_data.cpp test_helper.h test_include.h
)
ADD_EXECUTABLE
(
test-format-data fpga/test_format_data.cpp test_helper.h test_include.h
)
target_link_libraries
(
test-format-data paddle-mobile
)
target_link_libraries
(
test-format-data paddle-mobile
)
elseif
(
"mobilenetssd"
IN_LIST NET
)
set
(
FOUND_MATCH ON
)
endif
()
list
(
FIND NET
"mobilenetssd"
CON
)
if
(
CON GREATER -1
)
# gen test
# gen test
ADD_EXECUTABLE
(
test-mobilenetssd net/test_mobilenet+ssd.cpp test_helper.h test_include.h executor_for_test.h
)
ADD_EXECUTABLE
(
test-mobilenetssd net/test_mobilenet+ssd.cpp test_helper.h test_include.h executor_for_test.h
)
target_link_libraries
(
test-mobilenetssd paddle-mobile
)
target_link_libraries
(
test-mobilenetssd paddle-mobile
)
elseif
(
"nlp"
IN_LIST NET
)
set
(
FOUND_MATCH ON
)
endif
()
list
(
FIND NET
"nlp"
CON
)
if
(
CON GREATER -1
)
# gen test
# gen test
ADD_EXECUTABLE
(
test-nlp net/test_nlp.cpp test_helper.h test_include.h executor_for_test.h
)
ADD_EXECUTABLE
(
test-nlp net/test_nlp.cpp test_helper.h test_include.h executor_for_test.h
)
target_link_libraries
(
test-nlp paddle-mobile
)
target_link_libraries
(
test-nlp paddle-mobile
)
...
@@ -75,17 +116,30 @@ elseif("nlp" IN_LIST NET)
...
@@ -75,17 +116,30 @@ elseif("nlp" IN_LIST NET)
# gen test
# gen test
ADD_EXECUTABLE
(
test-gru-op operators/test_gru_op.cpp test_helper.h test_include.h
)
ADD_EXECUTABLE
(
test-gru-op operators/test_gru_op.cpp test_helper.h test_include.h
)
target_link_libraries
(
test-gru-op paddle-mobile
)
target_link_libraries
(
test-gru-op paddle-mobile
)
elseif
(
"mobilenetfssd"
IN_LIST NET
)
set
(
FOUND_MATCH ON
)
endif
()
list
(
FIND NET
"mobilenetfssd"
CON
)
if
(
CON GREATER -1
)
# gen test
# gen test
ADD_EXECUTABLE
(
test-fssd net/test_mobilenet_025_fssd.cpp test_helper.h test_include.h
)
ADD_EXECUTABLE
(
test-fssd net/test_mobilenet_025_fssd.cpp test_helper.h test_include.h
)
target_link_libraries
(
test-fssd paddle-mobile
)
target_link_libraries
(
test-fssd paddle-mobile
)
elseif
(
"genet"
IN_LIST NET
)
set
(
FOUND_MATCH ON
)
endif
()
list
(
FIND NET
"genet"
CON
)
if
(
CON GREATER -1
)
# gen test
# gen test
ADD_EXECUTABLE
(
test-genet net/test_genet_combine.cpp test_helper.h test_include.h executor_for_test.h
)
ADD_EXECUTABLE
(
test-genet net/test_genet_combine.cpp test_helper.h test_include.h executor_for_test.h
)
target_link_libraries
(
test-genet paddle-mobile
)
target_link_libraries
(
test-genet paddle-mobile
)
else
(
)
set
(
FOUND_MATCH ON
)
endif
()
if
(
NOT FOUND_MATCH
)
# gen test
# gen test
ADD_EXECUTABLE
(
test-resnet net/test_resnet.cpp test_helper.h test_include.h executor_for_test.h
)
ADD_EXECUTABLE
(
test-resnet net/test_resnet.cpp test_helper.h test_include.h executor_for_test.h
)
target_link_libraries
(
test-resnet paddle-mobile
)
target_link_libraries
(
test-resnet paddle-mobile
)
...
@@ -263,4 +317,5 @@ else ()
...
@@ -263,4 +317,5 @@ else ()
#add_library(test-lib-size SHARED common/test_lib_size.h common/test_lib_size.cpp)
#add_library(test-lib-size SHARED common/test_lib_size.h common/test_lib_size.cpp)
endif
()
endif
()
tools/op.cmake
浏览文件 @
b13ce36a
set
(
FOUND_MATCH OFF
)
set
(
FOUND_MATCH OFF
)
if
(
"googlenet"
IN_LIST NET
)
set
(
CON -1
)
message
(
STATUS
"nets :
${
NET
}
"
)
list
(
FIND NET
"googlenet"
CON
)
if
(
CON GREATER -1
)
message
(
"googlenet enabled"
)
message
(
"googlenet enabled"
)
set
(
CONCAT_OP ON
)
set
(
CONCAT_OP ON
)
set
(
CONV_OP ON
)
set
(
CONV_OP ON
)
...
@@ -15,7 +20,8 @@ if ("googlenet" IN_LIST NET)
...
@@ -15,7 +20,8 @@ if ("googlenet" IN_LIST NET)
set
(
FOUND_MATCH ON
)
set
(
FOUND_MATCH ON
)
endif
()
endif
()
if
(
"mobilenet"
IN_LIST NET
)
list
(
FIND NET
"mobilenet"
CON
)
if
(
CON GREATER -1
)
message
(
"mobilenet enabled"
)
message
(
"mobilenet enabled"
)
set
(
CONV_OP ON
)
set
(
CONV_OP ON
)
set
(
ELEMENTWISEADD_OP ON
)
set
(
ELEMENTWISEADD_OP ON
)
...
@@ -33,7 +39,8 @@ if ("mobilenet" IN_LIST NET)
...
@@ -33,7 +39,8 @@ if ("mobilenet" IN_LIST NET)
endif
()
endif
()
if
(
"mobilenetssd"
IN_LIST NET
)
list
(
FIND NET
"mobilenetssd"
CON
)
if
(
CON GREATER -1
)
message
(
"mobilenetssd enabled"
)
message
(
"mobilenetssd enabled"
)
set
(
FUSION_CONVBNRELU_OP ON
)
set
(
FUSION_CONVBNRELU_OP ON
)
set
(
FUSION_CONVBNRELU_OP ON
)
set
(
FUSION_CONVBNRELU_OP ON
)
...
@@ -55,7 +62,8 @@ if ("mobilenetssd" IN_LIST NET)
...
@@ -55,7 +62,8 @@ if ("mobilenetssd" IN_LIST NET)
endif
()
endif
()
if
(
"yolo"
IN_LIST NET
)
list
(
FIND NET
"yolo"
CON
)
if
(
CON GREATER -1
)
message
(
"yolo enabled"
)
message
(
"yolo enabled"
)
set
(
BATCHNORM_OP ON
)
set
(
BATCHNORM_OP ON
)
set
(
CONV_OP ON
)
set
(
CONV_OP ON
)
...
@@ -65,7 +73,8 @@ if ("yolo" IN_LIST NET)
...
@@ -65,7 +73,8 @@ if ("yolo" IN_LIST NET)
set
(
FOUND_MATCH ON
)
set
(
FOUND_MATCH ON
)
endif
()
endif
()
if
(
"squeezenet"
IN_LIST NET
)
list
(
FIND NET
"squeezenet"
CON
)
if
(
CON GREATER -1
)
message
(
"squeezenet enabled"
)
message
(
"squeezenet enabled"
)
set
(
CONCAT_OP ON
)
set
(
CONCAT_OP ON
)
set
(
CONV_OP ON
)
set
(
CONV_OP ON
)
...
@@ -79,7 +88,8 @@ if ("squeezenet" IN_LIST NET)
...
@@ -79,7 +88,8 @@ if ("squeezenet" IN_LIST NET)
endif
()
endif
()
if
(
"resnet"
IN_LIST NET
)
list
(
FIND NET
"resnet"
CON
)
if
(
CON GREATER -1
)
message
(
"resnet enabled"
)
message
(
"resnet enabled"
)
set
(
CONCAT_OP ON
)
set
(
CONCAT_OP ON
)
set
(
CONV_OP ON
)
set
(
CONV_OP ON
)
...
@@ -95,7 +105,8 @@ if ("resnet" IN_LIST NET)
...
@@ -95,7 +105,8 @@ if ("resnet" IN_LIST NET)
set
(
FOUND_MATCH ON
)
set
(
FOUND_MATCH ON
)
endif
()
endif
()
if
(
"FPGAnets"
IN_LIST NET
)
list
(
FIND NET
"FPGAnets"
CON
)
if
(
CON GREATER -1
)
message
(
"FPGAnets enabled"
)
message
(
"FPGAnets enabled"
)
set
(
FUSION_CONVADDRELU_OP ON
)
set
(
FUSION_CONVADDRELU_OP ON
)
set
(
FUSION_CONVADDBNRELU_OP ON
)
set
(
FUSION_CONVADDBNRELU_OP ON
)
...
@@ -114,7 +125,8 @@ if ("FPGAnets" IN_LIST NET)
...
@@ -114,7 +125,8 @@ if ("FPGAnets" IN_LIST NET)
set
(
FOUND_MATCH ON
)
set
(
FOUND_MATCH ON
)
endif
()
endif
()
if
(
"nlp"
IN_LIST NET
)
list
(
FIND NET
"nlp"
CON
)
if
(
CON GREATER -1
)
message
(
"nlp enabled"
)
message
(
"nlp enabled"
)
set
(
FUSION_FC_OP ON
)
set
(
FUSION_FC_OP ON
)
set
(
LOOKUP_OP ON
)
set
(
LOOKUP_OP ON
)
...
@@ -127,7 +139,8 @@ if ("nlp" IN_LIST NET)
...
@@ -127,7 +139,8 @@ if ("nlp" IN_LIST NET)
set
(
FOUND_MATCH ON
)
set
(
FOUND_MATCH ON
)
endif
()
endif
()
if
(
"mobilenetfssd"
IN_LIST NET
)
list
(
FIND NET
"mobilenetfssd"
CON
)
if
(
CON GREATER -1
)
message
(
"mobilenetfssd enabled"
)
message
(
"mobilenetfssd enabled"
)
set
(
FUSION_CONVADDRELU_OP ON
)
set
(
FUSION_CONVADDRELU_OP ON
)
set
(
FUSION_CONVADDBNRELU_OP ON
)
set
(
FUSION_CONVADDBNRELU_OP ON
)
...
@@ -148,7 +161,8 @@ if ("mobilenetfssd" IN_LIST NET)
...
@@ -148,7 +161,8 @@ if ("mobilenetfssd" IN_LIST NET)
set
(
FOUND_MATCH ON
)
set
(
FOUND_MATCH ON
)
endif
()
endif
()
if
(
"genet"
IN_LIST NET
)
list
(
FIND NET
"genet"
CON
)
if
(
CON GREATER -1
)
message
(
"genet enabled"
)
message
(
"genet enabled"
)
set
(
FUSION_CONVADDPRELU_OP ON
)
set
(
FUSION_CONVADDPRELU_OP ON
)
set
(
FUSION_CONVADDADDPRELU_OP ON
)
set
(
FUSION_CONVADDADDPRELU_OP ON
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录