Repository navigation
Promote Hexagon instruction-count ratchet leg to gating - #5
Merged
Merged
Conversation
Neither Debian's qemu-user nor the CodeLinaro toolchain's bundled qemu-hexagon enables TCG plugins, so the icount-ratchet job now builds qemu-hexagon from the pinned QEMU 8.2.2 release with --enable-plugins (linux-user target only, ~4 minutes, cached thereafter; source checksum printed for hard-pinning, same bootstrap as the toolchain pin). The Hexagon ratchet step loses continue-on-error: its first run fails with the measured counts, which then get committed as baselines. Build recipe validated locally end to end except the cross-compiled workloads (CodeLinaro is unreachable from the dev sandbox).
The probe trusted the exit code, but qemu-hexagon exits 1 both with and without plugin support when no guest binary is given (the distinguishing signal is the "unknown option" error text). Run #24 proved the from-source build works — it linked qemu-hexagon and hashed the source — and then failed only on this probe. Also assert the built binary exists before probing, and pin QEMU_SRC_SHA256 from that run.
Run #26 passed the plugin probe but found no cross compiler under ~/hexagon despite a successful 722 MB cache restore, while the same key and lookup work in the hexagon-qemu job. Drop -type f (a symlinked compiler would be invisible to it), assert on the find result instead of dirname's never-empty output (also fixed in hexagon-qemu, where test -n "." could never fail), and dump the tree on failure so the next run tells us what actually got restored.
hexagon-unknown-linux-musl clang 19.1.5 at -O2 under the from-source plugin-enabled qemu-hexagon 8.2.2. The numbers invert the M55 story: float costs ~3.3x the instructions of Q15 (soft-float doubles, no double FPU), confirming the fixed-point datapaths as the performance-appropriate formats on this target.
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.
Makes Hexagon instruction-count gating real, closing the gap left experimental in #4.
The blocker and the fix
Neither Debian's
qemu-usernor the CodeLinaro toolchain's bundledqemu-hexagonis built with TCG plugin support (confirmed: #4's probe skipped, and a local probe of the Debian binary rejects-pluginoutright). So theicount-ratchetjob now builds qemu-hexagon from the pinned QEMU 8.2.2 release with--enable-plugins, linux-user target only — measured ~4 minutes, cached thereafter, so steady-state cost is zero.QEMU_SRC_SHA256), same bootstrap flow as the toolchain pin in Address self-review findings: RT contract, validation, CI hardening #2.continue-on-error: it now gates like the M55 leg.Bootstrap expectations (deliberate, will self-resolve in this PR)
The first CI run will fail the ratchet job twice over, by design:
I'm watching the PR: once that run reports, I'll commit the printed baselines + both pins, and the second run should go green with Hexagon fully gated. Determinism on the Hexagon leg will be confirmed by comparing the bootstrap run's counts against the verification run's.
Validated locally end to end (configure flags, flex/bison deps, plugin acceptance on the built binary) except the cross-compiled workloads themselves — CodeLinaro is unreachable from the dev sandbox, which is exactly why the baselines bootstrap through CI.
https://claude.ai/code/session_01HuAFfoeD5a5Xe5aGNA16M9
Generated by Claude Code