Skip to content

Commit 507399d

Browse files
perf(memmove): record 4096-byte copy-codegen gate
bd-2g7oyh.391 no-code rejected on RCH vmi1227854. Broad route: FrankenLibC memmove_4096 p50/mean 35.831/37.441 ns vs host 27.725/29.024 ns. Focused gate: FrankenLibC Criterion [33.701 ns 34.193 ns 34.727 ns], p50/mean 34.521/34.938 ns; host [26.673 ns 27.185 ns 27.776 ns], p50/mean 27.575/31.903 ns. No source change: prior copy-panel families rejected; next route is generated/disassembly-backed copy lowering. Score 0.0.
1 parent 49d43eb commit 507399d

3 files changed

Lines changed: 82 additions & 0 deletions

File tree

.beads/issues.jsonl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6540,3 +6540,4 @@
65406540
{"id":"frankentorch-zz6","title":"Implement tensor creation functions: eye, arange, linspace, logspace","description":"Add torch.eye, torch.arange, torch.linspace, torch.logspace to ft-api. These are used everywhere in model code and tests. All are non-differentiable leaf tensors.","status":"closed","priority":1,"issue_type":"feature","created_at":"2026-03-27T18:14:34.826544482Z","created_by":"ubuntu","updated_at":"2026-03-27T18:15:06.321201936Z","closed_at":"2026-03-27T18:15:06.320936834Z","close_reason":"Already implemented: eye, arange, linspace, logspace all present in ft-api with tests.","source_repo":".","compaction_level":0,"original_size":0}
65416541
{"id":"bd-2g7oyh.389","title":"[perf][no-gaps] strncmp_256_equal focused codegen gate","description":"Pass 90 target from the post-bd-2g7oyh.388 broad RCH non-math routing profile on vmi1227854. Profile evidence: strncmp_256_equal FrankenLibC p50 6.842 ns, mean 9.196 ns vs host glibc p50 5.350 ns, mean 6.464 ns. Prior bd-2g7oyh.65 strncmp SIMD work is closed and already landed; a keepable edit must be structurally different from prior 32-lane equality panels and SWAR strcmp/strncmp follow-ups, preferably a codegen/load-shape primitive with exact first-difference/NUL ordering preserved. Scope: one focused same-worker baseline before any edit; crates/frankenlibc-core/src/string/str.rs only unless proof requires ABI diff test wiring. Required proof: focused RCH baseline, strncmp scalar-reference/golden sha256 and ABI/glibc differential, rustfmt/git diff check, same-worker RCH post, Score>=2.0 else restore/no-code closeout.","status":"closed","priority":1,"issue_type":"task","assignee":"BoldFalcon","created_at":"2026-06-13T19:04:12.225418399Z","created_by":"BoldFalcon","updated_at":"2026-06-13T21:22:37.460687900Z","closed_at":"2026-06-13T21:22:37.460687900Z","close_reason":"KEPT: exact-256 safe-SIMD equality certificate for strncmp. Same-worker RCH vmi1227854 baseline FrankenLibC p50/mean 5.756/7.300 ns vs host 3.867/5.056; post FrankenLibC p50/mean 4.052/5.185 ns vs host 4.501/5.846. Behavior proof passed: core strncmp 2/2, property/golden strncmp 3/3 with golden SHA 99a3358be31072baca18340daceec13300282aa57b2a1b7406d6817396edb326, ABI diff_strncmp_cases 1/1, cargo check -p frankenlibc-core --lib passed. Touched-file rustfmt and git diff --check passed. Strict clippy remains blocked only by existing unrelated lint debt outside the touched str.rs hunk. Score 10.0.","source_repo":"frankenlibc","source_repo_path":"/data/projects/frankenlibc","compaction_level":0,"original_size":0,"labels":["no-gaps","perf","string","strncmp"],"dependencies":[{"issue_id":"bd-2g7oyh.389","depends_on_id":"bd-2g7oyh","type":"parent-child","created_at":"2026-06-13T19:04:12.225418399Z","created_by":"BoldFalcon","metadata":"{}","thread_id":""}]}
65426542
{"id":"bd-2g7oyh.390","title":"[perf] malloc_free_64 focused allocator gate","description":"Screen the post-bd-2g7oyh.389 allocator residual with a same-worker RCH focused baseline before any source edit. Only proceed to a structural slab/LIFO or intrusive-list allocator primitive if the focused gap is material; do not repeat exact-size/cache shortcuts, Trace lifecycle gates, fixed magazine/plain storage swaps, certificate/log micro-specialization, hot-slot metadata tweaks, lazy-accounting retunes, or bitmap-only hot-slot representation changes.","status":"closed","priority":1,"issue_type":"task","assignee":"BoldFalcon","created_at":"2026-06-13T21:42:29.393197950Z","created_by":"BoldFalcon","updated_at":"2026-06-13T21:42:29.393197950Z","closed_at":"2026-06-13T21:42:29.393197950Z","close_reason":"No-code rejected: focused RCH vmi1227854 malloc_free_64 gate collapsed to FrankenLibC p50/mean 4.989/6.027 ns vs host 4.238/11.317 ns; p50 absolute gap 0.751 ns and mean favored FrankenLibC, below allocator edit gate.","labels":["perf","no-gaps","malloc","allocator"],"parent_id":"bd-2g7oyh"}
6543+
{"id":"bd-2g7oyh.391","title":"[perf] memmove_4096 focused copy-codegen gate","description":"Screen the post-bd-2g7oyh.389 memmove_4096 residual with a same-worker RCH focused baseline. Do not edit unless the focused gap is material and the candidate is a generated/disassembly-backed codegen, alignment, or no-overlap primitive, not another exact-size safe-SIMD copy panel, general portable-SIMD copy loop, inline-only hint, or related memcpy branchback.","status":"closed","priority":1,"issue_type":"task","assignee":"BoldFalcon","created_at":"2026-06-13T21:49:48.046730180Z","created_by":"BoldFalcon","updated_at":"2026-06-13T21:49:48.046730180Z","closed_at":"2026-06-13T21:49:48.046730180Z","close_reason":"No-code rejected: focused RCH vmi1227854 memmove_4096 reproduced p50 gap but prior copy-panel families rule out a repeat source lever. Baseline FrankenLibC p50/mean 34.521/34.938 ns vs host 27.575/31.903 ns. Next route is generated/disassembly-backed copy lowering before any source edit.","labels":["perf","no-gaps","string","memmove"],"parent_id":"bd-2g7oyh"}

