336f0b506e
better deadlock detection to also track wait/sync
49 lines
1.7 KiB
CMake
49 lines
1.7 KiB
CMake
add_custom_target(pim-unittest)
|
|
set_target_properties(pim-unittest PROPERTIES FOLDER "Tests")
|
|
|
|
add_custom_target(check-pim-unittest
|
|
COMMENT "Running the PIM unit tests"
|
|
COMMAND "${CMAKE_CTEST_COMMAND}" -L pim-unittest --output-on-failure -C $<CONFIG> --force-new-ctest-process
|
|
USES_TERMINAL
|
|
DEPENDS pim-unittest
|
|
)
|
|
set_target_properties(check-pim-unittest PROPERTIES FOLDER "Tests")
|
|
set_target_properties(check-pim-unittest PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD ON)
|
|
|
|
function(add_pim_unittest test_name)
|
|
add_onnx_mlir_executable(${test_name} NO_INSTALL ${ARGN})
|
|
|
|
add_dependencies(pim-unittest ${test_name})
|
|
get_target_property(test_suite_folder pim-unittest FOLDER)
|
|
if (test_suite_folder)
|
|
set_property(TARGET ${test_name} PROPERTY FOLDER "${test_suite_folder}")
|
|
endif ()
|
|
|
|
add_test(NAME ${test_name} COMMAND ${test_name} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
|
set_tests_properties(${test_name} PROPERTIES LABELS pim-unittest)
|
|
endfunction()
|
|
|
|
add_pim_unittest(PimMemoryLivenessPlannerTest
|
|
PimMemoryLivenessPlannerTest.cpp
|
|
|
|
LINK_LIBS PRIVATE
|
|
OMPimCompilerUtils
|
|
)
|
|
|
|
add_pim_unittest(SpatialSchedulingTargetTest
|
|
SpatialSchedulingTargetTest.cpp
|
|
|
|
LINK_LIBS PRIVATE
|
|
OMPimCompilerUtils
|
|
)
|
|
|
|
add_test(
|
|
NAME PimHostReuseSynchronizationTest
|
|
COMMAND "${PYTHON_EXECUTABLE}"
|
|
"${CMAKE_SOURCE_DIR}/validation/tools/pim/pimcomp/compare/test_PIMCOMP_adversarial_memory_sync.py"
|
|
--compiler "$<TARGET_FILE:onnx-mlir>"
|
|
--simple-model "${CMAKE_SOURCE_DIR}/validation/operations/relu/after_conv/relu_after_conv.onnx"
|
|
--grouped-model "${CMAKE_SOURCE_DIR}/validation/operations/conv/relu_conv_store/conv_relu_conv_store.onnx"
|
|
)
|
|
set_tests_properties(PimHostReuseSynchronizationTest PROPERTIES LABELS pim-unittest)
|