feat: Expose accumulation mode flag via Conv2dInfo#1289
Open
Sqvid wants to merge 1 commit into
Open
Conversation
Users of the functional and experimental operator convolution APIs, e.g, arm_compute::NEGEMMConv2d, or arm_compute::experimental::op::CpuGemmDirectConv2d, can make use of fp32 accumulation by setting this flag in Conv2dInfo during the validate() and configure() steps. Commit 5e40456 changed the default behaviour of CpuGemmDirectConv2d to accumulate in f32 unless enable_fast_math was set. However, this can produce regressions for users expecting the old behaviour. This change exposes the flag to user directly, making fp32 accumulation opt-in. Change-Id: I3203bdbbfa5152a64438941dd138bab6feb1cec2 Signed-off-by: Siddhartha Menon <siddhartha.menon@arm.com>
gunes-arm
reviewed
May 12, 2026
| bool enable_fast_math{false}; | ||
| unsigned int num_groups{1}; | ||
| WeightsInfo weights_info{}; | ||
| bool use_fp32_acc{false}; |
Contributor
There was a problem hiding this comment.
Can you add an inline comment saying
// Relevant only for Fp16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Users of the functional and experimental operator convolution APIs, e.g,
arm_compute::NEGEMMConv2d, orarm_compute::experimental::op::CpuGemmDirectConv2d, can make use offp32accumulation by setting this flag inConv2dInfoduring thevalidate()andconfigure()steps.Commit 5e40456 changed the default behaviour of
CpuGemmDirectConv2dto accumulate in f32 unless enable_fast_math was set. However, this can produce regressions for users expecting the old behaviour. This change exposes the flag to user directly, making fp32 accumulation opt-in.Change-Id: I3203bdbbfa5152a64438941dd138bab6feb1cec2
cc: @morgolock @gunes-arm