Set thread count for tflite_run (#5830)
author오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>
Wed, 24 Jul 2019 09:26:07 +0000 (18:26 +0900)
committer이춘석/On-Device Lab(SR)/Staff Engineer/삼성전자 <chunseok.lee@samsung.com>
Wed, 24 Jul 2019 09:26:07 +0000 (18:26 +0900)
Set thread count for tflite_run by using THREAD environment variable

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
tests/tools/tflite_run/src/tflite_run.cc

index b54f0e1..c067f8b 100644 (file)
@@ -73,7 +73,7 @@ int main(const int argc, char **argv)
 
       TFLITE_ENSURE(builder(&interpreter))
 
-      interpreter->SetNumThreads(1);
+      interpreter->SetNumThreads(nnfw::misc::get_env_int("THREAD", -1));
     };
   }
   catch (const std::exception &e)