21#include "PALDequantize.h"
32constexpr uint32_t inputTensorIdx = 0;
40 const circle::Tensor *
input =
nullptr;
41 const circle::Tensor *
output =
nullptr;
46 SISOHeader(execute_args, &input, &output, &input_data, &output_data);
48 assert(
output->type() == circle::TensorType_FLOAT32);
51 switch (
input->type())
54 case circle::TensorType_INT8:
56 assert(
input->quantization() !=
nullptr);
57 assert(
input->quantization()->scale() !=
nullptr and
58 input->quantization()->scale()->size() == 1);
59 assert(
input->quantization()->zero_point() !=
nullptr and
60 input->quantization()->zero_point()->size() == 1);
63 params.scale =
input->quantization()->scale()->operator[](0);
66 core::utils::castInputData<int8_t>(input_data),
67 core::utils::castOutputData<float>(output_data));
74 assert(
false &&
"Unsupported type.");
constexpr uint32_t outputTensorIdx
OMStatus Dequantize(const core::QuantizationParams op_params, const uint32_t flat_size, const InputT *input_data, OutputT *output_data)
OMStatus SISOHeader(const OMExecuteArgs &execute_args, const circle::Tensor **input, const circle::Tensor **output, uint8_t **input_data, uint8_t **output_data)