Research prompt: per-request CPU-time instrumentation#388
Draft
Augustas11 wants to merge 1 commit into
Draft
Conversation
Stages a Codex session prompt that will produce a research memo + v0.1 SPEC draft for adding per-request CPU-time measurement to the buyer harness DB, so future sweeps can distinguish CPU-bound vs GPU-bound stage time on Apple Silicon. Diagnostic gate that makes every future perf decision correctly-informed under SPEC-028 speculative decoding load. Also opens a first-principle positioning claim (CPU-bound on Apple Silicon, per shard's 2026-07-03 report) that today is unmeasured. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
Status
DRAFT — RESEARCH PROMPT ONLY, NO IMPLEMENTATION. This PR contains only a Codex session prompt (
specs/RESEARCH_CPU_TIME_INSTRUMENTATION_PROMPT.md) that stages the research + SPEC-drafting work. No code changes.Why this exists
grep -rEln "cpu.time|cpu_time|cpu.util|gpu.util|stage.timing|per.stage.timing" --include='*.go' --include='*.py'returns one spec-doc hit and zero code hits. macprovider measures throughput and TTFT; it does not measure CPU-vs-GPU share of stage time.Critical timing: SPEC-028 (chain speculative decoding) is landing now, adding CPU work per verify round (drafter forward, acceptance sampling). Without CPU-time instrumentation, the next sweep re-run under SPEC-028 will produce winner knobs that are uninterpretable — you cannot tell whether a knob's win came from better compute utilization or from adjacent unrelated variance. Ship this before the class-aware sweep so future perf decisions stay honest.
Second-order value: unlocks a defensible "Apple Silicon is CPU-favored on consumer inference" positioning claim, receipt-backable once measured. Shard's 2026-07-03 report argues consumer fleets are CPU-bound; if that generalizes to M-series unified memory + strong CPU cores, it's a first-principle marketing claim macprovider cannot make today without measuring.
What has to achieve to be considered implemented
Research session runs the prompt in this PR and produces:
docs/research/cpu-time-instrumentation-2026-07.md— memo answering §A–F with citations (measurement mechanism on Apple Silicon, schema change, harness integration, report surface, cross-run reproducibility, publishing surface).specs/SPEC-XXX-cpu-time-instrumentation.mdv0.1-draft — normative FRs (schema change, measurement protocol, overhead budget), non-goals, open questions, acceptance criteria..omc/logs/cpu-time-instrumentation-open-questions-2026-07.md— ≤5 maintainer-input items.SPEC audit — v0.1-draft passes CODE + SECURITY + ARCHITECT audit lanes at 0-CRITICAL / 0-HIGH.
Implementation (separate PR, gated on locked SPEC):
beta/runs.sqlitefor CPU-time measurement (additive schema; existing rows treat NULL as "not measured").beta/harness.pyprobes per-request CPU time with <1% wall-time overhead, measured.beta/report.py::summarize_per_workloadsurfacescpu_share_medianandcpu_share_p95per class per hardware target.Measurable acceptance (in the impl PR's tests):
Do NOT (until gates 1+2 close)
beta/runs.sqliteschema orbeta/harness.py.Related