Quantized merged convolution framework
A framework to accelerate Quantized merged convolution in Synet Framework. More...
Functions | |
SIMD_API void * | SimdSynetQuantizedMergedConvolutionInit (size_t batch, const SimdConvolutionParameters *convs, size_t count, SimdBool add) |
Initilizes Quantized merged convolution algorithm. More... | |
SIMD_API size_t | SimdSynetQuantizedMergedConvolutionExternalBufferSize (const void *context) |
Gets size of external temporary buffer required for Quantized merged convolution algorithm. More... | |
SIMD_API size_t | SimdSynetQuantizedMergedConvolutionInternalBufferSize (const void *context) |
Gets size of internal buffer used inside Quantized merged convolution algorithm. More... | |
SIMD_API const char * | SimdSynetQuantizedMergedConvolutionInfo (const void *context) |
Gets description of internal implementation of Quantized merged convolution algorithm. More... | |
SIMD_API void | SimdSynetQuantizedMergedConvolutionSetParams (void *context, const float *ioScale, const uint8_t *ioZero, const int8_t *const *weight, const float *const *weightScale, const int32_t *const *bias) |
Sets weights, biases, input/output parameters required for Quantized merged convolution algorithm. More... | |
SIMD_API void | SimdSynetQuantizedMergedConvolutionForward (void *context, const uint8_t *src, uint8_t *buf, uint8_t *dst) |
Performs forward propagation of Quantized merged convolution algorithm. More... | |
Detailed Description
A framework to accelerate Quantized merged convolution in Synet Framework.
Function Documentation
◆ SimdSynetQuantizedMergedConvolutionInit()
void * SimdSynetQuantizedMergedConvolutionInit | ( | size_t | batch, |
const SimdConvolutionParameters * | convs, | ||
size_t | count, | ||
SimdBool | add | ||
) |
Initilizes Quantized merged convolution algorithm.
- Parameters
-
[in] batch - a batch size. [in] convs - an array with convolutions parameters. [in] count - a number of merged convolutions. [in] add - a flag that signilizes if we need to add source to output value.
- Returns
- a pointer to Quantized merged convolution context. On error it returns NULL. It must be released with using of function SimdRelease. This pointer is used in functions SimdSynetQuantizedMergedConvolutionExternalBufferSize, SimdSynetQuantizedMergedConvolutionInternalBufferSize, SimdSynetQuantizedMergedConvolutionInfo, SimdSynetQuantizedMergedConvolutionSetParams and SimdSynetQuantizedMergedConvolutionForward.
◆ SimdSynetQuantizedMergedConvolutionExternalBufferSize()
size_t SimdSynetQuantizedMergedConvolutionExternalBufferSize | ( | const void * | context | ) |
Gets size of external temporary buffer required for Quantized merged convolution algorithm.
- Parameters
-
[in] context - a pointer to Quantized merged convolution context. It must be created by function SimdSynetQuantizedMergedConvolutionInit and released by function SimdRelease.
- Returns
- size of external temporary buffer required for Quantized merged convolution algorithm.
◆ SimdSynetQuantizedMergedConvolutionInternalBufferSize()
size_t SimdSynetQuantizedMergedConvolutionInternalBufferSize | ( | const void * | context | ) |
Gets size of internal buffer used inside Quantized merged convolution algorithm.
- Parameters
-
[in] context - a pointer to Quantized merged convolution context. It must be created by function SimdSynetQuantizedMergedConvolutionInit and released by function SimdRelease.
- Returns
- size of internal buffer used inside Quantized merged convolution algorithm.
◆ SimdSynetQuantizedMergedConvolutionInfo()
const char * SimdSynetQuantizedMergedConvolutionInfo | ( | const void * | context | ) |
Gets description of internal implementation of Quantized merged convolution algorithm.
- Parameters
-
[in] context - a pointer to Quantized merged convolution context. It must be created by function SimdSynetQuantizedMergedConvolutionInit and released by function SimdRelease.
- Returns
- string with description of internal implementation of Quantized merged convolution algorithm.
◆ SimdSynetQuantizedMergedConvolutionSetParams()
void SimdSynetQuantizedMergedConvolutionSetParams | ( | void * | context, |
const float * | ioScale, | ||
const uint8_t * | ioZero, | ||
const int8_t *const * | weight, | ||
const float *const * | weightScale, | ||
const int32_t *const * | bias | ||
) |
Sets weights, biases, input/output parameters required for Quantized merged convolution algorithm.
- Parameters
-
[in,out] context - a pointer to Quantized merged convolution context. It must be created by function SimdSynetQuantizedMergedConvolutionInit and released by function SimdRelease. [in] ioScale - a pointer to 32-bit float point input/output tensors scales. [in] ioZero - a pointer to 8-bit unsigned integer input/output tensors zeros. [in] weight - a pointer to 8-bit integer convolution weights. [in] weightScale - a pointer to 32-bit float point weight scales. [in] bias - a pointer to 32-bit integer biases.
◆ SimdSynetQuantizedMergedConvolutionForward()
void SimdSynetQuantizedMergedConvolutionForward | ( | void * | context, |
const uint8_t * | src, | ||
uint8_t * | buf, | ||
uint8_t * | dst | ||
) |
Performs forward propagation of Quantized merged convolution algorithm.
- Parameters
-
[in] context - a pointer to Quantized merged convolution context. It must be created by function SimdSynetQuantizedMergedConvolutionInit 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 SimdSynetQuantizedMergedConvolutionExternalBufferSize. Can be NULL (it causes usage of internal buffer). [out] dst - a pointer to output tensor.