aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'tidl_api/src/subgraph_runtime.cpp')
-rw-r--r--tidl_api/src/subgraph_runtime.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tidl_api/src/subgraph_runtime.cpp b/tidl_api/src/subgraph_runtime.cpp
index 5ac6e97..12705d5 100644
--- a/tidl_api/src/subgraph_runtime.cpp
+++ b/tidl_api/src/subgraph_runtime.cpp
@@ -218,6 +218,16 @@ void ResM::Init(uint32_t num_subgraphs)
218 num_eves_m = Executor::GetNumDevices(DeviceType::EVE); 218 num_eves_m = Executor::GetNumDevices(DeviceType::EVE);
219 num_dsps_m = Executor::GetNumDevices(DeviceType::DSP); 219 num_dsps_m = Executor::GetNumDevices(DeviceType::DSP);
220 220
221 char *env_subgraph_num_eves = getenv("TIDL_SUBGRAPH_NUM_EVES");
222 if (env_subgraph_num_eves != nullptr)
223 {
224 uint32_t subgraph_num_eves = atoi(env_subgraph_num_eves);
225 if (subgraph_num_eves > 0 && subgraph_num_eves < num_eves_m)
226 num_eves_m = subgraph_num_eves;
227 if (subgraph_num_eves > 0 && subgraph_num_eves < num_dsps_m)
228 num_dsps_m = subgraph_num_eves;
229 }
230
221 assert(num_eves_m > 0 || num_dsps_m > 0); 231 assert(num_eves_m > 0 || num_dsps_m > 0);
222 assert(num_subgraphs_m <= num_eves_m || num_subgraphs_m <= num_dsps_m); 232 assert(num_subgraphs_m <= num_eves_m || num_subgraphs_m <= num_dsps_m);
223 num_es_per_subgraph_m = num_eves_m / num_subgraphs_m; 233 num_es_per_subgraph_m = num_eves_m / num_subgraphs_m;