31constexpr uint32_t inputTensorIdx = 0;
42 if (
args.is_last_layer)
47 uint16_t op_index =
args.kernel_index;
50 runtime_kernel.
readKernel(op_index, runtime_context);
52 const circle::Tensor *
input = runtime_kernel.
inputs[inputTensorIdx];
55 assert(input !=
nullptr);
56 assert(output !=
nullptr);
60 status = runtime_kernel.
getDataFromStorage(op_index, runtime_storage, runtime_context);
67 assert(input_data !=
nullptr);
68 assert(output_data !=
nullptr);
71 if (input_data == output_data)
76 const size_t element_size =
79 std::memcpy(input_data, output_data, num_elements * element_size);
uint8_t * outputs_data[maxOutputSize]
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
uint32_t num_elements(const Shape &shape)
The number of elements of a feature map of a given shape.
OMDataType onertMicroDatatype(const circle::TensorType type)
size_t getOMDataTypeSize(OMDataType data_type)