CMakeLists.txt 1.4 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
if(WITH_TESTING)
  cc_test_old(
    cinn_launch_context_test
    SRCS
    cinn_launch_context_test.cc
    DEPS
    phi
    lod_tensor
    scope
    proto_desc
    graph
    cinn_launch_context
    cinn_instruction_run_op
    cinn)
  target_link_libraries(cinn_launch_context_test ${PYTHON_LIBRARIES})
  set_tests_properties(cinn_launch_context_test PROPERTIES LABELS
                                                           "RUN_TYPE=CINN")
18

19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
  set(CINN_RUN_ENVIRONMENT
      "OMP_NUM_THREADS=1;runtime_include_dir=${PADDLE_BINARY_DIR}/third_party/CINN/src/external_cinn/cinn/runtime/cuda"
  )
  # cc_test_old(
  #   cinn_launch_op_test
  #   SRCS
  #   cinn_launch_op_test.cc
  #   DEPS
  #   cinn_compiler
  #   cinn_launch_op
  #   cinn_instruction_run_op
  #   elementwise_add_op
  #   gflags)
  # set_tests_properties(
  #   cinn_launch_op_test PROPERTIES LABELS "RUN_TYPE=CINN" ENVIRONMENT
  #                                  "${CINN_RUN_ENVIRONMENT}")
35

36 37 38 39 40 41 42 43 44 45 46 47 48 49
  cc_test_old(
    cinn_instruction_run_op_test
    SRCS
    cinn_instruction_run_op_test.cc
    DEPS
    cinn_compiler
    cinn_launch_op
    cinn_instruction_run_op
    elementwise_add_op)
  target_link_libraries(cinn_instruction_run_op_test ${PYTHON_LIBRARIES})
  set_tests_properties(
    cinn_instruction_run_op_test PROPERTIES LABELS "RUN_TYPE=CINN" ENVIRONMENT
                                            "${CINN_RUN_ENVIRONMENT}")
endif()