CMakeLists.txt 1.4 KB
Newer Older
1 2
set(COMMON_API_TEST_DEPS phi_tensor phi_api phi_api_utils)

3
if(WITH_GPU)
4 5
  nv_test(
    test_phi_tensor
6
    SRCS test_phi_tensor.cc
7
    DEPS glog selected_rows ${COMMON_API_TEST_DEPS})
8 9 10 11
  nv_test(
    test_allocator
    SRCS test_allocator.cu
    DEPS memory place device_context context_pool)
12 13 14 15
  nv_test(
    test_cuda_stream
    SRCS test_cuda_stream.cu
    DEPS context_pool)
16
elseif(WITH_ROCM)
17 18
  hip_test(
    test_phi_tensor
19
    SRCS test_phi_tensor.cc
20
    DEPS glog selected_rows ${COMMON_API_TEST_DEPS})
21 22 23 24
  hip_test(
    test_allocator
    SRCS test_allocator.cu
    DEPS memory place device_context context_pool)
25 26 27 28
  hip_test(
    test_cuda_stream
    SRCS test_cuda_stream.cu
    DEPS context_pool)
29
else()
30 31
  cc_test(
    test_phi_tensor
32
    SRCS test_phi_tensor.cc
33
    DEPS glog selected_rows ${COMMON_API_TEST_DEPS})
34 35
endif()

36 37
cc_test(
  test_phi_exception
38
  SRCS test_phi_exception.cc
39
  DEPS gtest)
40

41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
cc_test(
  test_to_api
  SRCS test_to_api.cc
  DEPS ${COMMON_API_TEST_DEPS})
cc_test(
  test_slice_api
  SRCS test_slice_api.cc
  DEPS ${COMMON_API_TEST_DEPS})
cc_test(
  test_scale_benchmark
  SRCS test_scale_benchmark.cc
  DEPS ${COMMON_API_TEST_DEPS})
cc_test(
  test_data_transform
  SRCS test_data_transform.cc
  DEPS ${COMMON_API_TEST_DEPS})
cc_test(
  test_strings_empty_api
  SRCS test_strings_empty_api.cc
  DEPS ${COMMON_API_TEST_DEPS})
cc_test(
  test_strings_lower_upper_api
  SRCS test_strings_lower_upper_api.cc
  DEPS ${COMMON_API_TEST_DEPS})