INT8 convolution framework
A framework to accelerate INT8 convolution in Synet Framework. More...
Functions | |
SIMD_API void * | SimdSynetConvolution8iInit (size_t batch, const SimdConvolutionParameters *conv, SimdSynetCompatibilityType compatibility) |
Initilizes INT8 convolution algorithm. More... | |
SIMD_API size_t | SimdSynetConvolution8iExternalBufferSize (const void *context) |
Gets size in bytes of external temporary buffer required for INT8 convolution algorithm. More... | |
SIMD_API size_t | SimdSynetConvolution8iInternalBufferSize (const void *context) |
Gets size of internal buffer used inside INT8 convolution algorithm. More... | |
SIMD_API const char * | SimdSynetConvolution8iInfo (const void *context) |
Gets description of internal implementation of INT8 convolution algorithm. More... | |
SIMD_API void | SimdSynetConvolution8iSetParams (void *context, const float *weight, const float *bias, const float *params, const float *const *stats) |
Sets weights, biases, parameters of activation function, input/output tensor statistics required for INT8 convolution algorithm. More... | |
SIMD_API void | SimdSynetConvolution8iForward (void *context, const uint8_t *src, uint8_t *buf, uint8_t *dst) |
Performs forward propagation of INT8 convolution algorithm. More... | |
Detailed Description
A framework to accelerate INT8 convolution in Synet Framework.
Function Documentation
◆ SimdSynetConvolution8iInit()
void * SimdSynetConvolution8iInit | ( | size_t | batch, |
const SimdConvolutionParameters * | conv, | ||
SimdSynetCompatibilityType | compatibility | ||
) |
Initilizes INT8 convolution algorithm.
- Parameters
-
[in] batch - a batch size. [in] conv - a pointer to convolution parameters. [in] compatibility - a flags of calculation compatibility.
- Returns
- a pointer to INT8 convolution context. On error it returns NULL. It must be released with using of function SimdRelease. This pointer is used in functions SimdSynetConvolution8iExternalBufferSize, SimdSynetConvolution8iInternalBufferSize, SimdSynetConvolution8iInfo, SimdSynetConvolution8iSetParams and SimdSynetConvolution8iForward.
◆ SimdSynetConvolution8iExternalBufferSize()
size_t SimdSynetConvolution8iExternalBufferSize | ( | const void * | context | ) |
Gets size in bytes of external temporary buffer required for INT8 convolution algorithm.
- Parameters
-
[in] context - a pointer to INT8 convolution context. It must be created by function SimdSynetConvolution8iInit and released by function SimdRelease.
- Returns
- size of external temporary buffer required for INT8 convolution algorithm.
◆ SimdSynetConvolution8iInternalBufferSize()
size_t SimdSynetConvolution8iInternalBufferSize | ( | const void * | context | ) |
Gets size of internal buffer used inside INT8 convolution algorithm.
- Parameters
-
[in] context - a pointer to INT8 convolution context. It must be created by function SimdSynetConvolution8iInit and released by function SimdRelease.
- Returns
- size of internal buffer used inside INT8 convolution algorithm.
◆ SimdSynetConvolution8iInfo()
const char * SimdSynetConvolution8iInfo | ( | const void * | context | ) |
Gets description of internal implementation of INT8 convolution algorithm.
- Parameters
-
[in] context - a pointer to INT8 convolution context. It must be created by function SimdSynetConvolution8iInit and released by function SimdRelease.
- Returns
- string with description of internal implementation of INT8 convolution algorithm.
◆ SimdSynetConvolution8iSetParams()
void SimdSynetConvolution8iSetParams | ( | void * | context, |
const float * | weight, | ||
const float * | bias, | ||
const float * | params, | ||
const float *const * | stats | ||
) |
Sets weights, biases, parameters of activation function, input/output tensor statistics required for INT8 convolution algorithm.
- Parameters
-
[in,out] context - a pointer to INT8 convolution context. It must be created by function SimdSynetConvolution8iInit and released by function SimdRelease. [in] weight - a pointer to original (32-bit float point) convolution weights. [in] bias - a pointer to original (32-bit float point) bias. Can be NULL. [in] params - a pointer to original (32-bit float point) parameters of activation functions (see SimdConvolutionActivationType). Can be NULL. [in] stats - a pointer to pointers with statistics of input(min - stats[0], max - stats[1]) and output(min - stats[2], max - stats[3]) tensors.
◆ SimdSynetConvolution8iForward()
void SimdSynetConvolution8iForward | ( | void * | context, |
const uint8_t * | src, | ||
uint8_t * | buf, | ||
uint8_t * | dst | ||
) |
Performs forward propagation of INT8 convolution algorithm.
- Parameters
-
[in] context - a pointer to INT8 convolution context. It must be created by function SimdSynetConvolution8iInit and released by function SimdRelease. [in] src - a pointer to input tensor. [out] buf - a pointer to external temporary buffer. The size of the external temporary buffer is determined by function SimdSynetConvolution8iExternalBufferSize. Can be NULL (it causes usage of internal buffer). [out] dst - a pointer to output tensor.