FP32 merged convolution frameworks
A framework to accelerate FP32 merged convolution in Synet Framework. More...
Functions | |
SIMD_API void * | SimdSynetMergedConvolution32fInit (size_t batch, const SimdConvolutionParameters *convs, size_t count, SimdBool add) |
Initilizes FP32 merged convolution algorithm. More... | |
SIMD_API size_t | SimdSynetMergedConvolution32fExternalBufferSize (const void *context) |
Gets size of external temporary buffer required for FP32 merged convolution algorithm. More... | |
SIMD_API size_t | SimdSynetMergedConvolution32fInternalBufferSize (const void *context) |
Gets size of internal buffer used inside FP32 merged convolution algorithm. More... | |
SIMD_API const char * | SimdSynetMergedConvolution32fInfo (const void *context) |
Gets description of internal implementation of FP32 merged convolution algorithm. More... | |
SIMD_API void | SimdSynetMergedConvolution32fSetParams (void *context, const float *const *weight, SimdBool *internal, const float *const *bias, const float *const *params) |
Sets weights, beases and parameters of activation function required for FP32 merged convolution algorithm. More... | |
SIMD_API void | SimdSynetMergedConvolution32fForward (void *context, const float *src, float *buf, float *dst) |
Performs forward propagation of FP32 merged convolution algorithm. More... | |
Detailed Description
A framework to accelerate FP32 merged convolution in Synet Framework.
Function Documentation
◆ SimdSynetMergedConvolution32fInit()
void * SimdSynetMergedConvolution32fInit | ( | size_t | batch, |
const SimdConvolutionParameters * | convs, | ||
size_t | count, | ||
SimdBool | add | ||
) |
Initilizes FP32 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 output to source value.
- Returns
- a pointer to FP32 merged convolution context. On error it returns NULL. It must be released with using of function SimdRelease. This pointer is used in functions SimdSynetMergedConvolution32fExternalBufferSize, SimdSynetMergedConvolution32fInternalBufferSize, SimdSynetMergedConvolution32fInfo, SimdSynetMergedConvolution32fSetParams and SimdSynetMergedConvolution32fForward.
◆ SimdSynetMergedConvolution32fExternalBufferSize()
size_t SimdSynetMergedConvolution32fExternalBufferSize | ( | const void * | context | ) |
Gets size of external temporary buffer required for FP32 merged convolution algorithm.
- Parameters
-
[in] context - a pointer to FP32 merged convolution context. It must be created by function SimdSynetMergedConvolution32fInit and released by function SimdRelease.
- Returns
- size of external temporary buffer required for FP32 merged convolution algorithm.
◆ SimdSynetMergedConvolution32fInternalBufferSize()
size_t SimdSynetMergedConvolution32fInternalBufferSize | ( | const void * | context | ) |
Gets size of internal buffer used inside FP32 merged convolution algorithm.
- Parameters
-
[in] context - a pointer to FP32 merged convolution context. It must be created by function SimdSynetMergedConvolution32fInit and released by function SimdRelease.
- Returns
- size of internal buffer used inside FP32 merged convolution algorithm.
◆ SimdSynetMergedConvolution32fInfo()
const char * SimdSynetMergedConvolution32fInfo | ( | const void * | context | ) |
Gets description of internal implementation of FP32 merged convolution algorithm.
- Parameters
-
[in] context - a pointer to FP32 merged convolution context. It must be created by function SimdSynetMergedConvolution32fInit and released by function SimdRelease.
- Returns
- string with description of internal implementation of FP32 merged convolution algorithm.
◆ SimdSynetMergedConvolution32fSetParams()
void SimdSynetMergedConvolution32fSetParams | ( | void * | context, |
const float *const * | weight, | ||
SimdBool * | internal, | ||
const float *const * | bias, | ||
const float *const * | params | ||
) |
Sets weights, beases and parameters of activation function required for FP32 merged convolution algorithm.
- Parameters
-
[in,out] context - a pointer to FP32 merged convolution context. It must be created by function SimdSynetMergedConvolution32fInit and released by function SimdRelease. [in] weight - a pointer to the array with pointers to convolution weights. The array size is determined by number of merged convolutions. [out] internal - a ponter to the array of flags signalized that weights are stored in the internal buffer. The array size is determined by number of merged convolutions. Can be NULL. [in] bias - a pointer to the array with pointers to bias. The array size is determined by number of merged convolutions. Can be NULL. [in] params - a pointer to the array with pointers to parameters of the activation functions (see SimdConvolutionActivationType). The array size is determined by number of merged convolutions. Can be NULL.
◆ SimdSynetMergedConvolution32fForward()
void SimdSynetMergedConvolution32fForward | ( | void * | context, |
const float * | src, | ||
float * | buf, | ||
float * | dst | ||
) |
Performs forward propagation of FP32 merged convolution algorithm.
- Parameters
-
[in] context - a pointer to FP32 merged convolution context. It must be created by function SimdSynetMergedConvolution32fInit and released by function SimdRelease. [in] src - a pointer to input image. [out] buf - a pointer to external temporary buffer. The size of the external temporary buffer is determined by function SimdSynetMergedConvolution32fExternalBufferSize. Can be NULL (it causes usage of internal buffer). [out] dst - a pointer to output image.