ExecutionObjectPipeline for executing layersGroups
[tidl/tidl-api.git] / tidl_api / src / executor.cpp
index b644728afe8f92a75dc65f3bd200ec8aaa8e26fe..914c78ab58104eeba379db5ae8305e45537d007e 100644 (file)
@@ -96,6 +96,12 @@ const ExecutionObjects& Executor::GetExecutionObjects() const
     return pimpl_m->execution_objects_m;
 }
 
     return pimpl_m->execution_objects_m;
 }
 
+ExecutionObject* Executor::operator[](uint32_t index) const
+{
+    assert(index < pimpl_m->execution_objects_m.size());
+    return pimpl_m->execution_objects_m[index].get();
+}
+
 bool ExecutorImpl::Initialize(const Configuration& configuration)
 {
     configuration_m = configuration;
 bool ExecutorImpl::Initialize(const Configuration& configuration)
 {
     configuration_m = configuration;
@@ -145,13 +151,11 @@ bool ExecutorImpl::Initialize(const Configuration& configuration)
              {new ExecutionObject(device_m.get(), index,
                                   create_arg, param_heap_arg,
                                   configuration_m.EXTMEM_HEAP_SIZE,
              {new ExecutionObject(device_m.get(), index,
                                   create_arg, param_heap_arg,
                                   configuration_m.EXTMEM_HEAP_SIZE,
+                                  layers_group_id_m,
+                                  configuration_m.enableOutputTrace,
                                   configuration_m.enableInternalInput)} );
     }
 
                                   configuration_m.enableInternalInput)} );
     }
 
-    if (configuration_m.enableOutputTrace)
-        for (auto &eo : execution_objects_m)
-            eo->EnableOutputBufferTrace();
-
     for (auto &eo : execution_objects_m)
         eo->RunAsync(ExecutionObject::CallType::INIT);
 
     for (auto &eo : execution_objects_m)
         eo->RunAsync(ExecutionObject::CallType::INIT);
 
@@ -294,4 +298,3 @@ const char* Exception::what() const noexcept
 {
     return message_m.c_str();
 }
 {
     return message_m.c_str();
 }
-