Replace IExecutor::model (returning Model) with IExecutor::graph, which returns graph. Do the same in derived classes also.
Signed-off-by: Sergei Barannikov <s.barannikov@samsung.com>
* @brief Returns model object
* @return Model object
*/
- const model::Model &model() const { return _executor->model(); }
+ const model::Model &model() const { return *_executor->graph().shareModel(); }
/**
* @brief Set input data's information
* @param[in] index Input index
#ifndef __NEURUN_EXEC_I_EXECUTOR_H_
#define __NEURUN_EXEC_I_EXECUTOR_H_
-#include "model/Model.h"
+#include "graph/Graph.h"
#include "IFunction.h"
#include "IODescription.h"
#include "model/OperationIndexMap.h"
virtual ~IExecutor() = default;
/**
- * @brief Returns model object
+ * @brief Returns graph object
*
- * @return Model object
+ * @return Graph object
*/
- virtual const model::Model &model() = 0;
+ virtual const graph::Graph &graph() = 0;
/**
* @brief Set an ordering on operations
Execution::Execution(const std::shared_ptr<IExecutor> &executor) : _executor{executor}
{
- _io_desc.inputs.resize(_executor->model().inputs.size());
- _io_desc.outputs.resize(_executor->model().outputs.size());
+ _io_desc.inputs.resize(_executor->graph().getInputs().size());
+ _io_desc.outputs.resize(_executor->graph().getOutputs().size());
}
// TODO Remove default parameter
VERBOSE(ProfileInfo) << "Time for " << node_name << " : " << timer_res << std::endl;
// fill ExecTime:
- bool is_quantized = exec->model().operands.at(node->getInputs().at(0)).typeInfo().type() ==
+ bool is_quantized = exec->graph().operands().at(node->getInputs().at(0)).typeInfo().type() ==
model::DataType::QUANT8_ASYMM;
uint32_t size = 0;
for (const auto &input : node->getInputs())
{
- size += exec->model().operands.at(input).info().total_size();
+ size += exec->graph().operands().at(input).info().total_size();
}
for (const auto &output : node->getOutputs())
{
- size += exec->model().operands.at(output).info().total_size();
+ size += exec->graph().operands().at(output).info().total_size();
}
if (node_name == "Permute")
{
virtual ~ExecutorBase() = default;
- const model::Model &model() override { return *_graph.shareModel(); }
+ const graph::Graph &graph() final { return _graph; }
void execute(const IODescription &desc) final;
public:
/**
- * @brief Return graph model
- * @return Graph model
+ * @brief Return graph object
+ * @return Graph object
*/
- const model::Model &model() override { return *_graph.shareModel(); }
+ const graph::Graph &graph() final { return _graph; }
void setIndexedRanks(std::shared_ptr<model::OperationIndexMap<int64_t>>) override{
// Not implemented
};