CMakeLists.txt 2.4 KB
Newer Older
1
if(WITH_GPU)
2 3 4 5
  nv_test(
    test_phi_tensor
    SRCS test_pten_tensor.cc
    DEPS phi_tensor glog)
6
elseif(WITH_ROCM)
7 8 9 10
  hip_test(
    test_phi_tensor
    SRCS test_pten_tensor.cc
    DEPS phi_tensor glog)
11
else()
12 13 14 15
  cc_test(
    test_phi_tensor
    SRCS test_pten_tensor.cc
    DEPS phi_tensor glog)
16 17
endif()

18 19 20 21
cc_test(
  test_phi_exception
  SRCS test_pten_exception.cc
  DEPS gtest)
22

23
set(COMMON_API_TEST_DEPS phi_tensor phi_api phi_api_utils)
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 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 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
cc_test(
  test_mean_api
  SRCS test_mean_api.cc
  DEPS ${COMMON_API_TEST_DEPS})
cc_test(
  test_dot_api
  SRCS test_dot_api.cc
  DEPS ${COMMON_API_TEST_DEPS})
cc_test(
  test_matmul_api
  SRCS test_matmul_api.cc
  DEPS ${COMMON_API_TEST_DEPS})
cc_test(
  test_empty_api
  SRCS test_empty_api.cc
  DEPS ${COMMON_API_TEST_DEPS})
cc_test(
  test_fill_api
  SRCS test_fill_api.cc
  DEPS ${COMMON_API_TEST_DEPS} api_scalar)
cc_test(
  test_elementwise_api
  SRCS test_elementwise_api.cc
  DEPS ${COMMON_API_TEST_DEPS})
cc_test(
  test_embedding_api
  SRCS test_embedding_api.cc
  DEPS ${COMMON_API_TEST_DEPS})
cc_test(
  test_cast_api
  SRCS test_cast_api.cc
  DEPS ${COMMON_API_TEST_DEPS})
cc_test(
  test_reshape_api
  SRCS test_reshape_api.cc
  DEPS ${COMMON_API_TEST_DEPS})
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_sum_api
  SRCS test_sum_api.cc
  DEPS ${COMMON_API_TEST_DEPS})
cc_test(
  test_scale_api
  SRCS test_scale_api.cc
  DEPS ${COMMON_API_TEST_DEPS} api_scalar)
cc_test(
  test_scale_benchmark
  SRCS test_scale_benchmark.cc
  DEPS ${COMMON_API_TEST_DEPS})
cc_test(
  test_conj_api
  SRCS test_conj_api.cc
  DEPS ${COMMON_API_TEST_DEPS})
cc_test(
  test_concat_api
  SRCS test_concat_api.cc
  DEPS ${COMMON_API_TEST_DEPS})
cc_test(
  test_split_api
  SRCS test_split_api.cc
  DEPS ${COMMON_API_TEST_DEPS})
cc_test(
  test_data_transform
  SRCS test_data_transform.cc
  DEPS ${COMMON_API_TEST_DEPS})
cc_test(
  test_sparse_utils_api
  SRCS test_sparse_utils_api.cc
  DEPS ${COMMON_API_TEST_DEPS})
cc_test(
  test_sparse_conv_api
  SRCS test_sparse_conv_api.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})
Y
YuanRisheng 已提交
112 113 114 115
cc_test(
  test_add_n_api
  SRCS test_add_n_api.cc
  DEPS ${COMMON_API_TEST_DEPS})