Skip to content

chore(mp3): re-baseline the fixed-point codegen bounds after the DCT-32 rework - #4148

Merged
zackees merged 2 commits into
masterfrom
fix/mp3-audit-codegen-rebaseline
Sep 3, 2026
Merged

zackees merged 2 commits into
masterfrom
fix/mp3-audit-codegen-rebaseline

Conversation

@zackees

@zackees zackees commented Sep 3, 2026 •

Copy link
Copy Markdown
Member

Summary

The MP3 CPU audit workflow has been red on master since #4140 merged (see the last comment on #4138):

RuntimeError: minimp3-fixed/codegen/xtensa-esp32/dct32/instructions regressed: 1028 > 332.850000

#4140 re-baselined the exact operation ledger but not the cross-compiled codegen bounds. Every fixed-point kernel moved, and the growth is the speed-for-text trade that PR recorded on purpose (secants folded in as template immediates, force-inlined leaves, DCT-32/IMDCT at -O3). This commits the new bounds.

  • Numbers come from CI's own codec-cpu-current artifact (run 33706008004) and are identical across the last three master runs on two different runner CPUs.
  • check_trend against that artifact passes with the new baseline. Float backend and the operation ledger are untouched.
  • The perf doc's stale polyphase figure range is updated to match.
  • Second commit: the primary host profile for minimp3-fixed also carried pre-perf(mp3): fixed-point decoder is 3.5x faster on an ESP32-C6 #4140 Callgrind numbers (659M instructions, now 330M). The share-of-total gate on L3_huffman tripped on the first runner that gated the fixed backend (its absolute count actually fell 30.9M -> 27.0M) and several symbols changed signature. Refreshed from the same artifact; identical between the EPYC 9V45 and 7763 runs.

Refs #4138.

Test plan

  • PYTEST_ADDOPTS="-k codec_cpu_audit" bash test --py — 27 passed
  • bash lint
  • MP3 CPU audit workflow green on this PR

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation

    • Updated the historical performance documentation with revised instruction-count ranges for the minimp3 decoder.
  • Chores

    • Refreshed codec performance benchmarks across supported processor architectures, including updated measurements for key decoding routines.

…32 rework

The MP3 CPU audit has been red on master since #4140 landed:

    minimp3-fixed/codegen/xtensa-esp32/dct32/instructions regressed: 1028 > 332.85

That PR re-baselined the exact operation ledger (56feaf3) but not the
cross-compiled codegen bounds, and every fixed-point kernel moved. The
growth is the trade #4140 recorded deliberately in 88a0574: the
DCT-32's secants became template arguments folded into the instruction
stream as immediates, the hot leaf helpers are force-inlined, and the
DCT-32 and IMDCT kernels run at -O3 inside the -Os build. Static
instruction count in the kernel symbol goes up; what it bought is the
ESP32-C6 decode going from 142,647 us to 39,385 us and the gap to Helix
from 3.99x to 1.13x, with accuracy unchanged.

Numbers are taken from the CI run's own measured report (codec-cpu-current
artifact from run 33706008004), not re-derived locally, and are identical
across the last three master runs on two different runner CPUs:

    target        dct32 instr / inner   polyphase instr / inner
    xtensa-esp32   317/303 -> 1028/1013   187/0 -> 243/0
    riscv32-esp     47/0   ->   91/0      183/0 ->  90/0
    cortex-m0plus  339/312 ->  959/881    195/0 -> 263/110
    cortex-m4      294/278 ->  531/512     75/0 -> 115/55

check_trend against that artifact passes with this baseline; the float
backend and the operation ledger are untouched.

Refs #4138

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@coderabbitai

coderabbitai Bot commented Sep 3, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: 3a603c3d-7c0d-4b89-ac9b-689c8a7ffa56

📥 Commits

Reviewing files that changed from the base of the PR and between 60f7bcc and 050de6d.

📒 Files selected for processing (2)
  • agents/docs/mp3-decoder-performance.md
  • codec_cpu_trend.json

Included review availability: Your plan provides up to 8 included reviews per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The changes update MP3 decoder instruction-count data for four architectures and revise the related minimp3 polyphase range in the performance documentation.

Changes

MP3 performance metrics

Layer / File(s) Summary
Benchmark data and documentation
codec_cpu_trend.json, agents/docs/mp3-decoder-performance.md
Updated dct32 and polyphase instruction counts for minimp3-fixed across four architectures. Revised the documented minimp3 polyphase range from 75–195 to 90–263.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Merge Risk: ⚪ Minimal · up to 050de

This updates MP3 fixed-point instruction-count references and aligns the related performance documentation. The updated data and documented range are consistent, with no current merge-blocking risk identified.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: updating MP3 fixed-point codegen bounds after the DCT-32 rework.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (2 skipped: 2 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/mp3-audit-codegen-rebaseline

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

The primary host profile for minimp3-fixed still carried the pre-#4140
Callgrind numbers (659M instructions). The fixed-point total halved, so
the share-of-total check on L3_huffman tripped (0.0817 > 0.0492) on the
first runner that gated the fixed backend, even though its absolute
count fell from 30.9M to 27.0M. Several symbols also changed signature.

Numbers come from CI's own codec-cpu-current artifact and are
byte-identical between the EPYC 9V45 and EPYC 7763 runs.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@zackees
zackees merged commit d1da8f3 into master Sep 3, 2026
1 check passed
@fastled-project-sync fastled-project-sync Bot moved this from Triage to Done in FastLED Tracker Sep 3, 2026
@zackees
zackees deleted the fix/mp3-audit-codegen-rebaseline branch November 5, 2026 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant