Commit 6dc0ef17 authored by Jaikrishnan Menon's avatar Jaikrishnan Menon

Merge remote-tracking branch 'origin/bob/shared_test' into jmenon/cpu

Conflicts:
	test/CMakeLists.txt
	test/execute.cpp
parents afe15127 44094488
......@@ -24,7 +24,6 @@ include_directories(
set (SRC
build_graph.cpp
eigen.cpp
execute.cpp
input_output_assign.cpp
main.cpp
op.cpp
......@@ -42,6 +41,14 @@ set (SRC
uuid.cpp
)
#================================================================================================
# To auto generate a suite of unit tests for a backend add a line like this
# set(BACKEND_NAMES ${BACKEND_NAMES} "BACKEND_NAME_GOES_HERE")
# and replace BACKEND_NAME_GOES_HERE with your backend name.
# The code for the unit test suite is in test/backend_test.in.cpp
#================================================================================================
set(BACKEND_NAMES ${BACKEND_NAMES} "NGVM")
if(MKLDNN_INCLUDE_DIR)
include_directories(SYSTEM ${MKLDNN_INCLUDE_DIR})
link_directories(${MKLDNN_LIB_DIR})
......@@ -50,9 +57,16 @@ endif()
if(LLVM_INCLUDE_DIR)
include_directories(SYSTEM ${LLVM_INCLUDE_DIR})
set(SRC ${SRC} codegen.cpp cpu.cpp)
set(SRC ${SRC} codegen.cpp)
set(BACKEND_NAMES ${BACKEND_NAMES} "CPU")
endif()
foreach(BACKEND_NAME ${BACKEND_NAMES})
configure_file(backend_test.in.cpp backend_test_${BACKEND_NAME}.cpp)
set(SRC ${SRC} ${CMAKE_CURRENT_BINARY_DIR}/backend_test_${BACKEND_NAME}.cpp)
message(STATUS "Adding unit test for backend ${BACKEND_NAME}")
endforeach()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DCURDIR=\\\"${CMAKE_CURRENT_SOURCE_DIR}\\\"")
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment