Commit acbedb7d authored by Paul's avatar Paul
Browse files

Add cmake for onnx tests

parent a60bdb67
......@@ -78,18 +78,7 @@ endif()
# Onnx test
set(TEST_ONNX_DIR ${CMAKE_CURRENT_SOURCE_DIR}/onnx)
file(GLOB ONNX_TESTS ${TEST_ONNX_DIR}/*.cpp)
foreach(ONNX_TEST ${ONNX_TESTS})
get_filename_component(BASE_NAME ${ONNX_TEST} NAME_WE)
set(TEST_NAME test_${BASE_NAME})
add_executable(${TEST_NAME} ${ONNX_TEST})
rocm_clang_tidy_check(${TEST_NAME})
target_link_libraries(${TEST_NAME} migraphx_onnx migraphx_ref)
target_include_directories(${TEST_NAME} PUBLIC include)
add_test(NAME ${TEST_NAME} COMMAND $<TARGET_FILE:${TEST_NAME}> WORKING_DIRECTORY ${TEST_ONNX_DIR})
rocm_mark_as_test(${TEST_NAME})
endforeach()
add_subdirectory(onnx)
# tf test
set(TEST_TF_DIR ${CMAKE_CURRENT_SOURCE_DIR}/tf)
......
function(add_onnx_test TEST_NAME)
add_executable(${TEST_NAME} ${ARGN})
rocm_clang_tidy_check(${TEST_NAME})
target_link_libraries(${TEST_NAME} migraphx_onnx migraphx_ref)
target_include_directories(${TEST_NAME} PUBLIC ../include include)
add_test(NAME ${TEST_NAME} COMMAND $<TARGET_FILE:${TEST_NAME}> WORKING_DIRECTORY ${TEST_ONNX_DIR})
rocm_mark_as_test(${TEST_NAME})
endfunction()
file(GLOB ONNX_PARSE_TESTS CONFIGURE_DEPENDS parse/*.cpp)
add_onnx_test(test_onnx_test ${ONNX_PARSE_TESTS})
add_onnx_test(test_verify_onnx verify_onnx.cpp)
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