Open Deep Learning API
Loading...
Searching...
No Matches
Data Structures | Functions
odla_ops_quantization.h File Reference

Go to the source code of this file.

Data Structures

struct  odla_value_quant_info
 Quantization info for each odla value. More...
 

Functions

ODLA_API_EXPORT odla_value ODLA_API_CALL odla_Dequantize (odla_value input, odla_value scale, odla_value zero_point, odla_int32 axis, odla_element_type target_data_type, const odla_value_id value_id)
 Dequantize a tensor. More...
 
ODLA_API_EXPORT odla_value ODLA_API_CALL odla_Quantize (odla_value input, odla_value scale, odla_value zero_point, odla_int32 axis, odla_element_type target_data_type, const odla_value_id value_id)
 Quantize a tensor. More...
 

Detailed Description

This file defines the ODLA quantization related operators.

Definition in file odla_ops_quantization.h.

Function Documentation

◆ odla_Dequantize()

ODLA_API_EXPORT odla_value ODLA_API_CALL odla_Dequantize ( odla_value  input,
odla_value  scale,
odla_value  zero_point,
odla_int32  axis,
odla_element_type  target_data_type,
const odla_value_id  value_id 
)

Dequantize a tensor.

Converts a quantized tensor to the full precision tensor.

Parameters
inputthe input value
scalescale for input
zero_pointzero point for input
axisthe axis of the dequantizing. Ignored if scale is a scalar
target_data_typethe data type of full precision output
value_ida unique value id (can be NULL)
Returns
odla_value

◆ odla_Quantize()

ODLA_API_EXPORT odla_value ODLA_API_CALL odla_Quantize ( odla_value  input,
odla_value  scale,
odla_value  zero_point,
odla_int32  axis,
odla_element_type  target_data_type,
const odla_value_id  value_id 
)

Quantize a tensor.

Converts a tensor to low precision tensor.

Parameters
inputthe input value
scalescale for input
zero_pointzero point for input
axisthe axis of the quantizing. Ignored if scale is a scalar
target_data_typethe data type of low precision output
value_ida unique value id (can be NULL)
Returns
odla_value