29constexpr uint32_t inputTensorIdx = 0;
30constexpr uint32_t axisTensorIdx = 1;
35OMStatus onert_micro::import::configure_kernel_CircleExpandDims(
const OMConfigureArgs &config_args)
38 uint16_t op_index = config_args.kernel_index;
47 const circle::Tensor *
input = runtime_kernel.
inputs[inputTensorIdx];
48 const circle::Tensor *axis = runtime_kernel.
inputs[axisTensorIdx];
51 assert(input !=
nullptr);
52 assert(axis !=
nullptr);
53 assert(output !=
nullptr);
55 status = utils::checkCondition(
input->type() ==
output->type());
61 status = utils::checkCondition(axis->type() == circle::TensorType_INT32 or
62 axis->type() == circle::TensorType_INT64);
68 uint8_t *axis_data = runtime_kernel.
inputs_data[axisTensorIdx];
69 status = utils::checkCondition(axis_data !=
nullptr);
73 if (axis->type() == circle::TensorType_INT32)
75 int32_t axis_value = *
reinterpret_cast<int32_t *
>(axis_data);
78 axis_value += input_shape.dimensionsCount() + 1;
81 status = utils::checkCondition(axis_value <= input_shape.dimensionsCount() and axis_value >= 0);
87 int64_t axis_value = *
reinterpret_cast<int64_t *
>(axis_data);
90 axis_value += input_shape.dimensionsCount() + 1;
93 status = utils::checkCondition(axis_value <= input_shape.dimensionsCount() and axis_value >= 0);
OMStatus getDataFromStorage(uint16_t op_index, core::OMRuntimeStorage &storage, core::OMRuntimeContext &context)
uint8_t * inputs_data[maxInputSize]
OMStatus readKernel(uint16_t op_index, core::OMRuntimeContext &runtime_context)
const circle::Tensor * outputs[maxOutputSize]
const circle::Tensor * inputs[maxInputSize]
constexpr uint32_t outputTensorIdx