ONE - On-device Neural Engine
Loading...
Searching...
No Matches
Quantize.h File Reference
#include "cker/operation/Round.h"
#include "cker/Shape.h"
#include "cker/Types.h"
#include "cker/Utils.h"
#include <cassert>
#include <iostream>
#include <stdexcept>

Go to the source code of this file.

Namespaces

namespace  nnfw
 
namespace  nnfw::cker
 

Functions

template<typename InputT , typename OutputT >
void nnfw::cker::Quantize (const Shape &input_shape, const InputT *input_data, const Shape &output_shape, OutputT *output_data, const float output_scale, const int32_t output_offset)
 
template<>
void nnfw::cker::Quantize (const Shape &input_shape, const float *input_data, const Shape &output_shape, int8_t *output_data, const float scale, const int32_t zero_point)
 
template<>
void nnfw::cker::Quantize (const Shape &input_shape, const float *input_data, const Shape &output_shape, uint8_t *output_data, const float scale, const int32_t zero_point)
 
template<>
void nnfw::cker::Quantize (const Shape &input_shape, const float *input_data, const Shape &output_shape, int16_t *output_data, const float scale, const int32_t zero_point)
 
void nnfw::cker::Quantize (const int32_t *multiplier, const int32_t *shift, int32_t channel_size, int32_t total_size, int32_t output_zp, int32_t output_min, int32_t output_max, int32_t *scratch, int8_t *output)
 
template<typename input_type , typename output_type >
void nnfw::cker::Requantize (const input_type *input_data, int32_t size, int32_t effective_scale_multiplier, int32_t effective_scale_shift, int32_t input_zeropoint, int32_t output_zeropoint, output_type *output_data)
 
template<>
void nnfw::cker::Requantize< uint8_t, int8_t > (const uint8_t *input_data, int32_t size, int32_t effective_scale_multiplier, int32_t effective_scale_shift, int32_t input_zeropoint, int32_t output_zeropoint, int8_t *output_data)
 
template<>
void nnfw::cker::Requantize< int8_t, uint8_t > (const int8_t *input_data, int32_t size, int32_t effective_scale_multiplier, int32_t effective_scale_shift, int32_t input_zeropoint, int32_t output_zeropoint, uint8_t *output_data)