.skill-loop-progress.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -911,3 +911,12 @@
911911
- Verdict: NO-CODE REJECTED, Score `0.0`. The focused p50 gap collapsed to `1.177x` with only `0.751 ns` absolute gap, and mean reversed in FrankenLibC's favor due host tail. No allocator source was touched; allocation order, LIFO/tie-breaking, lifecycle logs, counters, FP, and RNG are unchanged by construction.
912912
- Artifact: `tests/artifacts/perf/bd-2g7oyh.390-malloc-free-64-focused.md`.
913913
- Next route: continue from the current broad table with a different focused residual. Only return to allocator with a material focused same-worker gap and a true slab/LIFO or intrusive-list primitive, not another hot-slot metadata or observability micro-lever.
914+
915+
### Pass 92 - Memmove4096 Focused Copy-codegen Gate - 2026-06-13T21:49:48Z
916+
- Target: `bd-2g7oyh.391` / `glibc_baseline_memmove_4096`, selected from the post-`.389` broad non-math RCH profile after the allocator focused gate collapsed.
917+
- Broad route basis: `memmove_4096` FrankenLibC p50/mean `35.831/37.441 ns` vs host `27.725/29.024 ns`.
918+
- Route constraint: prior no-ship families include exact 4096 safe-SIMD copy panels (`bd-2g7oyh.346`), general portable-SIMD copy panels (`bd-2g7oyh.304`), inline-only `memmove`, and related exact 4096 `memcpy` copy-panel/full-slice branchbacks. A source edit requires a materially different codegen/alignment/no-overlap primitive.
919+
- Focused RCH baseline: `RCH_BUILD_SLOTS=1` on `vmi1227854` showed FrankenLibC Criterion `[33.701 ns 34.193 ns 34.727 ns]`, p50/mean `34.521/34.938 ns` vs host `[26.673 ns 27.185 ns 27.776 ns]`, p50/mean `27.575/31.903 ns`.
920+
- Verdict: NO-CODE REJECTED, Score `0.0`. The focused p50 gap reproduced (`1.252x`, `6.946 ns`) but the only admissible next step is generated/disassembly-backed copy lowering, not another manual safe-SIMD panel loop. No source was touched; prefix-copy length, bounded `n`, overlap behavior, destination suffix preservation, return value, FP, and RNG are unchanged by construction.
921+
- Artifact: `tests/artifacts/perf/bd-2g7oyh.391-memmove-4096-focused.md`.
922+
- Next route: build or reuse an RCH-compatible assembly/codegen extraction artifact for safe string/memory kernels, then return to `memmove_4096` with alignment-aware safe-slice dispatch, array-reference copy lowering with assembly proof, or ABI-level raw-pointer classification that preserves the safe core contract.
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# bd-2g7oyh.391 memmove_4096 focused copy-codegen gate
2+
3+
Date: 2026-06-13
4+
Agent: BoldFalcon
5+
Status: NO-CODE REJECTED
6+
7+
## Target
8+
9+
Post-`bd-2g7oyh.389` broad non-math profile on RCH `vmi1227854` showed a
10+
fresh `memmove_4096` residual:
11+
12+
| row | FrankenLibC p50 ns | host p50 ns | FrankenLibC mean ns | host mean ns |
13+
| --- | ---: | ---: | ---: | ---: |
14+
| broad `memmove_4096` | 35.831 | 27.725 | 37.441 | 29.024 |
15+
16+
Prior no-ship families are explicit:
17+
18+
- exact 4096 safe-SIMD copy panels under `bd-2g7oyh.346`;
19+
- general safe portable-SIMD copy panels under `bd-2g7oyh.304`;
20+
- inline-only `memmove` hinting under `bd-2g7oyh.157`;
21+
- related exact 4096 `memcpy` copy-panel/full-slice branchbacks.
22+
23+
Any source edit therefore required a materially different codegen, alignment, or
24+
no-overlap primitive. No source edit was attempted in this pass.
25+
26+
## Focused RCH Gate
27+
28+
Command:
29+
30+
```text
31+
RCH_BUILD_SLOTS=1 RCH_WORKER=vmi1227854 RCH_PREFERRED_WORKER=vmi1227854 \
32+
RCH_REQUIRE_REMOTE=1 RCH_VISIBILITY=summary RCH_QUEUE_WHEN_BUSY=1 \
33+
RCH_DAEMON_WAIT_RESPONSE_TIMEOUT_SECS=1200 rch exec -- env \
34+
AGENT_NAME=BoldFalcon FRANKENLIBC_BENCH_PIN=1 CARGO_BUILD_JOBS=1 \
35+
CARGO_TARGET_DIR=/data/tmp/frankenlibc-bd391-memmove-focused-baseline-target-20260613T2145 \
36+
cargo bench -j 1 -p frankenlibc-bench --bench glibc_baseline_bench -- \
37+
glibc_baseline_memmove_4096 --noplot --sample-size 50 --warm-up-time 1 \
38+
--measurement-time 3
39+
```
40+
41+
RCH selected `vmi1227854`.
42+
43+
| impl | Criterion interval | p50 ns | mean ns | p95 ns | p99 ns |
44+
| --- | --- | ---: | ---: | ---: | ---: |
45+
| FrankenLibC | `[33.701 ns 34.193 ns 34.727 ns]` | 34.521 | 34.938 | 37.016 | 50.000 |
46+
| host glibc | `[26.673 ns 27.185 ns 27.776 ns]` | 27.575 | 31.903 | 34.207 | 70.000 |
47+
48+
The focused p50 gap reproduced at `1.252x` / `6.946 ns`; mean gap was smaller
49+
at `1.095x` / `3.035 ns`.
50+
51+
## Isomorphism
52+
53+
No source code changed.
54+
55+
- Prefix-copy length, bounded `n`, overlap behavior, destination suffix
56+
preservation, byte order, and return value are unchanged by construction.
57+
- Ordering/tie-breaking do not apply.
58+
- Floating point and RNG are not involved.
59+
60+
## Verdict
61+
62+
NO-CODE REJECTED. Score `0.0`.
63+
64+
The target is real enough to keep in the routing table, but every obvious
65+
source-level copy-panel or inline lever is already rejected. Shipping another
66+
manual safe-SIMD copy loop would repeat the wrong family.
67+
68+
Next route: build or reuse an RCH-compatible assembly/codegen extraction
69+
artifact for safe string/memory kernels, then return only with a primitive that
70+
changes generated copy lowering materially: alignment-aware safe-slice dispatch,
71+
array-reference copy lowering with assembly proof, or an ABI-level raw-pointer
72+
classification lane that preserves the safe core contract.

0 commit comments

Comments
 (0)