ltpf: add Arm Helium (MVE) SIMD backend - #90
Open
JUSTiceMaMo wants to merge 2 commits into
Open
JUSTiceMaMo wants to merge 2 commits into
JUSTiceMaMo wants to merge 2 commits into
Conversation
Add an M-Profile Vector Extension (MVE) backend for the LTPF pitch-detection hotspot, mirroring the existing NEON and Arm-DSP backends. `dot` / `correlate` use vmlaldavaq_s16 (8-lane int16 -> int64 multiply-accumulate); the integer sum and the (v + 32) >> 6 rounding match the scalar reference exactly, so the output is bit-exact. The header is guarded by `#if (__ARM_FEATURE_MVE & 1)` and is inert on non-MVE targets, so existing scalar / NEON / DSP builds are unchanged. Measured on-device (Cortex-M55 @197 MHz, 16 kHz mono LC3 encode): - LTPF correlate: 15105 -> 8370 cyc/frame (about -44%) - encoder output bit-exact vs the scalar path (FNV-1a checksum identical) Signed-off-by: zhangyi101 <zhangyi101@xiaomi.com>
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Add host coverage for the LTPF Arm Helium (MVE) backend, mirroring the existing `test/arm` and `test/neon` suites. Previously the MVE `dot` / `correlate` paths had no automated coverage: the reference tests run the scalar path on x86, and only ARM and NEON had backend unit tests. `test/mve/mve.h` provides a small host emulation of the two intrinsics used by the backend (`vldrhq_s16`, `vmlaldavaq_s16`), matching the `test/neon/neon.h` and `test/arm/simd32.h` approach, so the backend compiles and runs on the CI host. `test/mve/ltpf_mve.c` compiles `ltpf.c` with `TEST_MVE` defined and checks `mve_dot` / `mve_correlate` against the scalar reference for bit-exactness. `ltpf_mve.h` gains a `TEST_MVE` hook (guard opt-in and the `dot` / `correlate` overrides wrapped in `#ifndef TEST_MVE`) so both the scalar and MVE versions are visible to the test, and so the MVE backend stays inert while the ARM / NEON tests build. Signed-off-by: zhangyi101 <zhangyi101@xiaomi.com>
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.
Summary
Add an M-Profile Vector Extension (MVE / Arm Helium) backend for the LTPF pitch-detection hotspot, mirroring the existing NEON and Arm-DSP backends.
dot/correlateusevmlaldavaq_s16(8-lane int16 -> int64 multiply-accumulate). The integer sum and the(v + 32) >> 6rounding match the scalar reference exactly, so the output is bit-exact.The header is guarded by
#if (__ARM_FEATURE_MVE & 1)and is inert on non-MVE targets, so existing scalar / NEON / DSP builds are unchanged.Measurements
On-device (Cortex-M55 @197 MHz, 16 kHz mono LC3 encode):
correlate: 15105 -> 8370 cyc/frame (~ -44%)Testing
make testpasses locally.