ONE - On-device Neural Engine
|
#include <CompilerFactory.h>
Public Member Functions | |
std::unique_ptr< ICompiler > | create (std::unique_ptr< ir::NNPkg > nnpkg, CompilerOptions *copts, const ir::train::TrainingInfo *training_info=nullptr) |
Create ICompiler instance. Ownership of nnpkg is moved to ICompiler instance. | |
Static Public Member Functions | |
static CompilerFactory & | get () |
Definition at line 29 of file CompilerFactory.h.
std::unique_ptr< ICompiler > onert::compiler::CompilerFactory::create | ( | std::unique_ptr< ir::NNPkg > | nnpkg, |
CompilerOptions * | copts, | ||
const ir::train::TrainingInfo * | training_info = nullptr |
||
) |
Create ICompiler instance. Ownership of nnpkg is moved to ICompiler instance.
Compiler is designed on assumption that caller will not use nnpkg after calling this function. So ownership of nnpkg is moved to ICompiler instance to handle memory overhead of nnpkg. If caller want to maintain nnpkg after calling this function, caller should clone nnpkg before calling this function.
[in] | nnpkg | Package to compile |
[in] | copts | Compiler options |
[in] | training_info | Training info if it is a training model, otherwise nullptr |
Definition at line 31 of file CompilerFactory.cc.
Referenced by nnfw_session::prepare().
|
static |
Definition at line 25 of file CompilerFactory.cc.
Referenced by nnfw_session::prepare().