Skip to content

Euclid 0.1.6-experimental: octabam's DSP speed-ups, same output (unit test owed) - #2057

Closed
repeat98 wants to merge 3 commits into
mainfrom
octabam-fast/euclid
Closed

repeat98 wants to merge 3 commits into
mainfrom
octabam-fast/euclid

Conversation

@repeat98

Copy link
Copy Markdown
Owner

Euclid 0.1.6-experimental (repeat98's module; octabam credited). Opened as a draft at the author's request (owner, 23 November 2026). Same sound, fewer DSP cycles: octabam's three EUCLID speed-ups from its DSP audit by Yves Rosius (sambanks/octabam, MIT, Copyright (c) 2026 Sam Banks), on Modwerk's 0.1.5 with its #1690 AMP-gain fix.

What changed (filter.asm, all 7 upstream hunks apply with patch -F0)

  • c58a9288: the frame advance at the end of both sample loops is one lua (r0+$2),r0 in place of move #>$2,n0 / move (r0)+n0 / move #>$1,n0.
  • 358517b1: the parked input is taken from x0 (move x0,x1) instead of reloaded from x:(r7+$1d), filling an arithmetic gap.
  • 07441326: three #>$7f0000,x0 loads are the one-word short immediate #$7f,x0.
  • Release: version in the manifest, catalogue and package row, the changelog entry, the scan record. main merged in (base 0.8).

Same output (emulator)

Widened identity gate (#2020), reference stamped on main's 0.1.5 in this tree after the merge: IDENTICAL, 41 of 41 settings, no instance-block difference (own slot and the other, payload B, 15- and 16-sample blocks, 2 s, ramp, stereo, split).

Cost

0.1.5 0.1.6
Cycle scan, dearest (RATE 1/32, defaults), cycles a sample 232.4 223.4 (-9.1)
of them stalls 25.2 20.2
executed instructions a sample 141.8 139.8
program words (cycle_count.py) 363 352

The DSP-admission figure stays cycles 143, cyclesKind: executed: executed instructions go 141.8 -> 139.8, so the declaration still covers them and DSP FULL charges the same (250). The saving shows in DSP FULL only with a hardware figure from the unit.

On the unit: owed

Not tested on a unit: the session ended (the owner moved to another machine) before its turn in the unit queue. Ready for it: a private build of this source (module:dev --build-only, plain runtime path, SHA-256 1d959ca92e74e45da6b7d2cbfe6dacdd705a9b6875adf6c3dd249c9e59752fb4), a development twin of main after the 0.8 merge, and the run script (~/.cache/modwerk-local/upstream-survey-2026-11-23/dsp-modules/unit-eu/eu-unit.sh): note the unit as found, RAM boot the twin, device:test with a 300 s soak while health is read every 15 s, device:price of published 0.1.5 and of 0.1.6 on the same scene, then boot back to what was running. Owed in particular: the new frame advance is a lua right before the loop end, and the chip manual does not say whether a lua destination interlocks, so a long play on the unit (DSP frames at the audio rate, no stall, the pattern in time) is the check the emulator cannot make.

Blocked on the owner: the build approval

sdk/approvals/euclid-build-approval.json binds 0.1.5's exact source, and only the owner writes it, so modules:generate, modules:import and module:doctor refuse 0.1.6 until it is updated. Not done here for that reason: modules:generate, the isolated Docker build and import, octatrack:module-packages (the committed 0.1.6-experimental.mwrm, 0.1.5's removed), the standalone recipe re-pin for Euclid (and Tape Echo's, which pins the same shared inputs), module:doctor, pr:ready. CI fails on it until then, and on the generated catalogue lagging the changelog. Proposed approval, as 0.1.5's with:

"version": "0.1.6-experimental",
"sourceSha256": "5c76eb1d1f9d2f69bb90b6c8ad281746605b8d7abf705d0469d736b861781ed8",
"approvedOn": "<date>",
"ownerStatement": "<your words>",
"reason": "0.1.5 with octabam's three EUCLID speed-ups (c58a9288, 358517b1, 07441326): bit-identical to 0.1.5 under the widened identity gate (41 of 41 settings, instance block included). OT pages and controls unchanged, so the 0.1.3 captures are retained. Current-build hardware, chip worst-case timing and complete memory bounds stay waived for this exact version only."

(same waived list and retainedUiVersion as 0.1.5). After that an agent can finish the package and recipe steps on this branch and run the procedure's steps 1-5.

None of octabam's speed-ups has a unit reading upstream (emulator only). The unit section above is this change's.

Edge cases

Case Why this change makes it a risk How run Result
Frame advance by lua before the loop end the manual does not say whether a lua destination interlocks; a wrong r0 would garble or misplace frames on hardware only long play on the unit with health reads not run: owed (unit queue)
Trig splits and block sizes the loop end changed identity gate split/, f16/ pass (emulator)
Payload B, core 1 same code on both cores identity gate B/ pass (emulator)
TYPE passing AMP (#1690) the AMP path's loop end changed too identity gate ramp (TYPE steps through AMP) pass (emulator)
Many instances, Part switches, install and rollback the package changed device:test not run: owed
DSP load against 0.1.5 the point of the change device:price both, same scene not run: owed
Sound by ear, Keep, power cycle, MKI a person at the unit the submitter's stage 12 not run

🤖 Generated with Claude Code

repeat98 and others added 3 commits November 23, 2026 09:05
…o version yet)

octabam's DSP audit (Yves Rosius, sambanks/octabam, MIT, Copyright (c) 2026 Sam Banks)
sped up EUCLID without changing its output: c58a9288 (the frame advance as one lua), 358517b1 (the parked input from its register), 07441326 (three short immediates). The upstream diff
cc7cffc1..d33d5175 of filter.asm applies to Modwerk's copy with patch -F0, every hunk.

Identity: sdk/cycle-scan/verify_ident.py (the widened gate, branch
tooling/widened-identity-gate), reference stamped on main 9ab3511:
IDENTICAL, 41 of 41 settings bit-identical, no instance-block difference.

Cycle scan (modelled, DSP56300FM Table A-1 and the A.2/3.5 stalls, dearest setting
RATE=1/32, defaults): 232.44 -> 223.38 (-9.1) cycles a sample. Program words 363 -> 352
(cycle_count.py). The scan record is refreshed for the new source.

Not done here, for the author's release: the version, release notes, package rebuild,
and the test procedure on a unit. None of octabam's speed-ups has a unit reading
upstream: they are proven in dsp_host only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… octabam's speed-ups

Identity gate against main's 0.1.5 after the 0.8 merge: IDENTICAL, 41/41, no
instance-block difference. Scan 232.4 -> 223.4 cycles a sample. Declared 143
executed instructions unchanged (executed 141.8 -> 139.8). Speed-ups by Yves
Rosius, sambanks/octabam (MIT, Copyright (c) 2026 Sam Banks).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@repeat98

Copy link
Copy Markdown
Owner Author

Version clash with #1868, which is also Euclid 0.1.6-experimental. Owner's call (23 Nov 2026): #1868 keeps 0.1.6, because its package (affa5eda…) is the one measured resting on base 0.8 (at rest +0 against +1.5 frame points for 0.1.5, in use about +5.1 for both). This PR becomes 0.1.7-experimental once #1868 has shipped: refresh it on main then, so 0.1.7 carries both the rest change and these speed-ups, and rerun the identity gate on that tree.

repeat98 added a commit that referenced this pull request Nov 25, 2026
…es rebuilt

Joins #1868 (detours rest while no slot uses it) and #2057 (octabam's three
DSP speed-ups) on main 75a8c5c. Packages rebuilt in the pinned image and
imported; Euclid's and Tape Echo's standalone recipes re-pinned to the new
dsp-packages.json and filter.asm; octatrack:module-packages --check identical.
Published package 27263940. At rest on a 0.8.1 dev twin (MKII): +1.1 -> +0.0
points of the frame interrupt. Release approval for 0.1.6 still to come.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@repeat98

Copy link
Copy Markdown
Owner Author

Closed into #1868: Euclid 0.1.6 now ships the resting detours and these three speed-ups as one release (owner, 25 November 2026). The speed-up commits are merged there unchanged.

@repeat98 repeat98 closed this Nov 25, 2026
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.

1 participant