add_subdirectory(tflite_benchmark)
add_subdirectory(tflite_examples)
add_subdirectory(nnapi_test)
-add_subdirectory(nnapi_unittests)
+add_subdirectory(nnapi_quickcheck)
--- /dev/null
+file(GLOB_RECURSE NNAPI_QUICKCHECK_LIB_SOURCES "lib/*.cpp")
+file(GLOB_RECURSE NNAPI_QUICKCHECK_LIB_TESTS "lib/*.test.cpp")
+list(REMOVE_ITEM NNAPI_QUICKCHECK_LIB_SOURCES ${NNAPI_QUICKCHECK_LIB_TESTS})
+
+add_library(nnapi_quickcheck_common ${NNAPI_QUICKCHECK_LIB_SOURCES})
+target_include_directories(nnapi_quickcheck_common PUBLIC "inc")
+target_link_libraries(nnapi_quickcheck_common nnfw_util)
+target_link_libraries(nnapi_quickcheck_common nnfw_support_tflite)
+
+add_executable(nnapi_quickcheck_lib_env_test "lib/env.test.cpp")
+target_link_libraries(nnapi_quickcheck_lib_env_test nnapi_quickcheck_common)
+
+function(add_nnapi_quickcheck NAME)
+ add_executable(nnapi_quickcheck_${NAME} "tests/${NAME}.cpp")
+ add_dependencies(nnapi_quickcheck_${NAME} googletest)
+ target_link_libraries(nnapi_quickcheck_${NAME} libgtest.a libgtest_main.a pthread)
+ target_link_libraries(nnapi_quickcheck_${NAME} nnapi_quickcheck_common)
+endfunction(add_nnapi_quickcheck)
+
+add_nnapi_quickcheck(add_1)
+add_nnapi_quickcheck(add_2)
+add_nnapi_quickcheck(add_3)
+add_nnapi_quickcheck(add_4)
+add_nnapi_quickcheck(add_5)
+add_nnapi_quickcheck(add_6)
+add_nnapi_quickcheck(add_7)
+add_nnapi_quickcheck(add_8)
+add_nnapi_quickcheck(add_9)
+add_nnapi_quickcheck(add_quan_1)
+add_nnapi_quickcheck(div_1)
+add_nnapi_quickcheck(div_2)
+add_nnapi_quickcheck(sub_1)
+add_nnapi_quickcheck(sub_2)
+add_nnapi_quickcheck(sub_3)
+add_nnapi_quickcheck(sub_4)
+add_nnapi_quickcheck(sub_5)
+add_nnapi_quickcheck(sub_6)
+add_nnapi_quickcheck(mul_1)
+add_nnapi_quickcheck(mul_2)
+add_nnapi_quickcheck(mul_quan_1)
+add_nnapi_quickcheck(relu_1)
+add_nnapi_quickcheck(relu_quan_1)
+add_nnapi_quickcheck(relu_2)
+add_nnapi_quickcheck(relu_3)
+add_nnapi_quickcheck(relu6_1)
+add_nnapi_quickcheck(relu6_quan_1)
+add_nnapi_quickcheck(relu1_1)
+add_nnapi_quickcheck(conv_1)
+add_nnapi_quickcheck(conv_quan_1)
+add_nnapi_quickcheck(dconv_1)
+add_nnapi_quickcheck(dconv_quan_1)
+add_nnapi_quickcheck(max_pool_1)
+add_nnapi_quickcheck(max_pool_quan_1)
+add_nnapi_quickcheck(avg_pool_1)
+add_nnapi_quickcheck(avg_pool_quan_1)
+add_nnapi_quickcheck(concat_1)
+add_nnapi_quickcheck(concat_quan_1)
+add_nnapi_quickcheck(reshape_1)
+add_nnapi_quickcheck(reshape_quan_1)
+add_nnapi_quickcheck(fully_connected_1)
+add_nnapi_quickcheck(fully_connected_quan_1)
+add_nnapi_quickcheck(softmax_1)
+add_nnapi_quickcheck(softmax_2)
+add_nnapi_quickcheck(softmax_quan_1)
+add_nnapi_quickcheck(resize_bilinear_1)
+add_nnapi_quickcheck(topk_v2_1)
+add_nnapi_quickcheck(cast_1)
+add_nnapi_quickcheck(cast_q_to_f_1)
+add_nnapi_quickcheck(cast_2)
+add_nnapi_quickcheck(gather_1)
+add_nnapi_quickcheck(gather_2)
+add_nnapi_quickcheck(dequantize_1)
+add_nnapi_quickcheck(tanh_1)
using namespace tflite;
using namespace tflite::ops::builtin;
-TEST(NNAPI_Unittest_add_1, simple_test)
+TEST(NNAPI_Quickcheck_add_1, simple_test)
{
int verbose = 0;
int tolerance = 1;
using namespace tflite;
using namespace tflite::ops::builtin;
-TEST(NNAPI_Unittest_add_2, simple_test)
+TEST(NNAPI_Quickcheck_add_2, simple_test)
{
int verbose = 0;
int tolerance = 1;
using namespace tflite;
using namespace tflite::ops::builtin;
-TEST(NNAPI_Unittest_add_3, simple_test)
+TEST(NNAPI_Quickcheck_add_3, simple_test)
{
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
using namespace tflite;
using namespace tflite::ops::builtin;
-TEST(NNAPI_Unittest_add_4, simple_test)
+TEST(NNAPI_Quickcheck_add_4, simple_test)
{
int verbose = 0;
int tolerance = 1;
using namespace tflite;
using namespace tflite::ops::builtin;
-TEST(NNAPI_Unittest_add_5, simple_test)
+TEST(NNAPI_Quickcheck_add_5, simple_test)
{
int verbose = 0;
int tolerance = 1;
using namespace tflite;
using namespace tflite::ops::builtin;
-TEST(NNAPI_Unittest_add_6, simple_test)
+TEST(NNAPI_Quickcheck_add_6, simple_test)
{
int verbose = 1;
int tolerance = 1;
using namespace tflite;
using namespace tflite::ops::builtin;
-TEST(NNAPI_Unittest_add_7, simple_test)
+TEST(NNAPI_Quickcheck_add_7, simple_test)
{
int verbose = 0;
int tolerance = 1;
using namespace tflite;
using namespace tflite::ops::builtin;
-TEST(NNAPI_Unittest_add_8, simple_test)
+TEST(NNAPI_Quickcheck_add_8, simple_test)
{
int verbose = 1;
int tolerance = 1;
using namespace tflite;
using namespace tflite::ops::builtin;
-TEST(NNAPI_Unittest_add_9, simple_test)
+TEST(NNAPI_Quickcheck_add_9, simple_test)
{
int verbose = 1;
int tolerance = 1;
using namespace tflite;
using namespace tflite::ops::builtin;
-TEST(NNAPI_Unittest_add_1, simple_test)
+TEST(NNAPI_Quickcheck_add_1, simple_test)
{
int verbose = 0;
int tolerance = 1;
using namespace tflite;
using namespace tflite::ops::builtin;
-TEST(NNAPI_Unittest_avg_pool_1, simple_test)
+TEST(NNAPI_Quickcheck_avg_pool_1, simple_test)
{
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
using namespace tflite;
using namespace tflite::ops::builtin;
-TEST(NNAPI_Unittest_avg_pool_1, simple_test)
+TEST(NNAPI_Quickcheck_avg_pool_1, simple_test)
{
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
using namespace tflite;
using namespace tflite::ops::builtin;
-TEST(NNAPI_Unittest_cast_1, simple_test)
+TEST(NNAPI_Quickcheck_cast_1, simple_test)
{
int verbose = 0;
int tolerance = 1;
using namespace tflite;
using namespace tflite::ops::builtin;
-TEST(NNAPI_Unittest_cast_2, simple_test)
+TEST(NNAPI_Quickcheck_cast_2, simple_test)
{
int verbose = 0;
int tolerance = 1;
using namespace tflite;
using namespace tflite::ops::builtin;
-TEST(NNAPI_Unittest_cast_1, simple_test)
+TEST(NNAPI_Quickcheck_cast_1, simple_test)
{
int verbose = 0;
int tolerance = 1;
using namespace tflite;
using namespace tflite::ops::builtin;
-TEST(NNAPI_Unittest_concat_1, simple_test)
+TEST(NNAPI_Quickcheck_concat_1, simple_test)
{
int verbose = 0;
int tolerance = 1;
using namespace tflite;
using namespace tflite::ops::builtin;
-TEST(NNAPI_Unittest_concat_1, simple_test)
+TEST(NNAPI_Quickcheck_concat_1, simple_test)
{
int verbose = 0;
int tolerance = 1;
using namespace tflite;
using namespace tflite::ops::builtin;
-TEST(NNAPI_Unittest_conv_1, simple_test)
+TEST(NNAPI_Quickcheck_conv_1, simple_test)
{
int verbose = 0;
int tolerance = 1;
using namespace tflite;
using namespace tflite::ops::builtin;
-TEST(NNAPI_Unittest_conv_1, simple_test)
+TEST(NNAPI_Quickcheck_conv_1, simple_test)
{
int verbose = 0;
int tolerance = 1;
using namespace tflite;
using namespace tflite::ops::builtin;
-TEST(NNAPI_Unittest_dconv_1, simple_test)
+TEST(NNAPI_Quickcheck_dconv_1, simple_test)
{
int verbose = 0;
int tolerance = 1;
using namespace tflite;
using namespace tflite::ops::builtin;
-TEST(NNAPI_Unittest_dconv_1, simple_test)
+TEST(NNAPI_Quickcheck_dconv_1, simple_test)
{
int verbose = 0;
int tolerance = 1;
using namespace tflite;
using namespace tflite::ops::builtin;
-TEST(NNAPI_Unittest_dequantize_1, simple_test)
+TEST(NNAPI_Quickcheck_dequantize_1, simple_test)
{
int verbose = 0;
int tolerance = 1;
using namespace tflite;
using namespace tflite::ops::builtin;
-TEST(NNAPI_Unittest_div_1, simple_test)
+TEST(NNAPI_Quickcheck_div_1, simple_test)
{
int verbose = 0;
int tolerance = 1;
using namespace tflite;
using namespace tflite::ops::builtin;
-TEST(NNAPI_Unittest_div_2, simple_test)
+TEST(NNAPI_Quickcheck_div_2, simple_test)
{
int verbose = 0;
int tolerance = 1;
template <typename T> T *make_malloc(void) { return reinterpret_cast<T *>(malloc(sizeof(T))); }
-TEST(NNAPI_Unittest_fully_connected_1, simple_test)
+TEST(NNAPI_Quickcheck_fully_connected_1, simple_test)
{
int verbose = 0;
int tolerance = 1;
template <typename T> T *make_malloc(void) { return reinterpret_cast<T *>(malloc(sizeof(T))); }
-TEST(NNAPI_Unittest_fully_connected_1, simple_test)
+TEST(NNAPI_Quickcheck_fully_connected_1, simple_test)
{
int verbose = 0;
int tolerance = 1;
using namespace tflite;
using namespace tflite::ops::builtin;
-TEST(NNAPI_Unittest_gather_1, simple_test)
+TEST(NNAPI_Quickcheck_gather_1, simple_test)
{
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
using namespace tflite;
using namespace tflite::ops::builtin;
-TEST(NNAPI_Unittest_gather_2, simple_test)
+TEST(NNAPI_Quickcheck_gather_2, simple_test)
{
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
using namespace tflite;
using namespace tflite::ops::builtin;
-TEST(NNAPI_Unittest_max_pool_1, simple_test)
+TEST(NNAPI_Quickcheck_max_pool_1, simple_test)
{
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
using namespace tflite;
using namespace tflite::ops::builtin;
-TEST(NNAPI_Unittest_max_pool_1, simple_test)
+TEST(NNAPI_Quickcheck_max_pool_1, simple_test)
{
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
using namespace tflite;
using namespace tflite::ops::builtin;
-TEST(NNAPI_Unittest_mul_1, simple_test)
+TEST(NNAPI_Quickcheck_mul_1, simple_test)
{
int verbose = 0;
int tolerance = 1;
using namespace tflite;
using namespace tflite::ops::builtin;
-TEST(NNAPI_Unittest_mul_2, simple_test)
+TEST(NNAPI_Quickcheck_mul_2, simple_test)
{
int verbose = 0;
int tolerance = 1;
using namespace tflite;
using namespace tflite::ops::builtin;
-TEST(NNAPI_Unittest_mul_1, simple_test)
+TEST(NNAPI_Quickcheck_mul_1, simple_test)
{
int verbose = 0;
int tolerance = 1;
using namespace tflite;
using namespace tflite::ops::builtin;
-TEST(NNAPI_Unittest_relu6_1, simple_test)
+TEST(NNAPI_Quickcheck_relu6_1, simple_test)
{
int verbose = 0;
int tolerance = 1;
using namespace tflite;
using namespace tflite::ops::builtin;
-TEST(NNAPI_Unittest_relu_1, simple_test)
+TEST(NNAPI_Quickcheck_relu_1, simple_test)
{
int verbose = 0;
int tolerance = 1;
using namespace tflite;
using namespace tflite::ops::builtin;
-TEST(NNAPI_Unittest_relu_2, simple_test)
+TEST(NNAPI_Quickcheck_relu_2, simple_test)
{
int verbose = 0;
int tolerance = 1;
using namespace tflite;
using namespace tflite::ops::builtin;
-TEST(NNAPI_Unittest_relu_3, simple_test)
+TEST(NNAPI_Quickcheck_relu_3, simple_test)
{
int verbose = 0;
int tolerance = 1;
using namespace tflite;
using namespace tflite::ops::builtin;
-TEST(NNAPI_Unittest_reshape_1, simple_test)
+TEST(NNAPI_Quickcheck_reshape_1, simple_test)
{
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
using namespace tflite;
using namespace tflite::ops::builtin;
-TEST(NNAPI_Unittest_reshape_1, simple_test)
+TEST(NNAPI_Quickcheck_reshape_1, simple_test)
{
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
using namespace tflite;
using namespace tflite::ops::builtin;
-TEST(NNAPI_Unittest_resize_bilinear_1, simple_test)
+TEST(NNAPI_Quickcheck_resize_bilinear_1, simple_test)
{
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
using namespace tflite;
using namespace tflite::ops::builtin;
-TEST(NNAPI_Unittest_softmax_1, simple_test)
+TEST(NNAPI_Quickcheck_softmax_1, simple_test)
{
int verbose = 0;
int tolerance = 1;
using namespace tflite;
using namespace tflite::ops::builtin;
-TEST(NNAPI_Unittest_softmax_2, simple_test)
+TEST(NNAPI_Quickcheck_softmax_2, simple_test)
{
int verbose = 0;
int tolerance = 1;
using namespace tflite;
using namespace tflite::ops::builtin;
-TEST(NNAPI_Unittest_softmax_1, simple_test)
+TEST(NNAPI_Quickcheck_softmax_1, simple_test)
{
int verbose = 0;
int tolerance = 1;
using namespace tflite;
using namespace tflite::ops::builtin;
-TEST(NNAPI_Unittest_sub_1, simple_test)
+TEST(NNAPI_Quickcheck_sub_1, simple_test)
{
int verbose = 0;
int tolerance = 1;
using namespace tflite;
using namespace tflite::ops::builtin;
-TEST(NNAPI_Unittest_sub_2, simple_test)
+TEST(NNAPI_Quickcheck_sub_2, simple_test)
{
int verbose = 0;
int tolerance = 1;
using namespace tflite;
using namespace tflite::ops::builtin;
-TEST(NNAPI_Unittest_sub_3, simple_test)
+TEST(NNAPI_Quickcheck_sub_3, simple_test)
{
int verbose = 0;
int tolerance = 1;
using namespace tflite;
using namespace tflite::ops::builtin;
-TEST(NNAPI_Unittest_sub_4, simple_test)
+TEST(NNAPI_Quickcheck_sub_4, simple_test)
{
int verbose = 0;
int tolerance = 1;
using namespace tflite;
using namespace tflite::ops::builtin;
-TEST(NNAPI_Unittest_sub_5, simple_test)
+TEST(NNAPI_Quickcheck_sub_5, simple_test)
{
int verbose = 0;
int tolerance = 1;
using namespace tflite;
using namespace tflite::ops::builtin;
-TEST(NNAPI_Unittest_sub_6, simple_test)
+TEST(NNAPI_Quickcheck_sub_6, simple_test)
{
int verbose = 0;
int tolerance = 1;
using namespace tflite;
using namespace tflite::ops::builtin;
-TEST(NNAPI_Unittest_tanh_1, simple_test)
+TEST(NNAPI_Quickcheck_tanh_1, simple_test)
{
int verbose = 0;
int tolerance = 1;
using namespace tflite;
using namespace tflite::ops::builtin;
-TEST(NNAPI_Unittest_topk_v2_1, simple_test)
+TEST(NNAPI_Quickcheck_topk_v2_1, simple_test)
{
// Set random seed
int SEED = std::chrono::system_clock::now().time_since_epoch().count();
+++ /dev/null
-file(GLOB_RECURSE NNAPI_UNITTEST_LIB_SOURCES "lib/*.cpp")
-file(GLOB_RECURSE NNAPI_UNITTEST_LIB_TESTS "lib/*.test.cpp")
-list(REMOVE_ITEM NNAPI_UNITTEST_LIB_SOURCES ${NNAPI_UNITTEST_LIB_TESTS})
-
-add_library(nnapi_unittest_common ${NNAPI_UNITTEST_LIB_SOURCES})
-target_include_directories(nnapi_unittest_common PUBLIC "inc")
-target_link_libraries(nnapi_unittest_common nnfw_util)
-target_link_libraries(nnapi_unittest_common nnfw_support_tflite)
-
-add_executable(nnapi_unittest_lib_env_test "lib/env.test.cpp")
-target_link_libraries(nnapi_unittest_lib_env_test nnapi_unittest_common)
-
-function(add_nnapi_unittest NAME)
- add_executable(nnapi_unittest_${NAME} "tests/${NAME}.cpp")
- add_dependencies(nnapi_unittest_${NAME} googletest)
- target_link_libraries(nnapi_unittest_${NAME} libgtest.a libgtest_main.a pthread)
- target_link_libraries(nnapi_unittest_${NAME} nnapi_unittest_common)
-endfunction(add_nnapi_unittest)
-
-add_nnapi_unittest(add_1)
-add_nnapi_unittest(add_2)
-add_nnapi_unittest(add_3)
-add_nnapi_unittest(add_4)
-add_nnapi_unittest(add_5)
-add_nnapi_unittest(add_6)
-add_nnapi_unittest(add_7)
-add_nnapi_unittest(add_8)
-add_nnapi_unittest(add_9)
-add_nnapi_unittest(add_quan_1)
-add_nnapi_unittest(div_1)
-add_nnapi_unittest(div_2)
-add_nnapi_unittest(sub_1)
-add_nnapi_unittest(sub_2)
-add_nnapi_unittest(sub_3)
-add_nnapi_unittest(sub_4)
-add_nnapi_unittest(sub_5)
-add_nnapi_unittest(sub_6)
-add_nnapi_unittest(mul_1)
-add_nnapi_unittest(mul_2)
-add_nnapi_unittest(mul_quan_1)
-add_nnapi_unittest(relu_1)
-add_nnapi_unittest(relu_quan_1)
-add_nnapi_unittest(relu_2)
-add_nnapi_unittest(relu_3)
-add_nnapi_unittest(relu6_1)
-add_nnapi_unittest(relu6_quan_1)
-add_nnapi_unittest(relu1_1)
-add_nnapi_unittest(conv_1)
-add_nnapi_unittest(conv_quan_1)
-add_nnapi_unittest(dconv_1)
-add_nnapi_unittest(dconv_quan_1)
-add_nnapi_unittest(max_pool_1)
-add_nnapi_unittest(max_pool_quan_1)
-add_nnapi_unittest(avg_pool_1)
-add_nnapi_unittest(avg_pool_quan_1)
-add_nnapi_unittest(concat_1)
-add_nnapi_unittest(concat_quan_1)
-add_nnapi_unittest(reshape_1)
-add_nnapi_unittest(reshape_quan_1)
-add_nnapi_unittest(fully_connected_1)
-add_nnapi_unittest(fully_connected_quan_1)
-add_nnapi_unittest(softmax_1)
-add_nnapi_unittest(softmax_2)
-add_nnapi_unittest(softmax_quan_1)
-add_nnapi_unittest(resize_bilinear_1)
-add_nnapi_unittest(topk_v2_1)
-add_nnapi_unittest(cast_1)
-add_nnapi_unittest(cast_q_to_f_1)
-add_nnapi_unittest(cast_2)
-add_nnapi_unittest(gather_1)
-add_nnapi_unittest(gather_2)
-add_nnapi_unittest(dequantize_1)
-add_nnapi_unittest(tanh_1)