Skip to content

Decouple floating-point loop unrolling from DSP extensions - #332

Open
sylvesterkaczmarek wants to merge 1 commit into
ARM-software:mainfrom
sylvesterkaczmarek:fix/filtering-float-unroll-193
Open

Decouple floating-point loop unrolling from DSP extensions#332
sylvesterkaczmarek wants to merge 1 commit into
ARM-software:mainfrom
sylvesterkaczmarek:fix/filtering-float-unroll-193

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown

Summary

  • select the loop-unrolled scalar implementations of arm_conv_f32, arm_conv_partial_f32, arm_correlate_f32, and arm_correlate_f16 using ARM_MATH_LOOPUNROLL
  • retain the existing NEON selection for the f32 functions and the autovectorisation fallback for f16
  • update the closing preprocessor comments to describe the actual conditions

Context

ARM_MATH_DSP represents integer DSP extensions and does not determine whether these floating-point implementations can use manual loop unrolling. The existing outer guards therefore prevent ARM_MATH_LOOPUNROLL from selecting the unrolled scalar path unless ARM_MATH_DSP is also defined.

This change makes the outer selection consistent with the loop-unroll option discussed in #193 while leaving the algorithms unchanged.

Fixes #193.

Validation

  • git diff --check
  • compiled all four affected translation units with GCC 13.3.0 and -Wall -Wextra -Werror -Wmissing-prototypes under:
    • ARM_MATH_LOOPUNROLL
    • plain scalar configuration
    • ARM_MATH_DSP without loop unrolling
    • ARM_MATH_LOOPUNROLL with ARM_MATH_AUTOVECTORIZE
  • linked the patched unrolled and scalar implementations under separate symbols and compared representative results for f32 convolution, f32 partial convolution, f32 correlation, and f16 correlation; all outputs matched within the selected floating-point tolerances

The CMake-based repository suite was not run because CMake is unavailable in the local environment.

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.

There are several functions in the FilteringFunctions that should not have DSP extended macros.

1 participant