Skip to content

Improve Synet quantized API documentation - #374

Merged
ermig1979 merged 1 commit into
masterfrom
cursor/improve-synet-docs-b301
Jun 8, 2026
Merged

Improve Synet quantized API documentation#374
ermig1979 merged 1 commit into
masterfrom
cursor/improve-synet-docs-b301

Conversation

@ermig1979

Copy link
Copy Markdown
Owner

Summary

  • Improve SimdLib.h Doxygen descriptions for Synet quantized add, concat, convolution, inner product, merged convolution, activation, scale, shuffle, quantize, input conversion and softmax APIs based on current implementation behavior.
  • Add corresponding documentation improvement entries to docs/2026.html.

Testing

  • git diff --check
  • Verified all 40 requested release-note entries are present in docs/2026.html.
  • Verified SimdLib.h non-comment content is unchanged.

Full test suite was not run per request.

Open in Web Open in Cursor 

Co-authored-by: Ihar Yermalayeu <ermig1979@gmail.com>
@ermig1979
ermig1979 marked this pull request as ready for review June 8, 2026 08:07
Copilot AI review requested due to automatic review settings June 8, 2026 08:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the public C API documentation for Synet quantized/activation/conversion functions in SimdLib.h to better reflect current implementation behavior, and records these documentation improvements in the 2026 changelog.

Changes:

  • Expanded Doxygen descriptions and added algorithm/pseudocode snippets for multiple Synet quantized and activation APIs in src/Simd/SimdLib.h.
  • Added corresponding “Description of function …” entries to docs/2026.html.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
src/Simd/SimdLib.h Updates Doxygen docs for Synet quantized/activation/conversion APIs, including new algorithm details.
docs/2026.html Adds 2026 “Improving” entries documenting the API doc updates.

Comment thread src/Simd/SimdLib.h
Comment on lines +9579 to +9581
The current implementation supports equal input shapes. For each element it dequantizes UINT8 inputs
as (value - zero)*scale, adds the two values, applies activation if it is specified and converts the
result to FP32 or UINT8 output. FP32 inputs and outputs ignore the corresponding quantization zero.
Comment thread src/Simd/SimdLib.h
\param [in] bType - a type of input B tensor. It can be ::SimdTensorData32f or ::SimdTensorData8u.
\param [in] bScale - a pointer to quantization scale of input B tensor. Can be NULL (scale is 1.0).
\param [in] bZero - a quantization zero of input B tensor.
\param [in] actType - an activation function type applied after addition. Supported optimized path uses ::SimdConvolutionActivationIdentity or ::SimdConvolutionActivationRelu.
Comment thread src/Simd/SimdLib.h
\short Performs forward propagation of quantized addition algorithm.
\short Performs element-wise quantized addition.

Algorithm's details for UINT8 output:
Comment thread src/Simd/SimdLib.h
Comment on lines +9636 to +9640
for(n = 0; n < num; ++n)
for(s = 0, offset = 0; s < count; offset += size[s], ++s)
for(i = 0; i < size[s]; ++i)
dst[offset + i] = RestrictRange(Round((src[s][n*size[s] + i] + bias[s])*norm[s]*scale[0]) + zero, 0, 255);
\endverbatim
@ermig1979
ermig1979 merged commit 7125033 into master Jun 8, 2026
25 checks passed
@ermig1979
ermig1979 deleted the cursor/improve-synet-docs-b301 branch July 1, 2026 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants