Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle-Lite
提交
774b4652
P
Paddle-Lite
项目概览
PaddlePaddle
/
Paddle-Lite
通知
331
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看板
未验证
提交
774b4652
编写于
3月 17, 2020
作者:
W
Wilber
提交者:
GitHub
3月 17, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
For cuda compilation products and ci (#3152)
add cuda ci. Organize cuda compilation products.
上级
33c277e6
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
68 addition
and
42 deletion
+68
-42
lite/CMakeLists.txt
lite/CMakeLists.txt
+24
-1
lite/api/CMakeLists.txt
lite/api/CMakeLists.txt
+32
-30
lite/backends/cuda/math/CMakeLists.txt
lite/backends/cuda/math/CMakeLists.txt
+1
-1
lite/kernels/cuda/CMakeLists.txt
lite/kernels/cuda/CMakeLists.txt
+7
-7
lite/tools/ci_build.sh
lite/tools/ci_build.sh
+4
-3
未找到文件。
lite/CMakeLists.txt
浏览文件 @
774b4652
...
...
@@ -127,7 +127,30 @@ if (LITE_WITH_X86)
endif
()
if
(
LITE_WITH_CUDA
)
add_dependencies
(
publish_inference paddle_full_api_shared
)
add_custom_target
(
publish_inference_cuda_cxx_lib
${
TARGET
}
COMMAND mkdir -p
"
${
INFER_LITE_PUBLISH_ROOT
}
/cxx/lib"
COMMAND mkdir -p
"
${
INFER_LITE_PUBLISH_ROOT
}
/bin"
COMMAND mkdir -p
"
${
INFER_LITE_PUBLISH_ROOT
}
/cxx/include"
COMMAND cp
"
${
CMAKE_SOURCE_DIR
}
/lite/api/paddle_*.h"
"
${
INFER_LITE_PUBLISH_ROOT
}
/cxx/include"
COMMAND cp
"
${
CMAKE_BINARY_DIR
}
/libpaddle_api_full_bundled.a"
"
${
INFER_LITE_PUBLISH_ROOT
}
/cxx/lib"
COMMAND cp
"
${
CMAKE_BINARY_DIR
}
/libpaddle_api_light_bundled.a"
"
${
INFER_LITE_PUBLISH_ROOT
}
/cxx/lib"
COMMAND cp
"
${
CMAKE_BINARY_DIR
}
/lite/api/*.so"
"
${
INFER_LITE_PUBLISH_ROOT
}
/cxx/lib"
#COMMAND cp "${CMAKE_BINARY_DIR}/lite/api/test_model_bin" "${INFER_LITE_PUBLISH_ROOT}/bin"
)
add_dependencies
(
publish_inference_cuda_cxx_lib bundle_full_api
)
add_dependencies
(
publish_inference_cuda_cxx_lib bundle_light_api
)
add_dependencies
(
publish_inference_cuda_cxx_lib paddle_full_api_shared
)
add_dependencies
(
publish_inference_cuda_cxx_lib paddle_light_api_shared
)
#add_dependencies(publish_inference_cuda_cxx_lib test_model_bin)
add_dependencies
(
publish_inference publish_inference_cuda_cxx_lib
)
add_custom_target
(
publish_inference_cuda_cxx_demos
${
TARGET
}
COMMAND mkdir -p
"
${
INFER_LITE_PUBLISH_ROOT
}
/third_party"
COMMAND cp -r
"
${
CMAKE_BINARY_DIR
}
/third_party/install/*"
"
${
INFER_LITE_PUBLISH_ROOT
}
/third_party"
COMMAND mkdir -p
"
${
INFER_LITE_PUBLISH_ROOT
}
/demo/cxx"
)
add_dependencies
(
publish_inference_cuda_cxx_lib publish_inference_cuda_cxx_demos
)
add_dependencies
(
publish_inference_cuda_cxx_demos paddle_full_api_shared
)
endif
(
LITE_WITH_CUDA
)
if
(
LITE_WITH_LIGHT_WEIGHT_FRAMEWORK AND LITE_WITH_ARM
)
if
(
NOT LITE_ON_TINY_PUBLISH
)
...
...
lite/api/CMakeLists.txt
浏览文件 @
774b4652
...
...
@@ -148,36 +148,38 @@ if(WITH_TESTING)
--optimized_model=
${
LITE_MODEL_DIR
}
/lite_naive_model_opt SERIAL
)
add_dependencies
(
test_cxx_api extern_lite_download_lite_naive_model_tar_gz
)
if
(
NOT LITE_WITH_LIGHT_WEIGHT_FRAMEWORK
)
lite_cc_test
(
test_googlenet SRCS test_googlenet_lite.cc
DEPS mir_passes lite_api_test_helper paddle_api_full paddle_api_light gflags utils
${
ops
}
${
host_kernels
}
${
x86_kernels
}
ARGS --model_dir=
${
LITE_MODEL_DIR
}
/googlenet
)
add_dependencies
(
test_googlenet extern_lite_download_GoogleNet_inference_tar_gz
)
lite_cc_test
(
test_mobilenetv1_lite_x86 SRCS test_mobilenetv1_lite_x86.cc
DEPS mir_passes lite_api_test_helper paddle_api_full paddle_api_light gflags utils
${
ops
}
${
host_kernels
}
${
x86_kernels
}
ARGS --model_dir=
${
LITE_MODEL_DIR
}
/mobilenet_v1
)
add_dependencies
(
test_mobilenetv1_lite_x86 extern_lite_download_mobilenet_v1_tar_gz
)
lite_cc_test
(
test_mobilenetv2_lite_x86 SRCS test_mobilenetv2_lite_x86.cc
DEPS mir_passes lite_api_test_helper paddle_api_full paddle_api_light gflags utils
${
ops
}
${
host_kernels
}
${
x86_kernels
}
ARGS --model_dir=
${
LITE_MODEL_DIR
}
/mobilenet_v2_relu
)
add_dependencies
(
test_mobilenetv2_lite_x86 extern_lite_download_mobilenet_v2_relu_tar_gz
)
lite_cc_test
(
test_inceptionv4_lite_x86 SRCS test_inceptionv4_lite_x86.cc
DEPS mir_passes lite_api_test_helper paddle_api_full paddle_api_light gflags utils
${
ops
}
${
host_kernels
}
${
x86_kernels
}
ARGS --model_dir=
${
LITE_MODEL_DIR
}
/inception_v4_simple
)
add_dependencies
(
test_inceptionv4_lite_x86 extern_lite_download_inception_v4_simple_tar_gz
)
lite_cc_test
(
test_resnet50_lite_x86 SRCS test_resnet50_lite_x86.cc
DEPS mir_passes lite_api_test_helper paddle_api_full paddle_api_light gflags utils
${
ops
}
${
host_kernels
}
${
x86_kernels
}
ARGS --model_dir=
${
LITE_MODEL_DIR
}
/resnet50
)
add_dependencies
(
test_resnet50_lite_x86 extern_lite_download_resnet50_tar_gz
)
lite_cc_test
(
test_step_rnn_lite_x86 SRCS test_step_rnn_lite_x86.cc
DEPS mir_passes lite_api_test_helper paddle_api_full paddle_api_light gflags utils
${
ops
}
${
host_kernels
}
${
x86_kernels
}
ARGS --model_dir=
${
LITE_MODEL_DIR
}
/step_rnn
)
add_dependencies
(
test_step_rnn_lite_x86 extern_lite_download_step_rnn_tar_gz
)
if
(
LITE_WITH_X86
)
lite_cc_test
(
test_googlenet SRCS test_googlenet_lite.cc
DEPS mir_passes lite_api_test_helper paddle_api_full paddle_api_light gflags utils
${
ops
}
${
host_kernels
}
${
x86_kernels
}
ARGS --model_dir=
${
LITE_MODEL_DIR
}
/googlenet
)
add_dependencies
(
test_googlenet extern_lite_download_GoogleNet_inference_tar_gz
)
lite_cc_test
(
test_mobilenetv1_lite_x86 SRCS test_mobilenetv1_lite_x86.cc
DEPS mir_passes lite_api_test_helper paddle_api_full paddle_api_light gflags utils
${
ops
}
${
host_kernels
}
${
x86_kernels
}
ARGS --model_dir=
${
LITE_MODEL_DIR
}
/mobilenet_v1
)
add_dependencies
(
test_mobilenetv1_lite_x86 extern_lite_download_mobilenet_v1_tar_gz
)
lite_cc_test
(
test_mobilenetv2_lite_x86 SRCS test_mobilenetv2_lite_x86.cc
DEPS mir_passes lite_api_test_helper paddle_api_full paddle_api_light gflags utils
${
ops
}
${
host_kernels
}
${
x86_kernels
}
ARGS --model_dir=
${
LITE_MODEL_DIR
}
/mobilenet_v2_relu
)
add_dependencies
(
test_mobilenetv2_lite_x86 extern_lite_download_mobilenet_v2_relu_tar_gz
)
lite_cc_test
(
test_inceptionv4_lite_x86 SRCS test_inceptionv4_lite_x86.cc
DEPS mir_passes lite_api_test_helper paddle_api_full paddle_api_light gflags utils
${
ops
}
${
host_kernels
}
${
x86_kernels
}
ARGS --model_dir=
${
LITE_MODEL_DIR
}
/inception_v4_simple
)
add_dependencies
(
test_inceptionv4_lite_x86 extern_lite_download_inception_v4_simple_tar_gz
)
lite_cc_test
(
test_resnet50_lite_x86 SRCS test_resnet50_lite_x86.cc
DEPS mir_passes lite_api_test_helper paddle_api_full paddle_api_light gflags utils
${
ops
}
${
host_kernels
}
${
x86_kernels
}
ARGS --model_dir=
${
LITE_MODEL_DIR
}
/resnet50
)
add_dependencies
(
test_resnet50_lite_x86 extern_lite_download_resnet50_tar_gz
)
lite_cc_test
(
test_step_rnn_lite_x86 SRCS test_step_rnn_lite_x86.cc
DEPS mir_passes lite_api_test_helper paddle_api_full paddle_api_light gflags utils
${
ops
}
${
host_kernels
}
${
x86_kernels
}
ARGS --model_dir=
${
LITE_MODEL_DIR
}
/step_rnn
)
add_dependencies
(
test_step_rnn_lite_x86 extern_lite_download_step_rnn_tar_gz
)
endif
()
if
(
LITE_WITH_BM
)
lite_cc_test
(
test_resnet50_lite_bm SRCS test_resnet50_lite_bm.cc
DEPS mir_passes lite_api_test_helper paddle_api_full paddle_api_light gflags utils
...
...
lite/backends/cuda/math/CMakeLists.txt
浏览文件 @
774b4652
...
...
@@ -2,7 +2,7 @@ if(NOT LITE_WITH_CUDA)
return
()
endif
()
get_property
(
cuda_static_deps GLOBAL PROPERTY CUDA_
STATIC_
MODULES
)
get_property
(
cuda_static_deps GLOBAL PROPERTY CUDA_MODULES
)
nv_library
(
cuda_activation SRCS activation.cu DEPS
${
cuda_static_deps
}
)
nv_library
(
cuda_scale SRCS scale.cu DEPS
${
cuda_static_deps
}
)
...
...
lite/kernels/cuda/CMakeLists.txt
浏览文件 @
774b4652
...
...
@@ -42,7 +42,7 @@ add_kernel(search_seq_fc_compute_cuda CUDA extra SRCS search_seq_fc_compute.cu D
add_kernel
(
var_conv_2d_compute_cuda CUDA basic SRCS var_conv_2d_compute.cu DEPS
${
lite_kernel_deps
}
${
math_cuda
}
)
lite_cc_test
(
calib_compute_cuda_test SRCS calib_compute_cuda_test.cc DEPS calib_compute_cuda
)
nv_test
(
conv2d_cuda_test SRCS conv_compute_test.cc DEPS conv2d_cuda
)
#
nv_test(conv2d_cuda_test SRCS conv_compute_test.cc DEPS conv2d_cuda)
nv_test
(
nearest_interp_compute_cuda_test SRCS nearest_interp_compute_test.cc DEPS nearest_interp_compute_cuda
)
nv_test
(
leaky_relu_compute_cuda_test SRCS leaky_relu_compute_test.cc DEPS leaky_relu_compute_cuda
)
nv_test
(
relu_compute_cuda_test SRCS relu_compute_test.cc DEPS relu_compute_cuda
)
...
...
@@ -56,17 +56,17 @@ nv_test(softmax_compute_cuda_test SRCS softmax_compute_test.cc DEPS softmax_comp
nv_test
(
mul_compute_cuda_test SRCS mul_compute_test.cc DEPS mul_compute_cuda
)
nv_test
(
dropout_compute_cuda_test SRCS dropout_compute_test.cc DEPS dropout_compute_cuda
)
nv_test
(
bilinear_interp_compute_cuda_test SRCS bilinear_interp_compute_test.cc DEPS bilinear_interp_compute_cuda
)
nv_test
(
pool_compute_cuda_test SRCS pool_compute_test.cc DEPS pool_compute_cuda
)
#
nv_test(pool_compute_cuda_test SRCS pool_compute_test.cc DEPS pool_compute_cuda)
nv_test
(
sequence_reverse_compute_cuda_test SRCS sequence_reverse_compute_test.cc DEPS sequence_reverse_compute_cuda
)
nv_test
(
sequence_concat_compute_cuda_test SRCS sequence_concat_compute_test.cc DEPS sequence_concat_compute_cuda
)
nv_test
(
attention_padding_mask_compute_cuda_test SRCS attention_padding_mask_compute_test.cc DEPS attention_padding_mask_compute_cuda
)
#
nv_test(sequence_concat_compute_cuda_test SRCS sequence_concat_compute_test.cc DEPS sequence_concat_compute_cuda)
#
nv_test(attention_padding_mask_compute_cuda_test SRCS attention_padding_mask_compute_test.cc DEPS attention_padding_mask_compute_cuda)
nv_test
(
sequence_arithmetic_compute_cuda_test SRCS sequence_arithmetic_compute_test.cc DEPS sequence_arithmetic_compute_cuda
)
nv_test
(
search_fc
_test SRCS search_fc_compute_test.cc DEPS search_fc_compute_cuda sequence_topk_avg_pooling_compute_cuda
)
nv_test
(
var_conv_2d_compute_cuda_test SRCS var_conv_2d_compute_test.cc DEPS var_conv_2d_compute_cuda
)
#nv_test(search_fc_cuda
_test SRCS search_fc_compute_test.cc DEPS search_fc_compute_cuda sequence_topk_avg_pooling_compute_cuda)
#
nv_test(var_conv_2d_compute_cuda_test SRCS var_conv_2d_compute_test.cc DEPS var_conv_2d_compute_cuda)
if
(
LITE_BUILD_EXTRA
)
nv_test
(
search_seq_depadding_compute_cuda_test SRCS search_seq_depadding_compute_test.cc DEPS search_seq_depadding_compute_cuda
)
nv_test
(
match_matrix_tensor_compute_cuda_test SRCS match_matrix_tensor_compute_test.cc DEPS match_matrix_tensor_compute_cuda
)
#
nv_test(match_matrix_tensor_compute_cuda_test SRCS match_matrix_tensor_compute_test.cc DEPS match_matrix_tensor_compute_cuda)
nv_test
(
search_grnn_compute_cuda_test SRCS search_grnn_compute_test.cc DEPS search_grnn_compute_cuda
)
nv_test
(
sequence_pool_compute_cuda_test SRCS sequence_pool_compute_test.cc DEPS sequence_pool_compute_cuda
)
nv_test
(
lookup_table_compute_cuda_test SRCS lookup_table_compute_test.cc DEPS lookup_table_compute_cuda
)
...
...
lite/tools/ci_build.sh
浏览文件 @
774b4652
...
...
@@ -214,8 +214,7 @@ function cmake_x86_for_CI {
function
cmake_cuda_for_CI
{
prepare_workspace
# fake an empty __generated_code__.cc to pass cmake.
cmake ..
-DLITE_WITH_CUDA
=
ON
-DWITH_MKLDNN
=
OFF
-DLITE_WITH_X86
=
OFF
${
common_flags
}
-DLITE_WITH_PROFILE
=
ON
-DWITH_MKL
=
OFF
\
-DLITE_BUILD_EXTRA
=
ON
-DCUDNN_ROOT
=
${
CUDNN_ROOT
}
cmake ..
-DLITE_WITH_CUDA
=
ON
-DWITH_MKLDNN
=
OFF
-DLITE_WITH_X86
=
OFF
${
common_flags
}
-DLITE_WITH_PROFILE
=
OFF
-DWITH_MKL
=
OFF
-DLITE_BUILD_EXTRA
=
ON
-DCUDNN_ROOT
=
${
CUDNN_ROOT
}
-DWITH_LITE
=
OFF
}
function
cmake_gpu
{
...
...
@@ -289,7 +288,9 @@ function build_test_cuda_server {
cd
./build
export
LD_LIBRARY_PATH
=
"
$LD_LIBRARY_PATH
:
$PWD
/third_party/install/mklml/lib"
cmake_cuda_for_CI
build
make
-j
$NUM_CORES_FOR_COMPILE
# temporary remove cuda unittest because the ci PR_CI_Paddle-Lite-server-cuda10.1(ubt16-gcc5.4) is in cpu machine and only build.
# ctest -R "/*_cuda_test" -V
}
function
build_test_train
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录