ONE - On-device Neural Engine
Loading...
Searching...
No Matches
onert_micro::train::KernelBuiltinTrainRegistry Class Reference

#include <OMBackpropExecutionBuilder.h>

Public Member Functions

constexpr KernelBuiltinTrainRegistry ()
 
OMStatus getKernelTrainFunc (core::OMBuilderID builderID, KernelTrainFunc **train_func) const
 

Detailed Description

Definition at line 42 of file OMBackpropExecutionBuilder.h.

Constructor & Destructor Documentation

◆ KernelBuiltinTrainRegistry()

constexpr onert_micro::train::KernelBuiltinTrainRegistry::KernelBuiltinTrainRegistry ( )
inlineconstexpr

Definition at line 45 of file OMBackpropExecutionBuilder.h.

45 : _operator_train()
46 {
47#define REGISTER_TRAIN_KERNEL(builtin_operator, name) \
48 registerKernelTrain(core::OMBuilderID::BuiltinOperator_##builtin_operator, \
49 train_kernel_Circle##name);
50
51#include "KernelsToTrain.lst"
52
53#undef REGISTER_TRAIN_KERNEL
54 }

Member Function Documentation

◆ getKernelTrainFunc()

OMStatus onert_micro::train::KernelBuiltinTrainRegistry::getKernelTrainFunc ( core::OMBuilderID  builderID,
KernelTrainFunc **  train_func 
) const
inline

Definition at line 57 of file OMBackpropExecutionBuilder.h.

58 {
59 const auto builder_id_opcode = size_t(builderID);
60 assert(builder_id_opcode < size_t(core::OMBuilderID::BuiltinOperatorsSize));
61 if (builder_id_opcode >= size_t(core::OMBuilderID::BuiltinOperatorsSize))
62 {
63 *train_func = nullptr;
64 return UnknownError;
65 }
66 *train_func = _operator_train[builder_id_opcode];
67 return Ok;
68 }

References onert_micro::core::BuiltinOperatorsSize, onert_micro::Ok, and onert_micro::UnknownError.

Referenced by onert_micro::train::OMBackpropExecute::runBackward().


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