]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - tidl/tidl-api.git/commitdiff
Merge branch 'hotfix/v01.05.01' master v01.05.01
authorYuan Zhao <yuanzhao@ti.com>
Mon, 9 Mar 2020 16:36:45 +0000 (11:36 -0500)
committerYuan Zhao <yuanzhao@ti.com>
Mon, 9 Mar 2020 16:36:45 +0000 (11:36 -0500)
docs/source/changelog.rst
docs/source/using_api.rst
tidl_api/make.buildid
tidl_api/src/subgraph_runtime.cpp

index 42c4cf1987c4699634da1950e4d6112d56289bcb..da4370f03238d21ea99f075eb8646d597cf5e235 100644 (file)
@@ -2,11 +2,12 @@
 Changelog
 #########
 
-1.5.0 [Processor Linux SDK 6.3]
+1.5.1 [Processor Linux SDK 6.3]
 ===============================
 **Changed**
 
-#. Cleaned up subgraph cfg file entries.  Added TIDL_SUBGRAPH_DIR env var.
+#. Cleaned up subgraph cfg file entries.  Added TIDL_SUBGRAPH_DIR and
+   TIDL_SUBGRAPH_NUM_EVES env var.
 
 1.4.0 [Processor Linux SDK 6.2]
 ===============================
index d56bd52914dae4a8efb9a01e85e6e36737a174a7..f7446902e4a4b845bd7aef5e8da5febd0fdae8e7 100644 (file)
@@ -326,7 +326,7 @@ Subgraph config file
 
 Subgraph config file are named as "subgraph<number>.cfg", while <number>
 is the subgraph index in the original graph/network.  The environment
-variable `TIDL_SUBGRAPH_DIR` speicifies the directory where subgraph config
+variable `TIDL_SUBGRAPH_DIR` specifies the directory where subgraph config
 files reside.  If not specified, the current directory is assumed.
 
 Subgraph config file requires extra parameters to describe data conversion
@@ -337,3 +337,7 @@ set of required parameters.
 Subgraph runtime API
 ====================
 Please see `tidl_api/inc/subgraph_runtime.h` for details.
+
+The envrionment variable `TIDL_SUBGRAPH_NUM_EVES` specifies the number of
+EVEs used for inferencing.  If not specified, all available EVEs will be
+initialized and used.
index 9d8ec3622b715d1bcedab0bc8f827fed657756b3..80c05593e3c068c6a011ab02ae983a7e4e34711e 100644 (file)
@@ -26,7 +26,7 @@
 
 MAJOR_VER=1
 MINOR_VER=5
-PATCH_VER=0
+PATCH_VER=1
 
 ifeq ($(shell git rev-parse --short HEAD 2>&1 1>/dev/null; echo $$?),0)
 BUILD_SHA?=$(shell git rev-parse --short HEAD)
index 5ac6e973bb75bb65275aeb12b380237389d61bfe..12705d50d02e3e033ecbf94bcbadb9e1e6b96ead 100644 (file)
@@ -218,6 +218,16 @@ void ResM::Init(uint32_t num_subgraphs)
     num_eves_m = Executor::GetNumDevices(DeviceType::EVE);
     num_dsps_m = Executor::GetNumDevices(DeviceType::DSP);
 
+    char *env_subgraph_num_eves = getenv("TIDL_SUBGRAPH_NUM_EVES");
+    if (env_subgraph_num_eves != nullptr)
+    {
+        uint32_t subgraph_num_eves = atoi(env_subgraph_num_eves);
+        if (subgraph_num_eves > 0 && subgraph_num_eves < num_eves_m)
+            num_eves_m = subgraph_num_eves;
+        if (subgraph_num_eves > 0 && subgraph_num_eves < num_dsps_m)
+            num_dsps_m = subgraph_num_eves;
+    }
+
     assert(num_eves_m > 0 || num_dsps_m > 0);
     assert(num_subgraphs_m <= num_eves_m || num_subgraphs_m <= num_dsps_m);
     num_es_per_subgraph_m = num_eves_m / num_subgraphs_m;