Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle-Lite
提交
0da40cd6
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看板
提交
0da40cd6
编写于
10月 22, 2019
作者:
J
juncaipeng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
support build cuda lib
上级
c74a68b7
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
116 addition
and
75 deletion
+116
-75
cmake/generic.cmake
cmake/generic.cmake
+4
-1
cmake/lite.cmake
cmake/lite.cmake
+1
-0
lite/CMakeLists.txt
lite/CMakeLists.txt
+0
-4
lite/api/CMakeLists.txt
lite/api/CMakeLists.txt
+31
-20
lite/tests/kernels/CMakeLists.txt
lite/tests/kernels/CMakeLists.txt
+50
-50
lite/tools/ci_build.sh
lite/tools/ci_build.sh
+30
-0
未找到文件。
cmake/generic.cmake
浏览文件 @
0da40cd6
...
...
@@ -490,6 +490,9 @@ function(nv_binary TARGET_NAME)
set
(
multiValueArgs SRCS DEPS
)
cmake_parse_arguments
(
nv_binary
"
${
options
}
"
"
${
oneValueArgs
}
"
"
${
multiValueArgs
}
"
${
ARGN
}
)
cuda_add_executable
(
${
TARGET_NAME
}
${
nv_binary_SRCS
}
)
target_link_libraries
(
${
TARGET_NAME
}
${
CUDNN_LIBRARY
}
${
CUBLAS_LIBRARIES
}
)
get_property
(
os_dependency_modules GLOBAL PROPERTY OS_DEPENDENCY_MODULES
)
target_link_libraries
(
${
TARGET_NAME
}
${
os_dependency_modules
}
)
if
(
nv_binary_DEPS
)
target_link_libraries
(
${
TARGET_NAME
}
${
nv_binary_DEPS
}
)
add_dependencies
(
${
TARGET_NAME
}
${
nv_binary_DEPS
}
)
...
...
@@ -507,7 +510,7 @@ function(nv_test TARGET_NAME)
cuda_add_executable
(
${
TARGET_NAME
}
${
nv_test_SRCS
}
)
get_property
(
os_dependency_modules GLOBAL PROPERTY OS_DEPENDENCY_MODULES
)
target_link_libraries
(
${
TARGET_NAME
}
${
nv_test_DEPS
}
lite_gtest_main gtest
gflags glog
${
os_dependency_modules
}
${
CUDNN_LIBRARY
}
${
CUBLAS_LIBRARIES
}
)
gflags glog
${
os_dependency_modules
}
${
CUDNN_LIBRARY
}
${
CUBLAS_LIBRARIES
}
)
add_dependencies
(
${
TARGET_NAME
}
${
nv_test_DEPS
}
lite_gtest_main gtest gflags glog
)
common_link
(
${
TARGET_NAME
}
)
add_test
(
${
TARGET_NAME
}
${
TARGET_NAME
}
)
...
...
cmake/lite.cmake
浏览文件 @
0da40cd6
...
...
@@ -234,6 +234,7 @@ endfunction()
set
(
arm_kernels CACHE INTERNAL
"arm kernels"
)
set
(
x86_kernels CACHE INTERNAL
"x86 kernels"
)
set
(
cuda_kernels CACHE INTERNAL
"cuda kernels"
)
set
(
fpga_kernels CACHE INTERNAL
"fpga kernels"
)
set
(
npu_kernels CACHE INTERNAL
"npu kernels"
)
set
(
opencl_kernels CACHE INTERNAL
"opencl kernels"
)
...
...
lite/CMakeLists.txt
浏览文件 @
0da40cd6
...
...
@@ -82,12 +82,10 @@ if (LITE_WITH_LIGHT_WEIGHT_FRAMEWORK AND LITE_WITH_ARM)
add_dependencies
(
publish_inference_cxx_lib bundle_full_api
)
add_dependencies
(
publish_inference_cxx_lib bundle_light_api
)
add_dependencies
(
publish_inference_cxx_lib test_model_bin
)
if
(
ARM_TARGET_OS STREQUAL
"android"
)
add_dependencies
(
publish_inference_cxx_lib paddle_full_api_shared
)
add_dependencies
(
publish_inference paddle_light_api_shared
)
add_custom_command
(
TARGET publish_inference_cxx_lib
COMMAND cp
${
CMAKE_BINARY_DIR
}
/lite/api/*.so
${
INFER_LITE_PUBLISH_ROOT
}
/cxx/lib
)
endif
()
add_dependencies
(
publish_inference publish_inference_cxx_lib
)
add_custom_command
(
TARGET publish_inference_cxx_lib POST_BUILD
COMMAND
${
CMAKE_STRIP
}
"--strip-debug"
${
INFER_LITE_PUBLISH_ROOT
}
/cxx/lib/*.a
)
...
...
@@ -103,7 +101,6 @@ if (LITE_WITH_LIGHT_WEIGHT_FRAMEWORK AND LITE_WITH_ARM)
add_dependencies
(
tiny_publish_lib bundle_light_api
)
add_dependencies
(
publish_inference tiny_publish_lib
)
else
()
if
(
ARM_TARGET_OS STREQUAL
"android"
)
add_custom_target
(
tiny_publish_cxx_lib
${
TARGET
}
COMMAND mkdir -p
"
${
INFER_LITE_PUBLISH_ROOT
}
/cxx"
COMMAND mkdir -p
"
${
INFER_LITE_PUBLISH_ROOT
}
/cxx/include"
...
...
@@ -113,7 +110,6 @@ if (LITE_WITH_LIGHT_WEIGHT_FRAMEWORK AND LITE_WITH_ARM)
)
add_dependencies
(
tiny_publish_cxx_lib paddle_light_api_shared
)
add_dependencies
(
publish_inference tiny_publish_cxx_lib
)
endif
()
endif
()
endif
()
...
...
lite/api/CMakeLists.txt
浏览文件 @
0da40cd6
...
...
@@ -9,13 +9,15 @@ if (LITE_ON_TINY_PUBLISH)
set
(
CMAKE_C_FLAGS_RELEASE
"-Os -DNDEBUG"
)
endif
()
set
(
light_lib_DEPS light_api paddle_api paddle_api_light optimizer
)
if
((
NOT LITE_ON_TINY_PUBLISH
)
AND
(
ARM_TARGET_OS STREQUAL
"android"
))
#if ((NOT LITE_ON_TINY_PUBLISH) AND (ARM_TARGET_OS STREQUAL "android"))
if
(
NOT LITE_ON_TINY_PUBLISH
)
#full api dynamic library
add_library
(
paddle_full_api_shared SHARED
""
)
target_sources
(
paddle_full_api_shared PUBLIC
${
__lite_cc_files
}
paddle_api.cc light_api.cc cxx_api.cc cxx_api_impl.cc light_api_impl.cc
)
add_dependencies
(
paddle_full_api_shared op_list_h kernel_list_h framework_proto
)
target_link_libraries
(
paddle_full_api_shared framework_proto
)
add_dependencies
(
paddle_full_api_shared op_list_h kernel_list_h framework_proto xxhash
)
target_link_libraries
(
paddle_full_api_shared framework_proto xxhash
${
math_cuda
}
)
# ${cuda_kernels})
target_link_libraries
(
paddle_full_api_shared
"-Wl,--whole-archive"
${
cuda_kernels
}
"-Wl,--no-whole-archive"
)
add_dependencies
(
lite_compile_deps paddle_full_api_shared
)
#light api dynamic library
lite_cc_library
(
paddle_light_api_shared MODULE
SRCS light_api_shared.cc
...
...
@@ -23,11 +25,11 @@ if ((NOT LITE_ON_TINY_PUBLISH) AND (ARM_TARGET_OS STREQUAL "android"))
ARM_DEPS
${
arm_kernels
}
NPU_DEPS
${
npu_kernels
}
)
target_link_libraries
(
paddle_light_api_shared
${
light_lib_DEPS
}
${
arm_kernels
}
${
npu_kernels
}
)
else
()
if
(
ARM_TARGET_OS STREQUAL
"android"
)
#
if (ARM_TARGET_OS STREQUAL "android")
add_library
(
paddle_light_api_shared SHARED
""
)
target_sources
(
paddle_light_api_shared PUBLIC
${
__lite_cc_files
}
paddle_api.cc light_api.cc light_api_impl.cc
)
add_dependencies
(
paddle_light_api_shared op_list_h kernel_list_h
)
endif
()
#
endif()
endif
()
if
(
WITH_TESTING
)
...
...
@@ -44,6 +46,7 @@ endif()
message
(
STATUS
"get ops
${
ops
}
"
)
message
(
STATUS
"get X86 kernels
${
x86_kernels
}
"
)
message
(
STATUS
"get CUDA kernels
${
cuda_kernels
}
"
)
message
(
STATUS
"get Host kernels
${
host_kernels
}
"
)
message
(
STATUS
"get ARM kernels
${
arm_kernels
}
"
)
message
(
STATUS
"get NPU kernels
${
npu_kernels
}
"
)
...
...
@@ -245,20 +248,28 @@ endif()
# Some bins
if
(
NOT IOS
)
lite_cc_binary
(
test_model_bin SRCS model_test.cc DEPS paddle_api_full paddle_api_light gflags utils
${
ops
}
${
host_kernels
}
ARM_DEPS
${
arm_kernels
}
NPU_DEPS
${
npu_kernels
}
CL_DEPS
${
opencl_kernels
}
FPGA_DEPS
${
fpga_kernels
}
X86_DEPS
${
x86_kernels
}
)
lite_cc_binary
(
benchmark_bin SRCS benchmark.cc DEPS paddle_api_full paddle_api_light gflags utils
${
ops
}
${
host_kernels
}
ARM_DEPS
${
arm_kernels
}
NPU_DEPS
${
npu_kernels
}
CL_DEPS
${
opencl_kernels
}
FPGA_DEPS
${
fpga_kernels
}
X86_DEPS
${
x86_kernels
}
)
if
(
LITE_WITH_CUDA
)
nv_binary
(
test_model_bin SRCS model_test.cc DEPS paddle_api_full paddle_api_light gflags utils
${
ops
}
${
host_kernels
}
${
cuda_kernels
}
)
nv_binary
(
benchmark_bin SRCS benchmark.cc DEPS paddle_api_full paddle_api_light gflags utils
${
ops
}
${
host_kernels
}
${
cuda_kernels
}
)
else
()
lite_cc_binary
(
test_model_bin SRCS model_test.cc DEPS paddle_api_full paddle_api_light gflags utils
${
ops
}
${
host_kernels
}
ARM_DEPS
${
arm_kernels
}
NPU_DEPS
${
npu_kernels
}
CL_DEPS
${
opencl_kernels
}
FPGA_DEPS
${
fpga_kernels
}
X86_DEPS
${
x86_kernels
}
)
lite_cc_binary
(
benchmark_bin SRCS benchmark.cc DEPS paddle_api_full paddle_api_light gflags utils
${
ops
}
${
host_kernels
}
ARM_DEPS
${
arm_kernels
}
NPU_DEPS
${
npu_kernels
}
CL_DEPS
${
opencl_kernels
}
FPGA_DEPS
${
fpga_kernels
}
X86_DEPS
${
x86_kernels
}
)
endif
(
LITE_WITH_CUDA
)
endif
()
#lite_cc_binary(cxx_api_bin SRCS cxx_api_bin.cc
...
...
lite/tests/kernels/CMakeLists.txt
浏览文件 @
0da40cd6
if
((
NOT LITE_WITH_OPENCL AND NOT LITE_WITH_FPGA
)
AND
(
LITE_WITH_X86 OR LITE_WITH_ARM
))
lite_cc_test
(
test_kernel_scale_compute SRCS scale_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
)
lite_cc_test
(
test_kernel_power_compute SRCS power_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
)
lite_cc_test
(
test_kernel_shuffle_channel_compute SRCS shuffle_channel_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
)
lite_cc_test
(
test_kernel_yolo_box_compute SRCS yolo_box_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
)
lite_cc_test
(
test_fc SRCS fc_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
)
lite_cc_test
(
test_kernel_elementwise_compute SRCS elementwise_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
)
lite_cc_test
(
test_kernel_lrn_compute SRCS lrn_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
)
lite_cc_test
(
test_kernel_decode_bboxes_compute SRCS decode_bboxes_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
)
lite_cc_test
(
test_kernel_box_coder_compute SRCS box_coder_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
)
lite_cc_test
(
test_kernel_activation_compute SRCS activation_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
)
lite_cc_test
(
test_kernel_argmax_compute SRCS argmax_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
)
lite_cc_test
(
test_kernel_axpy_compute SRCS axpy_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
)
lite_cc_test
(
test_kernel_conv2d_transpose_compute SRCS conv2d_transpose_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
)
lite_cc_test
(
test_kernel_norm_compute SRCS norm_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
)
lite_cc_test
(
test_kernel_cast_compute SRCS cast_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
)
lite_cc_test
(
test_kernel_assign_compute SRCS assign_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
)
lite_cc_test
(
test_kernel_assign_value_compute SRCS assign_value_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
)
#lite_cc_test(test_kernel_sequence_softmax_compute SRCS sequence_softmax_compute_test.cc DEPS arena_framework ${x86_kernels} ${arm_kernels} ${lite_ops} ${host_kernels})
#lite_cc_test(test_kernel_im2sequence_compute SRCS im2sequence_compute_test.cc DEPS arena_framework ${x86_kernels} ${arm_kernels} ${lite_ops} ${host_kernels})
#lite_cc_test(test_kernel_compare_compute SRCS compare_compute_test.cc DEPS arena_framework ${x86_kernels} ${arm_kernels} ${lite_ops} ${host_kernels})
#lite_cc_test(test_kernel_logical_xor_compute SRCS logical_compute_test.cc DEPS arena_framework ${x86_kernels} ${arm_kernels} ${lite_ops} ${host_kernels})
#lite_cc_test(test_kernel_topk_compute SRCS topk_compute_test.cc DEPS arena_framework ${x86_kernels} ${arm_kernels} ${lite_ops} ${host_kernels})
#lite_cc_test(test_kernel_increment_compute SRCS increment_compute_test.cc DEPS arena_framework ${x86_kernels} ${arm_kernels} ${lite_ops} ${host_kernels})
#lite_cc_test(test_kernel_write_to_array_compute SRCS write_to_array_compute_test.cc DEPS arena_framework ${x86_kernels} ${arm_kernels} ${lite_ops} ${host_kernels})
#lite_cc_test(test_kernel_read_from_array_compute SRCS read_from_array_compute_test.cc DEPS arena_framework ${x86_kernels} ${arm_kernels} ${lite_ops} ${host_kernels})
lite_cc_test
(
test_kernel_box_clip_compute SRCS box_clip_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
)
if
((
NOT LITE_WITH_OPENCL AND NOT LITE_WITH_FPGA
)
AND
(
LITE_WITH_
CUDA OR LITE_WITH_
X86 OR LITE_WITH_ARM
))
lite_cc_test
(
test_kernel_scale_compute SRCS scale_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
${
cuda_kernels
}
)
lite_cc_test
(
test_kernel_power_compute SRCS power_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
${
cuda_kernels
}
)
lite_cc_test
(
test_kernel_shuffle_channel_compute SRCS shuffle_channel_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
${
cuda_kernels
}
)
lite_cc_test
(
test_kernel_yolo_box_compute SRCS yolo_box_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
${
cuda_kernels
}
)
lite_cc_test
(
test_fc SRCS fc_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
${
cuda_kernels
}
)
lite_cc_test
(
test_kernel_elementwise_compute SRCS elementwise_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
${
cuda_kernels
}
)
lite_cc_test
(
test_kernel_lrn_compute SRCS lrn_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
${
cuda_kernels
}
)
lite_cc_test
(
test_kernel_decode_bboxes_compute SRCS decode_bboxes_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
${
cuda_kernels
}
)
lite_cc_test
(
test_kernel_box_coder_compute SRCS box_coder_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
${
cuda_kernels
}
)
lite_cc_test
(
test_kernel_activation_compute SRCS activation_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
${
cuda_kernels
}
)
lite_cc_test
(
test_kernel_argmax_compute SRCS argmax_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
${
cuda_kernels
}
)
lite_cc_test
(
test_kernel_axpy_compute SRCS axpy_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
${
cuda_kernels
}
)
lite_cc_test
(
test_kernel_conv2d_transpose_compute SRCS conv2d_transpose_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
${
cuda_kernels
}
)
lite_cc_test
(
test_kernel_norm_compute SRCS norm_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
${
cuda_kernels
}
)
lite_cc_test
(
test_kernel_cast_compute SRCS cast_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
${
cuda_kernels
}
)
lite_cc_test
(
test_kernel_assign_compute SRCS assign_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
${
cuda_kernels
}
)
lite_cc_test
(
test_kernel_assign_value_compute SRCS assign_value_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
${
cuda_kernels
}
)
#lite_cc_test(test_kernel_sequence_softmax_compute SRCS sequence_softmax_compute_test.cc DEPS arena_framework ${x86_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}
${cuda_kernels}
)
#lite_cc_test(test_kernel_im2sequence_compute SRCS im2sequence_compute_test.cc DEPS arena_framework ${x86_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}
${cuda_kernels}
)
#lite_cc_test(test_kernel_compare_compute SRCS compare_compute_test.cc DEPS arena_framework ${x86_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}
${cuda_kernels}
)
#lite_cc_test(test_kernel_logical_xor_compute SRCS logical_compute_test.cc DEPS arena_framework ${x86_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}
${cuda_kernels}
)
#lite_cc_test(test_kernel_topk_compute SRCS topk_compute_test.cc DEPS arena_framework ${x86_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}
${cuda_kernels}
)
#lite_cc_test(test_kernel_increment_compute SRCS increment_compute_test.cc DEPS arena_framework ${x86_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}
${cuda_kernels}
)
#lite_cc_test(test_kernel_write_to_array_compute SRCS write_to_array_compute_test.cc DEPS arena_framework ${x86_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}
${cuda_kernels}
)
#lite_cc_test(test_kernel_read_from_array_compute SRCS read_from_array_compute_test.cc DEPS arena_framework ${x86_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}
${cuda_kernels}
)
lite_cc_test
(
test_kernel_box_clip_compute SRCS box_clip_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
${
cuda_kernels
}
)
if
(
LITE_BUILD_EXTRA
)
lite_cc_test
(
test_gru_unit SRCS gru_unit_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
)
lite_cc_test
(
test_kernel_sequence_pool_compute SRCS sequence_pool_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
)
lite_cc_test
(
test_kernel_reduce_max_compute SRCS reduce_max_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
)
lite_cc_test
(
test_gru_unit SRCS gru_unit_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
${
cuda_kernels
}
)
lite_cc_test
(
test_kernel_sequence_pool_compute SRCS sequence_pool_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
${
cuda_kernels
}
)
lite_cc_test
(
test_kernel_reduce_max_compute SRCS reduce_max_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
${
cuda_kernels
}
)
endif
()
lite_cc_test
(
test_kernel_pad2d_compute SRCS pad2d_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
)
lite_cc_test
(
test_kernel_prior_box_compute SRCS prior_box_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
)
lite_cc_test
(
test_kernel_negative_compute SRCS negative_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
)
lite_cc_test
(
test_kernel_bilinear_interp_compute SRCS bilinear_interp_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
)
lite_cc_test
(
test_kernel_nearest_interp_compute SRCS nearest_interp_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
)
lite_cc_test
(
test_kernel_shape_compute SRCS shape_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
)
lite_cc_test
(
test_kernel_crop_compute SRCS crop_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
)
lite_cc_test
(
test_kernel_sequence_expand_compute SRCS sequence_expand_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
)
lite_cc_test
(
test_kernel_squeeze_compute SRCS squeeze_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
)
lite_cc_test
(
test_kernel_unsqueeze_compute SRCS unsqueeze_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
)
lite_cc_test
(
test_kernel_slice_compute SRCS slice_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
)
lite_cc_test
(
test_kernel_expand_compute SRCS expand_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
)
lite_cc_test
(
test_kernel_matmul_compute SRCS matmul_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
)
lite_cc_test
(
test_kernel_reduce_mean_compute SRCS reduce_mean_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
)
lite_cc_test
(
test_kernel_stack_compute SRCS stack_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
)
lite_cc_test
(
test_kernel_range_compute SRCS range_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
)
lite_cc_test
(
test_kernel_affine_channel_compute SRCS affine_channel_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
)
lite_cc_test
(
test_kernel_anchor_generator_compute SRCS anchor_generator_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
)
#lite_cc_test(test_kernel_generate_proposals_compute SRCS generate_proposals_compute_test.cc DEPS arena_framework ${x86_kernels} ${arm_kernels} ${lite_ops} ${host_kernels})
#lite_cc_test(test_kernel_roi_align_compute SRCS roi_align_compute_test.cc DEPS arena_framework ${x86_kernels} ${arm_kernels} ${lite_ops} ${host_kernels})
lite_cc_test
(
test_kernel_pad2d_compute SRCS pad2d_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
${
cuda_kernels
}
)
lite_cc_test
(
test_kernel_prior_box_compute SRCS prior_box_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
${
cuda_kernels
}
)
lite_cc_test
(
test_kernel_negative_compute SRCS negative_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
${
cuda_kernels
}
)
lite_cc_test
(
test_kernel_bilinear_interp_compute SRCS bilinear_interp_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
${
cuda_kernels
}
)
lite_cc_test
(
test_kernel_nearest_interp_compute SRCS nearest_interp_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
${
cuda_kernels
}
)
lite_cc_test
(
test_kernel_shape_compute SRCS shape_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
${
cuda_kernels
}
)
lite_cc_test
(
test_kernel_crop_compute SRCS crop_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
${
cuda_kernels
}
)
lite_cc_test
(
test_kernel_sequence_expand_compute SRCS sequence_expand_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
${
cuda_kernels
}
)
lite_cc_test
(
test_kernel_squeeze_compute SRCS squeeze_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
${
cuda_kernels
}
)
lite_cc_test
(
test_kernel_unsqueeze_compute SRCS unsqueeze_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
${
cuda_kernels
}
)
lite_cc_test
(
test_kernel_slice_compute SRCS slice_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
${
cuda_kernels
}
)
lite_cc_test
(
test_kernel_expand_compute SRCS expand_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
${
cuda_kernels
}
)
lite_cc_test
(
test_kernel_matmul_compute SRCS matmul_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
${
cuda_kernels
}
)
lite_cc_test
(
test_kernel_reduce_mean_compute SRCS reduce_mean_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
${
cuda_kernels
}
)
lite_cc_test
(
test_kernel_stack_compute SRCS stack_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
${
cuda_kernels
}
)
lite_cc_test
(
test_kernel_range_compute SRCS range_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
${
cuda_kernels
}
)
lite_cc_test
(
test_kernel_affine_channel_compute SRCS affine_channel_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
${
cuda_kernels
}
)
lite_cc_test
(
test_kernel_anchor_generator_compute SRCS anchor_generator_compute_test.cc DEPS arena_framework
${
x86_kernels
}
${
arm_kernels
}
${
lite_ops
}
${
host_kernels
}
${
cuda_kernels
}
)
#lite_cc_test(test_kernel_generate_proposals_compute SRCS generate_proposals_compute_test.cc DEPS arena_framework ${x86_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}
${cuda_kernels}
)
#lite_cc_test(test_kernel_roi_align_compute SRCS roi_align_compute_test.cc DEPS arena_framework ${x86_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}
${cuda_kernels}
)
endif
()
lite/tools/ci_build.sh
浏览文件 @
0da40cd6
...
...
@@ -162,6 +162,20 @@ function cmake_x86_for_CI {
# make test_generated_code -j$NUM_CORES_FOR_COMPILE
}
# This method is only called in CI.
function
cmake_nv_for_CI
{
prepare_workspace
# fake an empty __generated_code__.cc to pass cmake.
cmake ..
-DCMAKE_BUILD_TYPE
=
RelWithDebInfo
-DWITH_MKL
=
OFF
-DLITE_WITH_CUDA
=
ON
-DWITH_MKLDNN
=
OFF
-DLITE_WITH_X86
=
OFF
\
-DWITH_LITE
=
ON
-DWITH_PYTHON
=
OFF
-DWITH_TESTING
=
OFF
-DLITE_WITH_ARM
=
OFF
# Compile and execute the gen_code related test, so it will generate some code, and make the compilation reasonable.
# make test_gen_code -j$NUM_CORES_FOR_COMPILE
# make test_cxx_api -j$NUM_CORES_FOR_COMPILE
# ctest -R test_cxx_api
# ctest -R test_gen_code
# make test_generated_code -j$NUM_CORES_FOR_COMPILE
}
function
cmake_gpu
{
prepare_workspace
cmake ..
" -DWITH_GPU=ON {common_flags} -DLITE_WITH_GPU=ON"
...
...
@@ -227,6 +241,18 @@ function build_test_server {
test_model_optimize_tool_compile
}
# Build the code and run lite server tests. This is executed in the CI system.
function
build_test_server_nv
{
mkdir
-p
./build_nv
cd
./build_nv
export
LD_LIBRARY_PATH
=
"
$LD_LIBRARY_PATH
:
$PWD
/third_party/install/mklml/lib"
cmake_nv_for_CI
build
#test_server
#test_model_optimize_tool_compile
}
function
build_test_train
{
mkdir
-p
./build
cd
./build
...
...
@@ -890,6 +916,10 @@ function main {
build_test_server
shift
;;
build_test_server_nv
)
build_test_server_nv
shift
;;
build_test_train
)
build_test_train
shift
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录