Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Crayon鑫
Paddle
提交
09fc307f
P
Paddle
项目概览
Crayon鑫
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
09fc307f
编写于
12月 04, 2017
作者:
T
Tao Luo
提交者:
GitHub
12月 04, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #5830 from luotao1/cmake
simplify the CMakeLists.txt of trainer/tests and gserver/tests
上级
20b885f7
362b7d8a
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
48 addition
and
93 deletion
+48
-93
paddle/gserver/tests/CMakeLists.txt
paddle/gserver/tests/CMakeLists.txt
+31
-55
paddle/trainer/tests/CMakeLists.txt
paddle/trainer/tests/CMakeLists.txt
+17
-38
未找到文件。
paddle/gserver/tests/CMakeLists.txt
浏览文件 @
09fc307f
# gserver pacakge unittests
add_simple_unittest
(
test_LinearChainCRF
)
add_simple_unittest
(
test_RecurrentLayer
)
...
...
@@ -29,6 +28,26 @@ gserver_test(test_KmaxSeqScore)
gserver_test
(
test_Expand
)
gserver_test
(
test_MaxPoolingWithMaskOutput
)
set
(
PYTHON_PATH
${
PADDLE_SOURCE_DIR
}
/paddle/.set_python_path.sh -d
${
PADDLE_SOURCE_DIR
}
/python/:
${
PADDLE_SOURCE_DIR
}
/paddle/gserver/tests
)
function
(
gserver_test_with_python TARGET
)
add_unittest_without_exec
(
${
TARGET
}
${
TARGET
}
.cpp
)
add_test
(
NAME
${
TARGET
}
COMMAND
${
PYTHON_PATH
}
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
TARGET
}
WORKING_DIRECTORY
${
PADDLE_SOURCE_DIR
}
/paddle/
)
endfunction
()
gserver_test_with_python
(
test_PyDataProvider2
)
if
(
WITH_PYTHON
)
gserver_test_with_python
(
test_PyDataProvider
)
endif
()
if
(
NOT MOBILE_INFERENCE
)
gserver_test_with_python
(
test_CompareTwoNets
)
# TODO(yuyang18): There is some bug in test_RecurrentGradientMachine, I will fix it.
gserver_test_with_python
(
test_RecurrentGradientMachine
)
endif
()
########## test_MKLDNN layers and activations ##########
if
(
WITH_MKLDNN
)
add_unittest_without_exec
(
test_MKLDNN
...
...
@@ -36,18 +55,7 @@ if(WITH_MKLDNN)
MKLDNNTester.cpp
LayerGradUtil.cpp
)
add_test
(
NAME test_MKLDNN
COMMAND .set_python_path.sh -d
${
PADDLE_SOURCE_DIR
}
/python
${
CMAKE_CURRENT_BINARY_DIR
}
/test_MKLDNN
WORKING_DIRECTORY
${
PADDLE_SOURCE_DIR
}
/paddle
)
endif
()
############## test_PyDataProvider ########################
if
(
WITH_PYTHON
)
add_unittest_without_exec
(
test_PyDataProvider
test_PyDataProvider.cpp
)
add_test
(
NAME test_PyDataProvider
COMMAND .set_python_path.sh -d ./gserver/tests:
${
PADDLE_SOURCE_DIR
}
/python/
${
CMAKE_CURRENT_BINARY_DIR
}
/test_PyDataProvider
COMMAND
${
PYTHON_PATH
}
${
CMAKE_CURRENT_BINARY_DIR
}
/test_MKLDNN
WORKING_DIRECTORY
${
PADDLE_SOURCE_DIR
}
/paddle
)
endif
()
...
...
@@ -55,67 +63,35 @@ endif()
if
(
NOT WITH_DOUBLE AND NOT MOBILE_INFERENCE
)
add_unittest_without_exec
(
test_WarpCTCLayer
test_WarpCTCLayer.cpp
)
add_test
(
NAME test_WarpCTCLayer
COMMAND
${
CMAKE_CURRENT_BINARY_DIR
}
/test_WarpCTCLayer --warpctc_dir=
${
WARPCTC_LIB_DIR
}
WORKING_DIRECTORY
${
PADDLE_SOURCE_DIR
}
/paddle
)
endif
()
if
(
NOT MOBILE_INFERENCE
)
################## test_Evaluator #############
##########
################## test_Evaluator #############
add_unittest
(
test_Evaluator
test_Evaluator.cpp
)
############### test_RecurrentGradientMachine ###############
# TODO(yuyang18): There is some bug in test_RecurrentGradientMachine
# I will fix it.
add_unittest_without_exec
(
test_RecurrentGradientMachine
test_RecurrentGradientMachine.cpp
)
add_test
(
NAME test_RecurrentGradientMachine
COMMAND .set_python_path.sh -d
${
PADDLE_SOURCE_DIR
}
/python:
${
PADDLE_SOURCE_DIR
}
/paddle/gserver/tests
${
CMAKE_CURRENT_BINARY_DIR
}
/test_RecurrentGradientMachine
WORKING_DIRECTORY
${
PADDLE_SOURCE_DIR
}
/paddle
)
############### test_NetworkCompare ###############
########### test_NetworkCompare ###############
add_unittest_without_exec
(
test_NetworkCompare
test_NetworkCompare.cpp
)
if
(
WITH_GPU
)
add_test
(
NAME test_NetworkCompare
COMMAND .set_python_path.sh -d
${
PADDLE_SOURCE_DIR
}
/python
${
CMAKE_CURRENT_BINARY_DIR
}
/test_NetworkCompare --use_gpu=true
WORKING_DIRECTORY
${
PADDLE_SOURCE_DIR
}
/paddle
)
set
(
use_gpu true
)
else
()
set
(
use_gpu false
)
endif
()
add_test
(
NAME test_NetworkCompare
COMMAND .set_python_path.sh -d
${
PADDLE_SOURCE_DIR
}
/python
${
CMAKE_CURRENT_BINARY_DIR
}
/test_NetworkCompare --use_gpu=false
COMMAND
${
PYTHON_PATH
}
${
CMAKE_CURRENT_BINARY_DIR
}
/test_NetworkCompare --use_gpu=
${
use_gpu
}
WORKING_DIRECTORY
${
PADDLE_SOURCE_DIR
}
/paddle
)
endif
()
############
##### test_CompareSparse ##
################
############
test_CompareSparse
################
add_unittest_without_exec
(
test_CompareSparse
test_CompareSparse.cpp
)
if
(
NOT ON_TRAVIS
)
add_test
(
NAME test_CompareSparse
COMMAND
${
PADDLE_SOURCE_DIR
}
/paddle/.set_python_path.sh -d
${
PADDLE_SOURCE_DIR
}
/python:
${
PADDLE_SOURCE_DIR
}
/paddle/gserver/tests
./.set_port.sh -p port -n 6
COMMAND
${
PYTHON_PATH
}
./.set_port.sh -p port -n 6
${
CMAKE_CURRENT_BINARY_DIR
}
/test_CompareSparse
WORKING_DIRECTORY
${
PADDLE_SOURCE_DIR
}
/paddle/
)
endif
()
################ test_CompareTwoNets ######################
add_unittest_without_exec
(
test_CompareTwoNets
test_CompareTwoNets.cpp
)
add_test
(
NAME test_CompareTwoNets
COMMAND
${
PADDLE_SOURCE_DIR
}
/paddle/.set_python_path.sh -d
${
PADDLE_SOURCE_DIR
}
/python:
${
PADDLE_SOURCE_DIR
}
/paddle/gserver/tests
${
CMAKE_CURRENT_BINARY_DIR
}
/test_CompareTwoNets
WORKING_DIRECTORY
${
PADDLE_SOURCE_DIR
}
/paddle/
)
endif
()
################ test_PyDataProvider2 ######################
add_unittest_without_exec
(
test_PyDataProvider2
test_PyDataProvider2.cpp
)
add_test
(
NAME test_PyDataProvider2
COMMAND .set_python_path.sh -d
${
PADDLE_SOURCE_DIR
}
/paddle/gserver/tests:
${
PADDLE_SOURCE_DIR
}
/python
${
CMAKE_CURRENT_BINARY_DIR
}
/test_PyDataProvider2
WORKING_DIRECTORY
${
PADDLE_SOURCE_DIR
}
/paddle
)
paddle/trainer/tests/CMakeLists.txt
浏览文件 @
09fc307f
################# test_Compare ############################
add_unittest_without_exec
(
test_Compare
test_Compare.cpp
)
add_test
(
NAME test_Compare
COMMAND
${
PADDLE_SOURCE_DIR
}
/paddle/.set_python_path.sh -d
${
PADDLE_SOURCE_DIR
}
/python
${
CMAKE_CURRENT_BINARY_DIR
}
/test_Compare
set
(
PYTHON_PATH
${
PADDLE_SOURCE_DIR
}
/paddle/.set_python_path.sh -d
${
PADDLE_SOURCE_DIR
}
/python/:
${
PADDLE_SOURCE_DIR
}
/paddle/trainer/tests
)
function
(
trainer_test TARGET
)
add_unittest_without_exec
(
${
TARGET
}
${
TARGET
}
.cpp
)
add_test
(
NAME
${
TARGET
}
COMMAND
${
PYTHON_PATH
}
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
TARGET
}
WORKING_DIRECTORY
${
PADDLE_SOURCE_DIR
}
/paddle/
)
endfunction
()
################# test_Trainer ###########################
add_unittest_without_exec
(
test_Trainer
test_Trainer.cpp
)
add_test
(
NAME test_Trainer
COMMAND
${
PADDLE_SOURCE_DIR
}
/paddle/.set_python_path.sh -d
${
PADDLE_SOURCE_DIR
}
/python/
${
PADDLE_SOURCE_DIR
}
/paddle/.set_python_path.sh -d
${
PADDLE_SOURCE_DIR
}
/python/
${
CMAKE_CURRENT_BINARY_DIR
}
/test_Trainer
WORKING_DIRECTORY
${
PADDLE_SOURCE_DIR
}
/paddle/
)
trainer_test
(
test_Compare
)
trainer_test
(
test_PyDataProviderWrapper
)
trainer_test
(
test_recurrent_machine_generation
)
trainer_test
(
test_Trainer
)
############### test_TrainerOnePass ##########################
if
(
WITH_PYTHON
)
...
...
@@ -22,32 +20,13 @@ if(WITH_PYTHON)
add_unittest_without_exec
(
test_TrainerOnePass
test_TrainerOnePass.cpp
)
add_test
(
NAME test_TrainerOnePass
COMMAND
${
PADDLE_SOURCE_DIR
}
/paddle/.set_python_path.sh -d
${
PADDLE_SOURCE_DIR
}
/python/:
${
PADDLE_SOURCE_DIR
}
/paddle/trainer/tests
${
PADDLE_SOURCE_DIR
}
/paddle/.set_port.sh -p port
${
CMAKE_CURRENT_BINARY_DIR
}
/test_TrainerOnePass
COMMAND
${
PYTHON_PATH
}
${
PADDLE_SOURCE_DIR
}
/paddle/.set_port.sh -p port
${
CMAKE_CURRENT_BINARY_DIR
}
/test_TrainerOnePass
WORKING_DIRECTORY
${
PADDLE_SOURCE_DIR
}
/paddle/
)
endif
()
################# test_recurrent_machine_generation ###############
add_unittest_without_exec
(
test_recurrent_machine_generation
test_recurrent_machine_generation.cpp
)
add_test
(
NAME test_recurrent_machine_generation
COMMAND
${
PADDLE_SOURCE_DIR
}
/paddle/.set_python_path.sh -d
${
PADDLE_SOURCE_DIR
}
/python/
${
CMAKE_CURRENT_BINARY_DIR
}
/test_recurrent_machine_generation
WORKING_DIRECTORY
${
PADDLE_SOURCE_DIR
}
/paddle/
)
#################### test_PyDataProviderWrapper #########################
add_unittest_without_exec
(
test_PyDataProviderWrapper
test_PyDataProviderWrapper.cpp
)
add_test
(
NAME test_PyDataProviderWrapper
COMMAND
${
PADDLE_SOURCE_DIR
}
/paddle/.set_python_path.sh -d
${
PADDLE_SOURCE_DIR
}
/python/:
${
PADDLE_SOURCE_DIR
}
/paddle/trainer/tests
${
CMAKE_CURRENT_BINARY_DIR
}
/test_PyDataProviderWrapper
WORKING_DIRECTORY
${
PADDLE_SOURCE_DIR
}
/paddle/
)
#################### test_config_parser #########################
add_test
(
NAME test_config_parser
COMMAND
${
P
ADDLE_SOURCE_DIR
}
/paddle/.set_python_path.sh -d
${
PADDLE_SOURCE_DIR
}
/python/
${
P
YTHON_EXECUTABLE
}
${
P
ADDLE_SOURCE_DIR
}
/paddle/trainer/tests/config_parser_test.py
COMMAND
${
P
YTHON_PATH
}
${
PYTHON_EXECUTABLE
}
${
PADDLE_SOURCE_DIR
}
/paddle/trainer/tests/config_parser_test.py
WORKING_DIRECTORY
${
PADDLE_SOURCE_DIR
}
/paddle/
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录