[FPGA/FIX] fix some apptests for FPGA env.
authorDongju Chae <dongju.chae@samsung.com>
Fri, 28 May 2021 03:46:40 +0000 (12:46 +0900)
committer채동주/On-Device Lab(SR)/Staff Engineer/삼성전자 <dongju.chae@samsung.com>
Fri, 28 May 2021 07:36:55 +0000 (16:36 +0900)
This patch fixes some apptests for FPGA env.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
tests/apptests/meson.build
tests/apptests/tvn_triv2_dmabuf.cc

index 6bbc64ef6bcda37cee56a40c260d360cceabfb85..c0c818df997b790b22d24fe6738887e7a6e33f95 100644 (file)
@@ -83,15 +83,18 @@ executable ('apptest_tvn_triv2_dmabuf',
   install_dir : join_paths(ne_bindir, 'apptests')
 )
 
-executable ('apptest_tvn_triv2_recurring',
-  'tvn_triv2_recurring.cc',
-  include_directories : ne_apptest_inc,
-  dependencies : [ne_test_utils_dep, thread_dep],
-  link_with : ne_library_shared,
-  install : true,
-  install_rpath : ne_libdir,
-  install_dir : join_paths(ne_bindir, 'apptests')
-)
+####
+# TODO Disable this test until VD I/F sync. is done
+#
+#executable ('apptest_tvn_triv2_recurring',
+#  'tvn_triv2_recurring.cc',
+#  include_directories : ne_apptest_inc,
+#  dependencies : [ne_test_utils_dep, thread_dep],
+#  link_with : ne_library_shared,
+#  install : true,
+#  install_rpath : ne_libdir,
+#  install_dir : join_paths(ne_bindir, 'apptests')
+#)
 
 tinyxml2_dep = dependency ('tinyxml2')
 executable ('apptest_tvn_triv2_xml',
index aa249b9367576bd0a17dc1647ed70c084c58f57f..2bb2693a879deada42d2a8b5b3a7deb341fb39d6 100644 (file)
@@ -56,7 +56,8 @@ class TesterTRIV2 {
   /** @brief initilize the device handle */
   int init (const std::string dir) {
     dir_ = dir;
-    return getNPUdeviceByTypeAny (&dev_, TRIV2_TYPE, 2);
+    /* use /dev/triv2-0 */
+    return getNPUdeviceByType (&dev_, TRIV2_TYPE, 0);
   }
 
   /** @brief run the inference (with dummy data) */
@@ -116,8 +117,8 @@ class TesterTRIV2 {
   }
 
   int prepare_input () {
-    /** let's emulate external dmabuf using 8TOPS TRIV2 device */
-    int status = getNPUdeviceByTypeAny (&dev_tmp_, TRIV2_TYPE, 8);
+    /* use /dev/triv2-1 for external dmabuf */
+    int status = getNPUdeviceByType (&dev_tmp_, TRIV2_TYPE, 1);
     if (status != 0)
       return status;