CMakeLists.txt 796 字节
Newer Older
C
Chunwei 已提交
1 2 3 4 5 6
if (NOT LITE_WITH_OPENCL)
    return ()
endif()

set(cl_kernel_deps op_params_lite cl_caller cl_engine cl_context cl_wrapper)

Z
Zhen Wang 已提交
7 8
lite_cc_library(elementwise_add_opencl SRCS elementwise_add_compute.cc DEPS ${cl_kernel_deps})
lite_cc_library(pool_opencl SRCS pool_compute.cc DEPS ${cl_kernel_deps})
C
Chunwei 已提交
9 10 11 12

lite_cc_test(test_elementwise_add_opencl SRCS elementwise_add_compute_test.cc DEPS elementwise_add_opencl
  op_registry_lite program_lite
  context_lite
Z
Zhen Wang 已提交
13
  ARGS --cl_path=${CMAKE_SOURCE_DIR}/paddle/fluid/lite/opencl
C
Chunwei 已提交
14 15
  )

Z
ZhenWang 已提交
16 17 18
lite_cc_test(test_pool_opencl SRCS pool_compute_test.cc DEPS pool_opencl
  op_registry_lite program_lite
  context_lite
Z
Zhen Wang 已提交
19
  ARGS --cl_path=${CMAKE_SOURCE_DIR}/paddle/fluid/lite/opencl
Z
ZhenWang 已提交
20 21
  )

C
Chunwei 已提交
22 23
set(opencl_kernels
  elementwise_add_opencl
Z
ZhenWang 已提交
24 25
  pool_opencl
  CACHE INTERNAL "opencl_kernels")