Subgraph example: multi-threaded batch processing
authorYuan Zhao <yuanzhao@ti.com>
Thu, 21 Nov 2019 05:38:12 +0000 (23:38 -0600)
committerYuan Zhao <yuanzhao@ti.com>
Thu, 21 Nov 2019 05:38:12 +0000 (23:38 -0600)
commitf6e0c49d2ec377adee1e94363a626a83497729c3
tree8034a3eb18a14e5e73dcda6ad7c1ae7e22390a62
parent94d4720f20949699ba551ddf585d62831d8e50ed
Subgraph example: multi-threaded batch processing

- Compared different batch size in subgraph execution example
- Compared async/future implementation vs thread pool implementation,
  async/future has slightly worse (~1%) performance,
  but it is much easier to program
- Recommended inference is multi-threaded batch processing, where
  batch_size can be obtained from TidlGetPreferredBatchSize(),
  number of threads can be set to 2.
- MCT-1223
examples/mobilenet_subgraph/Makefile
examples/mobilenet_subgraph/main.cpp
examples/mobilenet_subgraph/thread_pool.cpp [new file with mode: 0644]
examples/mobilenet_subgraph/thread_pool.h [new file with mode: 0644]
tidl_api/inc/subgraph_runtime.h
tidl_api/src/subgraph_runtime.cpp
tidl_api/src/subgraph_runtime_impl.h