diff --git a/arm_compute/runtime/FunctionDescriptors.h b/arm_compute/runtime/FunctionDescriptors.h index 4691b059fb..2eccb01fa6 100644 --- a/arm_compute/runtime/FunctionDescriptors.h +++ b/arm_compute/runtime/FunctionDescriptors.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2023, 2025 Arm Limited. + * Copyright (c) 2019-2023, 2025-2026 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -67,13 +67,15 @@ struct Conv2dInfo const ActivationLayerInfo &act_info, bool enable_fast_math, unsigned int num_groups, - const WeightsInfo &weights_info = WeightsInfo()) + const WeightsInfo &weights_info = WeightsInfo(), + bool use_fp32_acc = false) : conv_info(conv_info), dilation(dilation), act_info(act_info), enable_fast_math(enable_fast_math), num_groups(num_groups), - weights_info(weights_info) + weights_info(weights_info), + use_fp32_acc(use_fp32_acc) { } @@ -83,6 +85,7 @@ struct Conv2dInfo bool enable_fast_math{false}; unsigned int num_groups{1}; WeightsInfo weights_info{}; + bool use_fp32_acc{false}; }; /** Descriptor used by the 3d Convolution function */ diff --git a/src/cpu/operators/CpuGemmDirectConv2d.cpp b/src/cpu/operators/CpuGemmDirectConv2d.cpp index e1f8225a41..caac7761e2 100644 --- a/src/cpu/operators/CpuGemmDirectConv2d.cpp +++ b/src/cpu/operators/CpuGemmDirectConv2d.cpp @@ -93,7 +93,7 @@ cpu::AsmGemmInfo init_assembly_metadata(const Conv2dInfo &info, bool is_indirect asm_info.fast_mode = info.enable_fast_math; asm_info.fixed_format = info.weights_info.weight_format() != WeightFormat::UNSPECIFIED; asm_info.weight_format = info.weights_info.weight_format(); - asm_info.use_fp32_acc = !info.enable_fast_math; + asm_info.use_fp32_acc = info.use_fp32_acc; return asm_info; } } // namespace