ONE - On-device Neural Engine
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
onert::compiler::ExecutorFactory Class Reference

#include <ExecutorFactory.h>

Public Member Functions

exec::IExecutorcreate (std::unique_ptr< compiler::LoweredGraph > lowered_graph, const std::shared_ptr< exec::IExecutors > &executors, const ExecutorFactoryArgs &args)
 
exec::IExecutorcreate (std::unique_ptr< compiler::train::LoweredTrainableGraph > lowered_graph, const std::shared_ptr< exec::IExecutors > &executors, const ExecutorFactoryArgs &args, const ir::train::TrainingInfo &training_info)
 

Static Public Member Functions

static ExecutorFactoryget ()
 

Detailed Description

Definition at line 44 of file ExecutorFactory.h.

Member Function Documentation

◆ create() [1/2]

exec::IExecutor * onert::compiler::ExecutorFactory::create ( std::unique_ptr< compiler::LoweredGraph lowered_graph,
const std::shared_ptr< exec::IExecutors > &  executors,
const ExecutorFactoryArgs args 
)

Definition at line 306 of file ExecutorFactory.cc.

309{
310 assert(args.options != nullptr);
311 return _map.at(args.options->executor)(std::move(lowered_graph), executors, args);
312}
args
Definition infer.py:21

Referenced by onert::compiler::Compiler::compile(), onert::compiler::MultiModelCompiler::compile(), and onert::compiler::train::TrainingCompiler::compile().

◆ create() [2/2]

exec::IExecutor * onert::compiler::ExecutorFactory::create ( std::unique_ptr< compiler::train::LoweredTrainableGraph lowered_graph,
const std::shared_ptr< exec::IExecutors > &  executors,
const ExecutorFactoryArgs args,
const ir::train::TrainingInfo training_info 
)

Definition at line 593 of file ExecutorFactory.cc.

597{
598 assert(args.options != nullptr);
599
600 if (args.options->executor != "Linear")
601 throw std::runtime_error("ExecutorFactory: TrainableExecutor supports only 'Linear' now");
602
603 return createTrainableExecutor(std::move(lowered_graph), executors, args, training_info);
604}

◆ get()

ExecutorFactory & onert::compiler::ExecutorFactory::get ( )
static

Definition at line 291 of file ExecutorFactory.cc.

292{
293 static ExecutorFactory singleton;
294 return singleton;
295}

Referenced by onert::compiler::Compiler::compile(), onert::compiler::MultiModelCompiler::compile(), and onert::compiler::train::TrainingCompiler::compile().


The documentation for this class was generated from the following files: