Skip to content

Commit

Permalink
[luci/test] Enable SVDF test with tolerance (Samsung#8359)
Browse files Browse the repository at this point in the history
This will introduce testing with tolerance and enable SVDF with it.

ONE-DCO-1.0-Signed-off-by: SaeHie Park <[email protected]>
  • Loading branch information
seanshpark authored Jan 28, 2022
1 parent 0068f61 commit 4c9870d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
16 changes: 16 additions & 0 deletions compiler/luci-value-test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
unset(LUCI_VALUE_TESTS)
unset(LUCI_VALUE_TESTS_TOL)

macro(addeval NAME)
list(APPEND LUCI_VALUE_TESTS ${NAME})
endmacro(addeval)

macro(addevaltol NAME RTOL ATOL)
list(APPEND LUCI_VALUE_TESTS_TOL ${NAME} ${RTOL} ${ATOL})
endmacro(addevaltol)

# Read "test.lst"
include("test.lst")
# Read "test.local.lst" if exists
Expand All @@ -22,3 +27,14 @@ add_test(NAME luci_value_test
"$<TARGET_FILE:luci_eval_driver>"
${LUCI_VALUE_TESTS}
)

if(DEFINED LUCI_VALUE_TESTS_TOL)
add_test(NAME luci_value_tol_test
COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/evalverifytol.sh"
"${CMAKE_CURRENT_BINARY_DIR}"
"${ARTIFACTS_BIN_PATH}"
"${NNCC_OVERLAY_DIR}/venv_2_6_0"
"$<TARGET_FILE:luci_eval_driver>"
${LUCI_VALUE_TESTS_TOL}
)
endif()
4 changes: 4 additions & 0 deletions compiler/luci-value-test/test.lst
Original file line number Diff line number Diff line change
Expand Up @@ -188,3 +188,7 @@ addeval(YUV_TO_RGB_U8_000)
# Simple Network test
addeval(Part_While_000)
addeval(Part_While_001)

# Tests with tolerance
addevaltol(SVDF_000 8e-3 8e-3)
#addevaltol(SVDF_001 8e-3 8e-3) TFlite fails with 'no bias' model

0 comments on commit 4c9870d

Please sign in to comment.