BF16 merged convolution frameworks
A framework to accelerate BF16 merged convolution in Synet Framework. More...
Functions | |
SIMD_API void * | SimdSynetMergedConvolution16bInit (size_t batch, const SimdConvolutionParameters *convs, size_t count, SimdBool add) |
Initilizes BF16 merged convolution algorithm. More... | |
SIMD_API size_t | SimdSynetMergedConvolution16bExternalBufferSize (const void *context) |
Gets size in bytes of external temporary buffer required for BF16 merged convolution algorithm. More... | |
SIMD_API size_t | SimdSynetMergedConvolution16bInternalBufferSize (const void *context) |
Gets size in bytes of internal buffer used inside BF16 merged convolution algorithm. More... | |
SIMD_API const char * | SimdSynetMergedConvolution16bInfo (const void *context) |
Gets description of internal implementation of BF16 merged convolution algorithm. More... | |
SIMD_API void | SimdSynetMergedConvolution16bSetParams (void *context, const float *const *weight, const float *const *bias, const float *const *params) |
Sets weights, beases and parameters of activation function required for BF16 merged convolution algorithm. More... | |
SIMD_API void | SimdSynetMergedConvolution16bForward (void *context, const uint8_t *src, uint8_t *buf, uint8_t *dst) |
Performs forward propagation of BF16 merged convolution algorithm. More... | |
Detailed Description
A framework to accelerate BF16 merged convolution in Synet Framework.
Function Documentation
◆ SimdSynetMergedConvolution16bInit()
void * SimdSynetMergedConvolution16bInit | ( | size_t | batch, |
const SimdConvolutionParameters * | convs, | ||
size_t | count, | ||
SimdBool | add | ||
) |
Initilizes BF16 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 BF16 merged convolution context. On error it returns NULL. It must be released with using of function SimdRelease. This pointer is used in functions SimdSynetMergedConvolution16bExternalBufferSize, SimdSynetMergedConvolution16bInternalBufferSize, SimdSynetMergedConvolution16bInfo, SimdSynetMergedConvolution16bSetParams and SimdSynetMergedConvolution16bForward.
◆ SimdSynetMergedConvolution16bExternalBufferSize()
size_t SimdSynetMergedConvolution16bExternalBufferSize | ( | const void * | context | ) |
Gets size in bytes of external temporary buffer required for BF16 merged convolution algorithm.
- Parameters
-
[in] context - a pointer to BF16 merged convolution context. It must be created by function SimdSynetMergedConvolution16bInit and released by function SimdRelease.
- Returns
- size in bytes of external temporary buffer required for BF16 merged convolution algorithm.
◆ SimdSynetMergedConvolution16bInternalBufferSize()
size_t SimdSynetMergedConvolution16bInternalBufferSize | ( | const void * | context | ) |
Gets size in bytes of internal buffer used inside BF16 merged convolution algorithm.
- Parameters
-
[in] context - a pointer to BF16 merged convolution context. It must be created by function SimdSynetMergedConvolution16bInit and released by function SimdRelease.
- Returns
- size in bytes of internal buffer used inside BF16 merged convolution algorithm.
◆ SimdSynetMergedConvolution16bInfo()
const char * SimdSynetMergedConvolution16bInfo | ( | const void * | context | ) |
Gets description of internal implementation of BF16 merged convolution algorithm.
- Parameters
-
[in] context - a pointer to BF16 merged convolution context. It must be created by function SimdSynetMergedConvolution16bInit and released by function SimdRelease.
- Returns
- string with description of internal implementation of BF16 merged convolution algorithm.
◆ SimdSynetMergedConvolution16bSetParams()
void SimdSynetMergedConvolution16bSetParams | ( | void * | context, |
const float *const * | weight, | ||
const float *const * | bias, | ||
const float *const * | params | ||
) |
Sets weights, beases and parameters of activation function required for BF16 merged convolution algorithm.
- Parameters
-
[in,out] context - a pointer to BF16 merged convolution context. It must be created by function SimdSynetMergedConvolution16bInit 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. [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.
◆ SimdSynetMergedConvolution16bForward()
void SimdSynetMergedConvolution16bForward | ( | void * | context, |
const uint8_t * | src, | ||
uint8_t * | buf, | ||
uint8_t * | dst | ||
) |
Performs forward propagation of BF16 merged convolution algorithm.
- Parameters
-
[in] context - a pointer to BF16 merged convolution context. It must be created by function SimdSynetMergedConvolution16bInit and released by function SimdRelease. [in] src - a pointer to input image. [out] buf - a pointer to external temporary buffer. The size in bytes of the external temporary buffer is determined by function SimdSynetMergedConvolution16bExternalBufferSize. Can be NULL (it causes usage of internal buffer). [out] dst - a pointer to output image.