23#include "PALGatherND.h"
32constexpr uint32_t inputTensorIdx = 0;
33constexpr uint32_t positionsTensorIdx = 1;
38OMStatus onert_micro::import::configure_kernel_CircleGatherND(
const OMConfigureArgs &config_args)
42 uint16_t op_index = config_args.kernel_index;
50 const circle::Tensor *
input = runtime_kernel.
inputs[inputTensorIdx];
51 const circle::Tensor *positions = runtime_kernel.
inputs[positionsTensorIdx];
54 assert(input !=
nullptr);
55 assert(positions !=
nullptr);
56 assert(output !=
nullptr);
58 status = utils::checkCondition(
input->type() ==
output->type());
62 status = utils::checkCondition(positions->type() == circle::TensorType_INT32);
66 auto input_type =
input->type();
67 status = utils::checkCondition(input_type == circle::TensorType_FLOAT32);
74 int32_t shape_num_dims = input_shape.dimensionsCount();
76 status = utils::checkCondition(shape_num_dims >= 1);
80 int32_t positions_num_dims = positions_shape.dimensionsCount();
81 int32_t positions_num_dims_nd = positions_shape.dims(positions_num_dims - 1);
83 status = utils::checkCondition(positions_num_dims >= 1);
87 status = utils::checkCondition(positions_num_dims_nd <= shape_num_dims);
OMStatus readKernel(uint16_t op_index, core::OMRuntimeContext &runtime_context)
const circle::Tensor * outputs[maxOutputSize]
const circle::Tensor * inputs[maxInputSize]
constexpr uint32_t outputTensorIdx
constexpr int MAX_INDICES_ND