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 341 of file ExecutorFactory.cc.

344{
345 assert(args.options != nullptr);
346 return _map.at(args.options->executor)(std::move(lowered_graph), executors, args);
347}
args
Definition infer.py:21

Referenced by onert::compiler::Compiler::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 637 of file ExecutorFactory.cc.

641{
642 assert(args.options != nullptr);
643
644 if (args.options->executor != "Linear")
645 throw std::runtime_error("ExecutorFactory: TrainableExecutor supports only 'Linear' now");
646
647 return createTrainableExecutor(std::move(lowered_graph), executors, args, training_info);
648}

◆ get()

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

Definition at line 326 of file ExecutorFactory.cc.

327{
328 static ExecutorFactory singleton;
329 return singleton;
330}

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


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