32constexpr uint32_t inputTensorIdx = 0;
33constexpr uint32_t hiddenHiddenTensorIdx = 1;
34constexpr uint32_t hiddenHiddenBiasTensorIdx = 2;
35constexpr uint32_t hiddenInputTensorIdx = 3;
36constexpr uint32_t hiddenInputBiasTensorIdx = 4;
37constexpr uint32_t stateTensorIdx = 5;
43OMStatus onert_micro::import::configure_kernel_CircleGRU(
const OMConfigureArgs &config_args)
46 uint16_t op_index = config_args.kernel_index;
48 const circle::Tensor *
input;
49 const circle::Tensor *hidden_hidden;
50 const circle::Tensor *hidden_hidden_bias;
51 const circle::Tensor *hidden_input;
52 const circle::Tensor *hidden_input_bias;
53 const circle::Tensor *state;
55 const circle::Tensor *
output;
59 runtime_kernel.
readKernel(op_index, runtime_context);
62 hidden_hidden = runtime_kernel.
inputs[hiddenHiddenTensorIdx];
63 hidden_hidden_bias = runtime_kernel.
inputs[hiddenHiddenBiasTensorIdx];
64 hidden_input = runtime_kernel.
inputs[hiddenInputTensorIdx];
65 hidden_input_bias = runtime_kernel.
inputs[hiddenInputBiasTensorIdx];
66 state = runtime_kernel.
inputs[stateTensorIdx];
69 assert(input !=
nullptr);
70 assert(hidden_hidden !=
nullptr);
71 assert(hidden_input !=
nullptr);
72 assert(state !=
nullptr);
74 assert(output !=
nullptr);
83 status = utils::checkCondition(hidden_hidden_shape.dims(0) == hidden_input_shape.dims(0));
87 const int32_t div_factor = 3;
89 utils::checkCondition(hidden_hidden_shape.dims(0) ==
95 state_shape.dims(state_shape.dimensionsCount() - 1));
99 status = utils::checkCondition(
input->type() ==
output->type());
int32_t dimensionsCount() const
int32_t dims(int i) const
OMStatus readKernel(uint16_t op_index, core::OMRuntimeContext &runtime_context)
const circle::Tensor * outputs[maxOutputSize]
const circle::Tensor * inputs[maxInputSize]
const luci_interpreter::RuntimeShape output_shape
constexpr uint32_t outputTensorIdx