ONE - On-device Neural Engine
Loading...
Searching...
No Matches
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 46 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 308 of file ExecutorFactory.cc.

311{
312 assert(args.options != nullptr);
313 return _map.at(args.options->executor)(std::move(lowered_graph), executors, args);
314}
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 595 of file ExecutorFactory.cc.

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

◆ get()

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

Definition at line 293 of file ExecutorFactory.cc.

294{
295 static ExecutorFactory singleton;
296 return singleton;
297}

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: