Skip to content

feat: Expose accumulation mode flag via Conv2dInfo#1289

Open
Sqvid wants to merge 1 commit into
ARM-software:mainfrom
Sqvid:conv2d-acc-mode
Open

feat: Expose accumulation mode flag via Conv2dInfo#1289
Sqvid wants to merge 1 commit into
ARM-software:mainfrom
Sqvid:conv2d-acc-mode

Conversation

@Sqvid
Copy link
Copy Markdown
Contributor

@Sqvid Sqvid commented May 12, 2026

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

cc: @morgolock @gunes-arm

@Sqvid Sqvid force-pushed the conv2d-acc-mode branch from cb5c54d to 2d8f125 Compare May 12, 2026 11:33
@Sqvid Sqvid changed the title feat: expose accumulation mode flag via Conv2dInfo feat: Expose accumulation mode flag via Conv2dInfo May 12, 2026
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>
bool enable_fast_math{false};
unsigned int num_groups{1};
WeightsInfo weights_info{};
bool use_fp32_acc{false};
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.

Can you add an inline comment saying
// Relevant only for Fp16

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.

2 participants