[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M718NS9M0ATXDBW6KVBBBNTX":3,"skill-same:01M718NS9M0ATXDBW6KVBBBNTX":76},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":46,"repositoryHtmlUrl":47,"repositoryHomepageUrl":48,"ownerHtmlUrl":49,"ownerBlogUrl":48,"ownerDescription":50,"updatedAt":51,"install":52,"resources":65},"01M718NS9M0ATXDBW6KVBBBNTX","nativevnni-gemm-tuning",null,"Tune, benchmark, profile, train, certify, and install Llaminar NativeVNNI M=1 and grouped-verifier dispatch policies across CPU, CUDA, and ROCm. Use for NativeVNNI kernel candidate work, all-format dispatch sweeps, M=1 decode, grouped MTP verifier rows, dense or MoE projection geometry, profiler-informed fitting, Git LFS corpus publication or reuse, exact overlays, generic rules, p95 regret failures, scorer acceleration, generated dispatch .inc files, and validation of heuristic-only ordinary prefill.","Llaminar\u002Fllaminar","Llaminar","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F247404048?v=4","01M718MTZG2TQSA7DEB5DKQDN1","01M718MV06G9CV8S2JMN9XHX8Y",48,"AGPL-3.0","https:\u002F\u002Fgithub.com\u002FLlaminar\u002Fllaminar\u002Fblob\u002Fmaster\u002F.agents\u002Fnativevnni-gemm-tuning\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"nativevnni gemm tuning","tuning","verifier","for","generic","Publication","git","install","benchmark","CPU","decode","work","across","candidate","generated","files","only","lfs","geometry","overlays","2026-11-10 10:12:30",false,"---\nname: nativevnni-gemm-tuning\ndescription: Tune, benchmark, profile, train, certify, and install Llaminar NativeVNNI M=1 and grouped-verifier dispatch policies across CPU, CUDA, and ROCm. Use for NativeVNNI kernel candidate work, all-format dispatch sweeps, M=1 decode, grouped MTP verifier rows, dense or MoE projection geometry, profiler-informed fitting, Git LFS corpus publication or reuse, exact overlays, generic rules, p95 regret failures, scorer acceleration, generated dispatch .inc files, and validation of heuristic-only ordinary prefill.\n---\n\n# NativeVNNI GEMM Tuning\n\nUse the common evidence and policy pipeline. Do not create a backend-local\nheuristic, model-shape override, CSV parser, or installation path.\n\n## Non-Negotiable Invariants\n\n1. Require grouped MTP rows to be byte-identical to independent serial M=1\n   decode rows for every format and backend. Relaxed FP metrics are not an MTP\n   acceptance threshold.\n2. Measure the production kernel path with production graph\u002Fstream modes. Do\n   not disable optimizations to manufacture determinism.\n3. Keep canonical timing separate from profiler launches. `ncu`, rocprofiler,\n   and Linux `perf` replay must never become a latency label.\n4. Retain every measured candidate, raw timing sample, and per-physical-launch\n   profiler record. Do not retain winners only.\n5. Emit exact overlays and generic rules. Exact overlays have runtime\n   precedence, but cannot replace generic coverage or participate in sealed\n   generic certification.\n6. Evaluate measured p95 regret and conservative p95 regret UCB independently\n   in every required generic domain. Production defaults require both to be\n   strictly below 5% in at least 95% of domains. Maximum regret and global cell\n   p95 are diagnostics. A deliberate best-effort transaction may override the\n   p95 and passing-domain percentages through the turnkey flags, but the\n   frozen artifact must record them and every miss must remain explicit. Such\n   an override never relaxes correctness, byte equality, generic totality,\n   evidence completeness, or sealed rule exercise.\n   Final publication distills the complete cross-fitted decision surface using\n   the reviewed global leaf bound, because the union of independent fold\n   boundaries can require more leaves than any fold-local selected complexity.\n   Every over-budget leaf remains visible, owns a real measured generic tree,\n   and participates in untouched sealed generic-only certification.\n7. Keep CPU, CUDA, and ROCm feature and format coverage symmetric. CPU policy\n   identity includes AVX2 build\u002Fruntime, AVX512 build with AVX2 runtime, and\n   AVX512 build\u002Fruntime regimes.\n8. Never install from partial, pointer-only, unprofiled, stale-build, failed-CV,\n   or development-only evidence. Never silently fall back to a serial policy,\n   row replay, CPU fitting, or another scorer after explicit acceleration.\n9. Unit tests launch no GPU work. Put CUDA\u002FROCm execution in integration or\n   performance suites.\n10. Prove dispatch totality independently along every runtime axis. Every\n    positive M must map to exactly one certified bucket, every legal positive\n    `(N,K)` geometry must reach exactly one complementary generic-tree leaf,\n    and every production runtime codebook must own every required domain. CPU\n    generic decode and grouped-verifier rules must additionally dispatch every\n    positive runtime thread count: exact overlays remain scoped to their\n    measured thread regime, while learned wave and tail-utilization predicates\n    evaluate the actual OpenMP team width. Keep focused negative regressions\n    that remove one M domain, one codebook, one tree branch, or positive-thread\n    coverage while exact overlays remain present; installation must reject all\n    four cases.\n\n## Use The Turnkey Transaction\n\nWhen the user explicitly requests an **exact-only refresh**, do not run the\ngeneric fitting transaction below. Retain the installed Auto rules for unseen\nshapes. The CUDA analyzer accepts `--exact-only --require-fast-m1-complete\n--profile production --retain-auto-policy-json \u003Cbase-policy.json>\n--retain-auto-include \u003Cinstalled.inc>` alongside the normal strong timing and\nmeasurement-provenance inputs. This authenticates the base, updates only shared\nproduction-shape M1 exact tables, and preserves the complete Auto\u002Fgrouped code\nverbatim. It does not create a new generic certificate. Keep the immutable base\nartifacts and validate the refreshed M1 arithmetic with the all-format grouped\nbyte gate, affected model parity, isolated resources\u002Fprofiling, and matched\nRelease benchmarks before accepting it. Bare `--exact-only` remains a staging\nartifact with no generic coverage and must not replace production dispatch.\n\nRun one backend end to end:\n\n```bash\nscripts\u002Ftrain_native_vnni_dispatch.sh --backend cuda --install\nscripts\u002Ftrain_native_vnni_dispatch.sh --backend rocm --install\nscripts\u002Ftrain_native_vnni_dispatch.sh --backend cpu --install -- \\\n  --cpu-format-shards\nscripts\u002Ftrain_native_vnni_dispatch.sh --backend all --install \\\n  --minimum-passing-domain-percent 0\n```\n\nThe learned-tree transaction installs dispatch for serial M=1 and grouped\nverifier rows. Ordinary CPU prefill retains its total generic policy. CUDA and\nROCm dense prefill use the separate authenticated exact-overlay transaction\ndescribed below: measured production cells take precedence, while the generic\npolicy remains total for unseen positive M\u002FN\u002FK combinations. Routed CUDA\u002FROCm\nMoE prefill has its own whole-operation exact-overlay transaction. The explicit\n`--backend cpu-prefill` transaction remains available for offline kernel\nresearch and corpus analysis, but `--install` is intentionally rejected.\n\nPass hardware\u002Ftool\u002Flane controls after `--`. Do not pass `--shapes` or\n`--shape-partition`; add production overlays to the shared inventory. The\ndriver owns backend, profile, output path, fit-only flags, and installation.\nThe production exact-overlay matrix is symmetric: every known geometry is\nmeasured for all 21 registry formats at Fast M=1 and grouped-verifier M=2..16\nplus M=31. LM heads participate because both learned surfaces execute them.\nUnmeasured positive grouped M values remain total through generic rules.\n\nUse the focused `qwen-mtp-head` profile when changing the MTP projection or\nterminal-head candidate families and only additive evidence is required:\n\n```bash\nscripts\u002Frefresh_native_vnni_dispatch_tables.sh \\\n  --backend \u003Ccpu|cuda|rocm> --profile qwen-mtp-head \\\n  --output-dir \u003Cwork-dir>\n```\n\nThe profile derives its matrix list from the shared reviewed Qwen 3.5\u002F3.6\nrelease catalog and resolves physical dimensions through the canonical shape\nmanifest. It covers the six distinct hidden widths, both MTP-specific `H x 2H`\nhidden\u002Fembedding projections and `248320 x H` terminal heads, every registry\nformat, Fast M=1, grouped M=2..16, and M=31. Do not replace it with a hardcoded\nsingle-model LM-head list. Ordinary sidecar attention and FFN\u002FMoE matrices are\nowned by the complete release inventory; this focused profile measures only the\ntwo matrix families introduced specifically by the MTP head.\n\nCPU collection automatically uses every detected physical socket. Each MPMD\nrank owns a distinct resumable timing cell and retains the production\nper-socket thread count; set `--cpu-measurement-lanes N` only for deliberate\nisolation.\n\nCPU production refresh is dependency ordered. Certify and install the complete\n`Fast M=1` decode policy first, rebuild both AVX2 and AVX512 trainers against\nthat include, and only then collect grouped-verifier evidence through the\nproduction `Auto` route. Use\n`--stop-after-cpu-decode --install` for this explicit checkpoint. Do not make a\nprefill profiler process bypass an uncertified M=1 selector with a diagnostic\nserial-oracle override; that would profile a non-production path.\nContinue grouped collection in the same output directory with\n`--resume-after-cpu-decode --install`. This continuation authenticates the\nsealed M=1 policy artifact and requires its generated include to match the\ninstalled CPU decode table byte-for-byte before it bypasses decode collection,\nprofiling, and fitting.\n\nEvery CPU timing stage publishes shape\u002Fformat\u002FISA partials atomically. Use\n`--cpu-batch-limit N` to bound one invocation and rerun against the same output\ndirectory to collect only missing partials. Batch limits and\n`--resume-cpu-partials` are execution controls, not corpus-identity inputs;\nthe turnkey driver retains a clean checkpoint and attempts sealing only after\nthe backend's complete production payload inventory exists. M=1 fixture\nsynthesis prepares independent source formats in parallel before timing;\npacked construction and candidate measurements remain format-serial so\nbenchmark kernels never contend. A timing-harness setup optimization requires\na new build identity but must preserve each format's deterministic fixture\nbytes.\nOrdinary-prefill trainers additionally flush after every complete ordered M\nphase. If a later phase is interrupted, the wrapper authenticates aggregate and\ntiming sidecars with the production adapter, requires identical prefixes across\nthe paired socket ranks, and appends only the missing M suffix. A legacy header,\npartial candidate round, non-prefix inventory, or mismatched rank progress is\ndiscarded instead of appended. Final publication still requires the exact full\nplanned M inventory.\n\nPost-freeze CPU-prefill collection coalesces source formats only when geometry,\nISA regime, and ordered M inventory are identical. One process still packs,\nvalidates, and times every format separately, while byte-identical legacy Q8_1\nactivation fixtures are cached by M and format-seed class. Pair MPMD jobs only\ninside equal `(format phase count, M inventory)` groups and retain the runtime\nphase-inventory handshake; grouping by M alone can deadlock at the next format\nphase. Every frozen witness plan must serialize to fewer process jobs without\nlosing or duplicating a format record; lock that equality in a unit regression\nrather than documenting one generation's transient cardinality here.\n\nFit-only CPU-prefill replay keeps the immutable development build provenance\nthrough generic fit and freeze. A newly launched post-freeze seal is a separate\nmeasurement generation: its resume contract and certification context must use\nthe current AVX2\u002FAVX512 trainer digest and current host\u002Fcompiler provenance.\nReject collection when the current production serial-policy hash differs from\nthe frozen development generation; a harness-only rebuild is not permission to\ncertify changed arithmetic.\n\nThe command:\n\n1. computes the shared resolved shape-inventory digest and, for CPU prefill,\n   authenticates the matrix, training plan, split loader, and current split\n   manifest into a backend-specific corpus generation;\n2. rebuilds both CUDA and ROCm leaf-primary scorer DSOs plus the selected\n   backend trainer;\n3. runs both scorer integration equivalence suites;\n4. selects a corpus by backend, architecture, authenticated inventory digest,\n   and collection argument digest;\n5. collects timing and isolated profiler evidence only when no matching corpus\n   exists;\n6. fits the development corpus, requires complete generic-tree totality plus\n   the 95%-of-domains performance quota, freezes the generic digest, opens\n   sealed evidence, applies the same domain quota, emits, validates, and\n   optionally installs the generated include;\n7. seals successful new evidence and atomically publishes it for Git LFS; or\n8. verifies and refits an existing corpus without launching candidate kernels\n   or profilers.\n\nMaximum-regret and passing-domain thresholds are fit-only controls and do not\nparticipate in corpus identity. Changing them must reuse the authenticated raw\ntiming and profiler corpus rather than trigger another measurement sweep.\n\nComplete-tree GPU scoring owns one grow-only graph cache and exact frontier\nworkspace per worker process. The turnkey scheduler therefore defaults to one\npersistent worker lane per physical CUDA or ROCm device. Additional lanes\nduplicate the complete per-lane high-water allocation and require an explicit\nprofile showing a workload-specific gain within the reviewed VRAM budget; do\nnot add lanes merely to create more host workers. Prefer using every distinct\nCUDA and ROCm device before duplicating a device-resident scorer workspace.\nBefore a long fit, run `Perf__NativeVNNIPolicyCrossValidation.py`; its default\nprojection includes both grouped CV and the selected OOF winner's publication\ntournament. A CV-only projection is not evidence for end-to-end fit economy.\n\nUse `scripts\u002Frefresh_native_vnni_dispatch_tables.sh` directly only for focused\ndiagnostic phases, partition collection, or lineage\u002Frefinement work that the\nturnkey driver delegates internally.\n\n## Corpus Rules\n\nPublished generations live at:\n\n```text\ncorpora\u002Fnative_vnni_dispatch\u002F\n  \u003Cbackend>\u002F\u003Carchitecture>\u002F\u003Cshape-digest>-\u003Cconfiguration-digest>\u002F\n```\n\nThe top-level `corpora\u002F` directory is the optional `Llaminar\u002Fcorpora` submodule,\nthe home for all published corpus families. Initialize only for corpus work:\n\n```bash\nGIT_LFS_SKIP_SMUDGE=1 git submodule update --init -- corpora\ngit -C corpora lfs pull --include 'native_vnni_dispatch\u002F\u003Cbackend>\u002F**' --exclude ''\n```\n\n`corpus.manifest.json` is reviewable ordinary Git in the data repository. Large\nCSV, JSON, profiler, trace, and archive payloads use its `.gitattributes` LFS\npolicy. Push the data commit and LFS payloads before updating the source\nrepository's gitlink. Never add corpus payloads to the source repository or\nfetch them during ordinary builds or Unit\u002Fpreflight gates.\nThe corpus sealer\u002Fverifier is:\n\n```bash\nPYTHONPATH=tests\u002Fv2\u002Fperformance\u002Fkernels \\\n  python3 -m native_vnni_dispatch.corpus_bundle verify \\\n    --manifest \u003Ccorpus>\u002Fcorpus.manifest.json \\\n    --repository-root .\n```\n\nReject unresolved LFS pointers, symlinks, `.inprogress` files, missing payloads,\ndigest changes, and stale shape inventories. Collect into the ignored `work\u002F`\nstaging root and publish only after certification. A fit failure must reuse the\nsame immutable timing\u002Fprofiler corpus; generate additional measurements only\nfrom an authenticated refinement or shape-lineage plan.\nThe CPU bundle is one dependency-ordered transaction: it must retain the\ncertified Fast-M1 include, policy, timing, and profiler evidence together with\nthe grouped-verifier include, policy, timing, and profiler evidence. Never\npublish grouped rows without the exact serial policy against which they were\ncompiled and certified.\n\nFit-only replay uses `--skip-sweep --reuse-profiler-evidence`. It may regenerate\ncommon observations and authenticated profiler feature tables. Every profiler\ntransaction also retains an exact compact observation-witness CSV. If an older\ntransaction omitted that file, recover it with `profiler_evidence\ncompact-witnesses --feature-table ...`; the command reconstructs only strict\ncommon-observation columns, verifies their embedded digests, and authenticates\nthem against request\u002Fevidence manifests. It must not run trainer timing tests or\nprofiler collectors. Legacy indented evidence is decoded and authenticated on\nphysical-core-capped workers during this recovery, then rewritten in compact\ncanonical form with the same semantic manifest digest. Later feature export and\ncertification can consequently use direct mmap byte authentication instead of\nrepeating the legacy parse.\n\nAll three backend analyzers use a content-addressed policy fit cache beneath\nthe transaction output directory. Development freeze and the mandatory\npre-seal reconstruction must share that cache so unchanged candidate costs,\ncross-validation folds, and final publication trees are reused; cache keys,\nnot directory presence, decide whether retained work is valid.\n\nWhen a ROCm M=1 development transaction has complete timing and profiler\nevidence but has not yet opened its seal, continue with\n`--reuse-rocm-development --rocm-development-build-change-audit NOTE`. This\nmode retains the original timing provenance, authenticates and re-exports the\nisolated profiler evidence, and collects only the fresh sealed and grouped\nphases. The audit is mandatory because the profiler executable may contain a\nharness-only lifetime fix while the immutable timing rows still belong to the\nolder build. Do not use `--skip-sweep` for this state: the sealed and grouped\ncorpora legitimately do not exist yet.\n\n```bash\nscripts\u002Ftrain_native_vnni_dispatch.sh --backend rocm --install -- \\\n  --reuse-rocm-development \\\n  --rocm-development-build-change-audit \"reviewed harness-only rebuild\"\n```\n\nAfter Fast sealed and grouped-verifier timing are also complete, resume the\nsame workspace through the refresh driver with both `--skip-sweep` and\n`--reuse-rocm-development`. The driver authenticates development provenance\nfrom the immutable development common corpus, sealed provenance from the\ncomplementary Fast common rows, and verifier provenance from the grouped common\ncorpus. It must schedule no timing lane and may resume an exact profiler journal\nafter staging the already certified policy. Never use bare `--skip-sweep` for a\ncross-build ROCm workspace because that would substitute current harness\nmetadata for retained measurements.\n\n```bash\nscripts\u002Frefresh_native_vnni_dispatch_tables.sh \\\n  --backend rocm --profile all --output-dir \u003Cworkspace> --install \\\n  --skip-sweep --reuse-rocm-development \\\n  --rocm-development-build-change-audit \"reviewed harness-only rebuild\"\n```\n\nWhen changing only profiler-model features, assess the cross-fitted teacher\nbefore paying for the complete tree frontier. Add\n`--cpu-prefill-diagnostic-max-leaves 1` to a fit-only\n`--stop-after-cpu-prefill-freeze` replay. Despite that authorization flag's\nhistorical name, diagnostic mode stops immediately after the development-fit\nreport and does not freeze, seal, or install anything. Run the profiler-informed\nhalf normally, then repeat the identical command with\n`--cpu-prefill-ablate-profiler-features`; the reports are retained separately as\n`.profiler-informed` and `.profiler-ablated`. The ablation still authenticates\nthe complete request\u002Fevidence\u002Fwitness catalog and withholds only learner\nfeatures. These options are deliberately rejected for collection, sealing,\ninstallation, and every non-CPU-prefill workflow. The teacher's held choices do\nnot depend on leaf budget; a promising diagnostic can then be rerun at the\ncanonical leaf budget while reusing every durable profiler surface.\n\nBefore either A\u002FB fit, inspect the exact model-visible evidence rather than raw\ncounter JSON:\n\n```bash\nPYTHONPATH=tests\u002Fv2\u002Fperformance\u002Fkernels \\\n  python3 -m native_vnni_dispatch.profiler_diagnostics \\\n    --observation \u003Ccompact-observation-witness.csv> \\\n    --requests \u003Cexact-v4-requests.json> \\\n    --evidence \u003Cexact-v4-evidence.json> \\\n    --output \u003Cprofiler-diagnostics.json> \\\n    --require-meaningful-signal\n```\n\nRequire complete per-candidate contests for the stable instruction\u002Fwork and L1\ntargets, meaningful within-contest variation, and explicit reliability rates\nfor duration-derived targets. Runtime codebook and prepared-family counts must\nmatch the physical execution identities requested by the corpus; source-format\naliases may deduplicate only when their complete prepared launch identity is\nidentical. Never treat a binary reliability flag as a continuous learner\nmetric.\n\nThe same diagnostic calibrates feature value against canonical timing. Within\neach exact `(format, mode, M, N, K)` contest, compare the fastest and slowest\ncandidate only when canonical repeated timing separates them by at least 5%.\nReview metric coverage, median fast-minus-slow movement, and expected-direction\nmatch rate. Keep profiler-duration-derived throughput proxies labeled\nseparately from static resources and dynamic hardware counters: a timing proxy\ncan validate attribution but is not evidence that occupancy, cache behavior,\nor issue efficiency explains the win, and it must not become an auxiliary fit\ntarget beside canonical repeated timing. Collapse correlated GPU ALU\u002FFMA\u002Ftensor\npipe counters into the reviewed aggregate compute-throughput target instead of\ngiving one latent signal several votes. Candidate dispatch count is a static,\nruntime-known model input. A metric that is unavailable across a complete\ncontest, mostly tied, directionally inconsistent, or unchanged in the\nprofiler-informed versus ablated CV run is not a useful dispatch feature.\n\nEvery profiler record belongs to one exact physical production invocation:\nbackend, architecture\u002FISA, operation, bundle, prepared family, packing ABI,\nruntime codebook, effective candidate, execution mode, `M`, ordered projection\n`N` vector, aggregate `N`, and `K`. Generate one request for every measured\nlaunchable point. Deduplicate only true aliases with that complete identity.\nNever broadcast counters from a representative anchor to another work size or\ncandidate, and never average unrelated launches into one descriptor.\n\nFinal CUDA\u002FROCm combined profiler transactions are additive. Seed them from\nthe authenticated development request\u002Fevidence\u002Fwitness triplet, derive exact\nmissing requests from the enlarged sealed\u002Fgrouped observation surface, profile\nonly that delta, and compose atomically. Never re-profile unchanged M=1\ndevelopment launches merely because the final corpus has a different filename.\n\nNsight byte prefixes are decimal: `Kbyte` means 1,000 bytes, not 1,024.\nCollectors export explicit base units; retained scaled CSVs use the same\ncanonical parser. For completed older CUDA batch evidence, use\n`native_vnni_dispatch.profiler_reparse --requests \u003Crequests.json>\n--source-evidence \u003Cevidence.json> --raw-directory \u003Craw-dir>\n--upgrade-in-place`. It authenticates and reparses saved batches without GPU\nwork, preserves a versioned original and lineage receipt, and rejects changes\noutside byte-valued metrics. Never edit counter JSON or relaunch timing to fix\ndisplay units. Finish or explicitly recover an old live journal before this\ncompleted-manifest upgrade; the command will not truncate it. An unavailable\nspill metric is not a zero-spill result: retain separate exact-kernel resource\nand dynamic-spill evidence when the economical collection pass omits it.\n\nCUDA and ROCm collectors amortize profiler injection, device-context creation,\nand fixture preparation across bounded exact-request batches. The collector\nwrites an authenticated TSV plan; the trainer claims every row once and opens\none distinct controlled range around that row's extra production launch. Nsight\npartitions CUDA evidence by the request's explicit stream, while rocprofiler\npartitions the ordered physical trace by its per-request renamed ranges on every\ncounter pass. A successful process must report every planned request exactly\nonce, retain per-member binary and batch provenance, and reject missing,\nduplicate, reordered, non-contiguous, or cross-attributed ranges. Process\nbatching changes setup cost only: it never merges candidate metrics or turns a\nmulti-candidate interval into one profiler record.\n\nFor CPU grouped-verifier evidence, retain the authenticated effective N-block\nchunk width in every observation. Pairwise and WideRows inherit that geometry\nfrom serial M=1 planning, while the full-K row-chunk, N-major, and pair-grid\nfamilies own distinct task grids. Model their producer tasks, waves, final-wave\nutilization, row-tile coverage, and (for K-part routes) ordered reduction work\nseparately. Inferring one family's geometry from another erases the schedule\nsignal the learner needs and can make physically different candidates appear\nidentical.\n\nRequest schema `native-vnni-profiler-request-v5-stratified-exact-point` is the\ncurrent fit contract. Canonical timing remains exhaustive. For every exact\nbackend\u002FISA\u002Fformat\u002Fshape\u002Fmode\u002FM contest, rank its physical candidates by the\ncanonical timing result and profile the fastest 5%, centered median 5%, and\nslowest 5%, with a minimum of one candidate per stratum. Each selected physical\nlaunch is still profiled separately; true launch aliases may share evidence\nonly when every launch-changing field is identical. Historical v3 anchor and\nv4 exhaustive exact-point catalogs remain immutable and readable for\nprovenance, but are not admissible current fit evidence. A replacement\ntransaction is derived from existing canonical timing witnesses and does not\nrepeat canonical timing. Evidence composition rejects incompatible request or\ncollector generations, missing records, conflicting counters, or a profiled\nlaunch whose complete identity differs from its request. Compatible immutable\nraw-profiler feature generations are normalized to the current exporter schema\nduring composition; a feature-engineering change is never authority to\nrelaunch hardware counters.\n\nWhen a final timing corpus extends a previously complete profiler transaction,\ndo not reprofile the covered launch surface. Run `profiler_evidence\nemit-missing-requests` with the final corpus and every covered request\u002Fevidence\nmanifest, collect the emitted exact delta with `--resume --retry-failures`, and\ncompose the transactions only after exact physical-key coverage succeeds. A\nzero-row delta is the proof that the profiler catalog covers the fit corpus.\nThe turnkey driver discovers completed content-addressed deltas that were not\nyet atomically published, authenticates them, and includes them in coverage\nbefore emitting another request. It also resumes when only the durable\n`.inprogress.jsonl` collector journal exists, or when request publication\ncompleted before any final evidence or journal record was written. If corpus\nregeneration changes only representative provenance and therefore derives new\nobservation\u002Frequest IDs, the driver authenticates the old manifest and journal,\npublishes successful terminal members as an immutable subset transaction, and\nsubtracts exact physical-launch coverage before opening a new delta. It never\nrewrites old request IDs, observation digests, command digests, raw-artifact\ndigests, or counters; failed\u002Fmissing journal members remain fresh obligations,\nand overlapping journals contribute only their uncovered physical tail. A\nretained legacy request generation may remain beside a current exact-v4\ntransaction for provenance; authenticate and resume the current manifest\ninstead of copying the legacy generation over it. Audited common-observation\nreuse snapshots its retained input through an atomic reflink copy and never\nrenames away the canonical analyzer input. CPU decode retains one stable\ndevelopment run ID per output directory so a restart reopens the same partial\ntransaction instead of creating a timestamp sibling. Physical resume identity\nignores timing-run provenance but includes arithmetic fingerprint, candidate\npolicy hash, schedule, workspace, prepared resources, threading\u002Fstream mode,\nexecution mode, and exact `M\u002FN\u002FK` geometry.\n\nMigrate the recipe through its authenticated command, not by editing JSON:\n\n```bash\nPYTHONPATH=tests\u002Fv2\u002Fperformance\u002Fkernels \\\n  python3 -m native_vnni_dispatch.cpu_prefill_replay_recipe \\\n  set-primary-profiler \\\n  --recipe \u003Ccorpus>\u002Fcpu_prefill_replay_recipe.v1.json \\\n  --requests \u003Ccorpus>\u002Fcpu_prefill_profiler_requests.aligned.json \\\n  --evidence \u003Ccorpus>\u002Fcpu_prefill_profiler_evidence.aligned.json \\\n  --observations \u003Ccorpus>\u002Fcpu_prefill_profiler_observation_witnesses.aligned.csv \\\n  --clear-additive-profiler-transactions\n```\n\nThe clear flag is required when the replacement transaction completely\nsupersedes incompatible additive catalogs; the command refuses to discard\nthose lineage records implicitly.\n\nThe immutable corpus is the reusable evidence product. A failed fit does not\nauthorize another broad measurement sweep. Refit from the same timing and\nper-candidate profiler records, adjust learner features\u002Fsearch, or append only\nan authenticated refinement plan for named domains. Resume collection from\ncontent-addressed checkpoints; never discard completed cells because one later\nshape is flaky or one fitter configuration changes.\n\nRefinement fits are content-addressed and incremental. Candidate costs\ninvalidate only the changed generic domain. Profiler-informed CV invalidates\nevery codebook and prefill M in the changed cross-M transfer pool because those\ndomains share one surrogate. M is a numeric model feature, not a pool boundary;\nheld-out N\u002FK geometry must be removed across all M and formats before fitting.\nUnrelated ISA, arithmetic-contract, operation, bundle, and execution-mode pools\nmust remain cache hits. Cache CV on normalized model-visible descriptor content\nplus the affected pool's cost identities; keep the full request\u002Fevidence\u002Fcorpus\nprovenance digest in frozen policy metadata. Never put a global additive\ntiming-corpus digest in every domain's CV key. Cache the stable final\npublication leaves with each production CV entry as well; an identical replay\nmust not deserialize candidate costs or rerun final GPU tree fitting for\nunchanged domains.\n\nProfiler-model parallelism covers both feature materialization and independent\nsurfaces. Alias indexing compares cheap source\u002Fmode\u002Fcandidate identities first\nand computes observation SHA-256 only for true ties. Materialize each large\npool's normalized candidate feature index in deterministic contiguous\nphysical-core shards into aligned `float32` inputs, `float64` auxiliary and\nregret targets, N\u002FK anchors, contest IDs, and one point-to-row table. Forked GPU\nworkers inherit those immutable matrices and the point table copy-on-write;\nnever rescan the complete transfer pool for each held-out surface. Run one\npersistent XGBoost CUDA-histogram worker per selected CUDA device. Divide\naffinity-visible physical cores across those workers for quantile construction,\nnever count SMT siblings as additional capacity, and keep explicit worker\u002Fthread\nenvironment variables as diagnostic overrides. Serial and parallel feature\npublication and predictions must remain exactly equal.\n\nPost-accelerator CV reduction is also domain-parallel. The parent groups fold\nresults by generic domain, forks immutable cost\u002Ffold matrices copy-on-write,\nand sends only inherited domain indices to workers. Cap the reduction pool at\nthe affinity-visible physical-core count even when\n`LLAMINAR_NATIVE_VNNI_POLICY_WORKERS` requests more; merge results in canonical\ndomain order and publish fit-cache records only from the parent. With\n`LLAMINAR_NATIVE_VNNI_POLICY_TIMING=1`, require a nonzero\n`cv_reduction_workers` field for an uncached multi-domain fit and compare\n`cv_reduction` separately from device `fold_fit`. Serial and parallel runs over\nthe same evidence must produce identical policy objects and generated bytes.\n\nLarge compact request\u002Fevidence manifests and canonical observation witnesses\nmust also parse and authenticate on the affinity-visible physical cores. Split\nJSON only at top-level record boundaries and CSV only at complete row\nboundaries; preserve source order, verify the unchanged root digest, retain a\nserial compatibility reader for noncanonical legacy JSON, and prove\nserial\u002Fparallel value and tamper-detection equivalence in unit tests.\n\nEvery profiler descriptor retains the exact isolated launch identity, including\n`M`, ordered `N`, aggregate `N`, and `K`. Dynamic counters such as throughput,\nIPC, cache behavior, achieved occupancy, and traffic describe only\nthat exact point; they are never shape-independent candidate constants and are\nnever model inputs for a held\u002Funseen point. Model inputs are runtime geometry,\ncodebook, candidate configuration, analytical schedule geometry, and genuinely\nstatic resource descriptors. Selected exact dynamic metrics are centered\nagainst the other candidates at the same work point and added as standardized\nauxiliary targets beside log-regret. The deterministic CUDA-histogram learner\nmixes them into a fixed number of zero-sum target projections whose mean exactly\nreconstructs standardized regret; adding another reviewed counter must not grow\none tree family per metric. One-shot profiler duration and\nrates derived from it remain attribution diagnostics because canonical repeated\ntiming already owns the latency label. The auxiliary metrics' combined target\nvariance weight is\nbounded below the timing target, so they can teach which execution properties\ntrack candidate economy without becoming a runtime dependency or overwhelming\ncanonical latency. Admit one metric for a candidate contest only when every\ncompeting candidate published it; optional-event absence is neutral, never the\nnumeric value zero. Apply reviewed reliability weights inside the bounded\nauxiliary budget: stable instructions-per-work outrank L1 behavior, and sparse\nLLC or duration-derived evidence remains secondary. During coherent N\u002FK CV,\nremove held geometry across every M and format before constructing both regret\nand auxiliary targets. A fold with no varying candidate-relative dynamic target\nis measured-only; configuration features cannot masquerade as profiler\ninfluence.\n\nCPU decode retains two normalized views of the same exact counters. Per\nexpected MiB captures the bandwidth and weight-reuse question; per million\nlogical MACs captures scheduler and instruction overhead as grouped M grows.\nExpose decode arithmetic intensity from runtime-visible geometry, and expose\nboth effective GB\u002Fs and GOP\u002Fs for GPU decode. Do not classify grouped verifier\nrows as prefill merely because M is larger than the original MTP range.\n\nTreat the profiler surrogate as two additive CV candidates. The bounded-prior\nvariants may reshape only training costs before an ordinary generic tree is\nfitted. The cross-fitted teacher may instead choose a held candidate directly\nfrom its complete predicted regret surface. In both cases the choice is judged\nonly by held canonical timing. A winning teacher is never a runtime dependency:\nits out-of-fold candidate decisions are distilled by the existing publication\ntournament into a bounded, total generic C++ tree.\n\nProfiler records must also contain reviewed candidate-aware schedule geometry.\nRaw `(M,N,K)` plus a categorical family name is insufficient when two kernels\npublish different task grids. Derive exact runtime-visible task counts, worker\nwaves, final-wave utilization, rows\u002Foutput values\u002FMACs per task, and tile-tail\nutilization from the same launch formulas used in production. These analytical\nfeatures contain no winner or latency label; held canonical timing decides\nwhether they improve selection. Add formulas symmetrically as CUDA and ROCm\ncandidate families enter the common fitter.\n\nPersist each paid profiler prediction surface in the policy fit cache. Its\nidentity binds the complete cross-M candidate-cost pool, model-visible profiler\ndescriptor digest, held N\u002FK geometry set, and exact prediction-point inventory.\nStore only the domain-local training points consumed by bounded-prior fitting\nand held points consumed by teacher scoring; do not persist unrelated transfer-\npool rows. Store one canonical little-endian `float64` value per point plus a\nsmall JSON manifest containing the ordered point digest, value digest, count,\nand model\u002Fholdout identities; never repeat runtime keys in every surface JSON.\nParallel cache workers authenticate raw arrays and return hit identities only.\nThe coordinator opens read-only memmaps and shares one lazy point-to-row index\nacross sibling fold surfaces, so neither cache replay nor worker publication\npickles complete prediction maps. Reject partial, foreign, non-finite, or\ndigest-changed arrays. An identical replay must report zero profiler-model\nworkers even when its in-memory cache starts empty; changing timing labels,\ndescriptors, holdouts, or requested points must produce a new immutable surface.\nPublish misses from their owning GPU worker and consume completion order; parent\nserialization or ordered draining can strand accelerators behind one slow fit.\n\nInventory preparation must preserve the historical point order and framed JSON\ndigest when reusing encoded runtime\u002Fstring fragments or flattened sort keys.\nProve equality against an independent original encoder, including every runtime\ndiscriminator and escaped\u002FUnicode strings. Memoized structural lookup hashes\nbelong only to their Python process: omit them from pickle and verify dictionary\nreconstruction under another interpreter hash seed. Measure preparation apart\nfrom GPU fitting; unchanged semantic evidence must remain a cache hit.\n\nCV fitting-label reuse belongs to one scorer lane and one active immutable\ncost\u002Fheld-geometry\u002Fprediction scope. Reuse labels across feature\u002Fplacement\nalternatives, never their evaluated decisions. Prove exact uncached CV results,\nstorage invalidation, mutable-map rejection from retention, and joined lane\ncleanup; see the ownership contract in [pipeline internals](references\u002Fpipeline.md#fit-internals).\n\nLarge CPU common-observation checkpoints are parsed in deterministic byte-range\nprocess partitions and reduced in source order. Keep the measured 8-worker\ndefault unless a new corpus benchmark proves another winner. Use\n`LLAMINAR_NATIVE_VNNI_ADAPTATION_WORKERS` for controlled A\u002FB runs and\n`LLAMINAR_NATIVE_VNNI_DISABLE_PARALLEL_ADAPTATION=1` only for serial diagnosis;\nparallel and serial replay must produce the identical corpus digest.\n\nLarge common-observation checkpoints are also emitted in deterministic process\npartitions. Workers format private row-range shards, and the parent assembles\nthem in source order before one atomic publication. Control this only for A\u002FB\ndiagnosis with `LLAMINAR_NATIVE_VNNI_IO_WORKERS`; parallel and serial CSV bytes\nmust remain identical.\n\nCPU M=1 and grouped decode adapt their raw aggregate\u002Ftiming transaction once,\nthen freeze, fresh-seal planning where applicable, and certification reuse the\ncommon checkpoint through `--reuse-development-common`. Reuse must revalidate\nthe raw corpus digest plus every git\u002Fbuild\u002Fcompiler\u002Fhost\u002Fruntime\u002Fserial-policy\nfield, including the ISA-specific build suffix. Never trade repeated adaptation\nfor an unauthenticated common CSV. Both regimes also persist the authenticated\nnormalized profiler catalog under their fit-cache directory; freeze and\ncertification must reuse it when the bound request\u002Fevidence\u002Fwitness identities\nare unchanged.\n\nFor large CPU, CUDA, or ROCm timing transactions, parse exact sidecars in\nbyte-safe physical-core ranges that begin and end only at complete measurement\ngroups or candidate trials. Adapt aggregate rows into private canonical CSV\nshards before ordered atomic assembly. Keep small corpora serial below reviewed\nthresholds. Any change to this preprocessing must prove equal timing maps,\nobservation order, corpus digest, and output bytes against serial replay.\n\nBoth CPU decode surfaces require iterative paired development before freeze:\nuse `paired_requests --surface decode-m1` for serial decode and\n`--surface grouped-verifier` for grouped verifier rows, retain every completed\ncontent-addressed shard, and feed the resulting `--paired-development-csv`\nset into freeze and certification. Read independent paired shards in a\nphysical-core process pool, but merge and validate the comparison graph in the\nparent so serial and parallel evidence digests remain identical. Increase a\ntree ceiling only after diagnostics prove the selected model exhausted the\ncurrent bound; a failing domain whose selected tree is smaller has a different\nmodel or evidence problem. Never freeze directly from broad timing\nwhen paired refinement still reports pending or confirmed failing domains.\nFor alias-robust cells, request the source alias whose corrected best candidate\nhas the greatest advantage over the selected route; the minimax compromise\ncandidate is not necessarily that regret witness. In the same refinement\ngeneration, complete a direct star from the selected launch to every physical\ncandidate forceable across all source aliases. Keep every edge for that runtime\ncell in one producer process\u002Fshard even when doing so exceeds the nominal shard\npacking target. Indirect graph connectivity assembled from separate process,\nsocket, clock, cache, or thread-runtime histories is not evidence for a direct\ncandidate ordering. Once a same-session selected-to-witness edge is complete,\nthe complete directional star is the immutable evidence unit for that runtime\ncell. Derive every later selected-candidate ordering from that original star;\na refit-selected anchor must never mint a second star. A remaining contradiction\nis a terminal evidence conflict. Never mint another request for the same\nphysical edge merely because the aggregate corpus digest changed.\n\nCanonical observation hashing and fit-cache identity preparation are also\nhost-parallel. `ObservationCorpus.digest()` serializes\u002Fsorts row shards in fork\nworkers, derives deterministic lexical range splitters, merges disjoint global\nranges on the worker pool, streams already ordered fragments into SHA-256, and\nmemoizes the result on the immutable corpus. The coordinator must never perform\na corpus-wide Python row merge. Serialization, shard partitioning, and range\nmerge reuse one persistent physical-core-capped process pool so a large loaded\ncorpus is forked only once per digest. Regressions must prove both one-pool\nlifetime and exact historical digest bytes. Domain-local\nsemantic, paired-edge, legacy-migration, and serial-oracle cache identities are\ncomputed independently across policy workers. Use\n`LLAMINAR_NATIVE_VNNI_CORPUS_DIGEST_WORKERS` and\n`LLAMINAR_NATIVE_VNNI_POLICY_WORKERS` only for controlled A\u002FB diagnosis; a\nserial\u002Fparallel equality regression is mandatory for either implementation.\nWith `LLAMINAR_NATIVE_VNNI_POLICY_TIMING=1`, inspect `cache_identity`,\n`cost_keys`, `profiler_identity`, `cache_lookup`, and `candidate_costs`\nseparately instead of treating their sum as tree-search time.\n\nCPU prefill split migrations use\n`--cpu-prefill-fit-development-lineage-plan` during fit-only replay. Supply the\nimmutable source aggregate\u002Ftiming, all source route manifests, every historical\nrefinement plan in order, and every distinct split manifest named by those\nplans. The analyzer routes each plan by its embedded split digest; never flatten\na mixed v8\u002Fv9 lineage onto the newest source split or omit older rounds.\nFor collection, pass the intended plan path even when it does not exist. The\nrefresh transaction first probes the exact target binaries, authors the plan\nfrom those route manifests, and thereafter treats it as immutable resumable\nevidence. Do not precompute a plan against another build.\n\nOnce a CPU-prefill corpus has candidate expansion, split lineage, or generic\nrefinement history, production replay MUST use its typed\n`cpu_prefill_replay_recipe.v1.json`; the individual flags above are diagnostic\nand collection primitives, not an operator interface. The direct supported\nreplay is:\n\n```bash\nscripts\u002Frefresh_native_vnni_dispatch_tables.sh \\\n  --backend cpu-prefill --profile all \\\n  --output-dir \u003Ccorpus> --skip-sweep --reuse-profiler-evidence \\\n  --collect-cpu-prefill-sealed-after-freeze \\\n  --cpu-prefill-fit-replay-recipe \\\n    \u003Ccorpus>\u002Fcpu_prefill_replay_recipe.v1.json \\\n  --install\n```\n\nA post-freeze seal must use artifact names that cannot collide with an opened\nor burned generation. Relocate the authenticated recipe before launching a new\nseal instead of copying it or editing path strings by hand:\n\n```bash\nPYTHONPATH=tests\u002Fv2\u002Fperformance\u002Fkernels \\\n  python3 -m native_vnni_dispatch.cpu_prefill_replay_recipe relocate \\\n    --recipe \u003Csource>\u002Fcpu_prefill_replay_recipe.v1.json \\\n    --output \u003Cfresh-seal>\u002Fcpu_prefill_replay_recipe.v1.json\n```\n\nRelocation rewrites recipe-relative artifacts, copies the common-observation\ncheckpoint, publishes a new self digest atomically, and authenticates the\nresult. It does not authorize reuse after the production serial-M1 policy hash\nchanges. That hash identifies the row oracle against which grouped candidates\nwere proved byte exact; a changed hash requires a fresh CPU-prefill measurement\ngeneration built against the installed serial policy.\n\nThe public `train_native_vnni_dispatch.sh --backend cpu-prefill --install`\ncommand discovers that recipe automatically in a materialized corpus. Recipe\npreflight runs before route probes and authenticates candidate-expansion\nsource pairing, target\u002Fsource routes, distinct split generations, historical\nversus current plan roles, additive timing order, profiler triplets, and\ncheckpoint state. A copied path-bound complete checkpoint is automatically\nrebased after its complete plan partition is validated; only transaction\nprovenance changes, and historical timing is not reinterpreted under newer\nadapter code. This adaptation launches no trainer kernel or profiler.\nFor a complete checkpoint, preflight forwards its authenticated raw corpus\nidentity to development fit, freeze, and certification; those processes must\nnot stream-hash the same raw sidecars again. Prefix and sealed contexts keep\ntheir own independently derived identities.\nOnly an explicitly declared `prefix` checkpoint may be extended, and its input\ncount is mandatory. Never infer checkpoint state from file existence.\n\nCPU-prefill sealed evidence is planned after generic freeze. Every frozen leaf\nmust receive one physical route witness from authenticated target route\nmanifests or an untimed diagnostic completion probe. Generated\n`CPUPrefillAutoRefine_*` geometry must be absent from development, and the\nself-contained witness plan embeds its exact C++ route. Validate that every\nfrozen predicate is exercised before launching timing and again during\ncertification; a fixed hand-authored sealed shape list is not sufficient.\n\nCPU M=1 and grouped-decode certification use the same fresh-leaf rule. M=1\nfreeze emits a generated geometry probe; run the production C++ route planner\nfor AVX2-build\u002FAVX2-runtime, AVX512-build\u002FAVX2-runtime, and\nAVX512-build\u002FAVX512-runtime before emitting paired request shards. Grouped\nfreeze emits direct Pairwise\u002FWideRows paired shards for every frozen M leaf.\nEach shard must cover every source alias and every alternate forceable\ncandidate. Admit grouped timings only after the production route counter and\ncomplete `M*N` byte comparison against production serial M=1 pass. Never\nsubstitute the historical static CPU sealed-shape CSVs for this transaction.\n\nCPU paired timing must alternate and record selected-first and exact-first\ninvocation order. Estimate candidate regret by taking the median log ratio in\neach order stratum and weighting the two strata equally; never pool raw ratios\nacross opposite orders. Bootstrap each stratum independently, and reject a\ncell that lacks complete order identity or either crossover direction. This\nremoves stable first\u002Fsecond invocation effects without weakening the paired\nconfidence bound.\n\nDo not defer sealed-capacity planning until installation. Before final\ndevelopment refinement, authenticated preflight must report the provisional\nleaf count, untouched-reserve reachability, projected witness geometry,\nsource-format, format\u002FM-cell, process-job, and candidate-measurement counts,\nplus calibrated wall time by ISA regime and available measurement lane. Fix\nthe reserve commitment and coverage obligations before fitting, but keep all\nholdout timings opaque until the final generic digest is frozen. Development\nCV may guide fitting; sealed evidence must never do so. If a policy changes\nafter sealed results are inspected, burn that seal and certify against a new\nuntouched partition.\n\nA burned seal is reusable development evidence only through a typed\n`cpu-prefill-burned-seal-development-v1` transaction. The transaction binds\nthe aggregate, timing sidecar, old witness plan, and the git\u002Fbuild\u002Fcompiler\u002F\nhost\u002Fruntime\u002Fserial-policy provenance that actually measured it. Add it to the\nCPU-prefill replay recipe with `cpu_prefill_replay_recipe add-burned-seal`.\nReplay materializes a mixed common-observation checkpoint before fitting and\nvalidates each original corpus-ID partition independently. Never append failed\nseal CSVs under development provenance, and never reuse that opened partition\nto certify the changed policy.\n\nCPU M=1 and grouped-decode use paired burned-seal transactions rather than\nordinary observation adaptation. Supply each inspected plan and its complete\npaired CSV directory positionally through the repeatable\n`--cpu-decode-burned-sealed-plan` \u002F\n`--cpu-decode-burned-sealed-paired-dir` or grouped equivalents. Revalidate the\nrequest\u002Fevidence identity and convert selected-versus-challenger ratios only\ninto supplemental generic candidate costs. Never create exact overlays or\nordinary timing observations from those ratios. At unseen burned geometry,\nprofiler input may carry runtime geometry plus static candidate\u002Fresource\ndescriptors, but no request-local dynamic counter. Exclude every burned\ngeometry from the next reserve, freeze a changed generic digest, and require a\nnew untouched seal before publication. Carry the same burned transaction\nthrough freeze, fresh-plan construction, and certification so replay cannot\nsilently regenerate a different policy generation.\nThe later development corpus is expected to have a different digest after\nadditive geometry or another burned generation. Authenticate the old plan's\nself digest and current candidate\u002Fformat registries, replay every paired row,\nand require each witness to resolve to exactly one compatible current generic\ndomain; never require whole-corpus equality for generic-only burned evidence.\n\nTrack every newly discovered orchestration failure in the project document's\n**Turnkey replay defect journal** before fixing it, and add a focused negative\npreflight regression. A dry command rendering is not authenticated preflight.\n\n## Shared Shape And Candidate Ownership\n\nUse `native_vnni_dispatch.shape_manifest.load_shape_manifest()` as the one\nresolved CPU\u002FCUDA\u002FROCm shape inventory. `tests\u002Fv2\u002FCMakeLists.txt` centralizes\nthe JSON sources used by all C++ trainers. Add Qwen release architecture data\nonce to the shared catalog; never add corresponding backend-specific lists.\nRuntime dispatch keys remain model-agnostic: codebook, execution mode, M, N,\nand K, with generic predicates based on codebook, geometry\u002Faspect, and work.\nSynthetic boundary-refinement geometries are generic-learning evidence only.\nExact overlays may be emitted only for shape\u002FM cells declared as production\noverlays in the shared manifest\u002Fprefill matrix, and emitted names must be the\ncanonical production names rather than synthetic evidence aliases.\n\nRegister launchable template instantiations in the common candidate registry.\nThe sweep must execute the real registered candidate ID and confirm the\nobserved route\u002Fcounters. Unsupported combinations need explicit typed records,\nnot missing rows. Do not serialize a combinatorially projected formula corpus;\nretain measured cells and evaluate formulas during fitting.\n\nCUDA `fused_kpar` is a distinct physical publication family with the same\nexact-KB arithmetic fingerprint as global KPAR. Its CTA width and partition\ncount must pass `CUDACanonicalKpartFoldPlan` admission without clamping. The\ntrainer authenticates compiler resources before timing, and grouped verifier\nrows inherit the frozen KB through their own economical grouped producer.\nNever interpret the historical `force_two_phase` CSV field as a launch count:\nit authenticates ordered partials; the candidate family owns physical storage\nand dispatch count. Changing the registry requires a new or authenticated\nexpanded corpus, not relabeling old measurements.\n\nLiteral global and fused KPAR counts are exact-overlay candidates, not total\ngeneric leaves. Project both families through `cuda_shape_resolved.py`; each\nformula must resolve to a directly measured physical candidate and respect its\nCTA capacity. Emitters must reject literal-count generic leaves, never append\nan admission condition absent from the certified tree. Verify Python\u002FC++\nresolver agreement at small K and physical-capacity boundaries before fitting.\n\nBefore timing any CUDA or ROCm candidate, query the exact compiled template\nspecialization's static resources through the backend runtime. A non-zero CUDA\nlocal-memory allocation or ROCm private\u002Fscratch allocation disqualifies that\nspecialization before graph capture and timing; register spilling is an\neligibility failure, not a learner feature. Keep an all-format\u002Frole\u002Fcandidate\nresource-inventory regression, and require isolated `ncu`\u002F`rocprof` evidence to\nconfirm zero dynamic spill traffic for every promoted production candidate.\n\n## Measurement Surfaces\n\n- **Fast M=1 decode\u002FGEMV:** bandwidth-sensitive serial decode. Optimize the\n  fraction of sustainable memory throughput while accounting for launch and\n  reduction overhead.\n- **Grouped verifier M=2..16 plus sentinels:** require byte equality with each\n  serial row. M=31 is evidence that runtime support is not artificially capped;\n  production M is not limited to the measured buckets.\n- **Ordinary prefill\u002FGEMM:** sweep every applicable production geometry and all\n  21 source formats. CPU uses M={32,128} below 7B, M={32,64} from 7B through\n  below 14B, and M={32} at 14B and above; it measures every build\u002Fruntime ISA\n  regime. CUDA and ROCm consume the exact physical capture inventory from\n  `src\u002Fv2\u002Futils\u002FPrefillGraphBuckets.def`; never train virtual long-context M\n  values that production only realizes as repeated captured chunks. Exact\n  overlays come only from these exact cells; generic rules provide total\n  dispatch for every unseen positive M and N\u002FK geometry.\n\nAn installable GPU prefill row must compare the complete `M*N` output against\nits certified oracle on the exact producer stream. Use\n`GPUTrainerVerification.h`: retain the oracle in device memory, enqueue the\nbackend comparison after canonical timing, and materialize only mismatch count\nand first-byte offset. Sampled rows, cosine alone, or a host-side full-output\ndownload are diagnostic evidence and cannot authorize an overlay. Keep\n`V2_Integration_CUDATrainerFullBufferByteCertificate` and\n`V2_Integration_ROCmTrainerFullBufferByteCertificate` green; they prove signed\nzero and NaN-payload sensitivity, full-span mismatch detection, and null-stream\nintolerance.\n\nFor dense CUDA\u002FROCm prefill, use the backend-neutral resumable transaction.\nEvery cell is one source format, exact production geometry, and physical graph\nbucket. The runner may place all missing M cells for one format\u002Fgeometry into\none native process so prepared weights are uploaded once; it must split and\nauthenticate aggregate rows and every native-event sample back into independent\ncell artifacts before atomic promotion. Thus batching changes setup cost only,\nnot timing semantics or resume granularity:\n\nThe transaction accepts only a `Release` scorer. Its immutable plan hashes the\nexact trainer executable and its resolved `libllaminar2_core.so`; every cell\npublishes a manifest last that binds those hashes, the plan\u002Ftiming cardinality,\nthe shared native-process invocation, and all artifact digests. `status`,\n`combine`, and installation authenticate those manifests without rewriting the\nplan. A rebuilt scorer\u002Fcore or changed matrix requires a new corpus directory;\nnever seed a Release corpus with Integration measurements.\n\nCUDA additionally preflights the complete compiler specialization matrix.\nOnly candidates with zero primary and ordered-reducer local memory enter timing;\nthe per-row registers, shared-memory footprint, launch width, and active-block\nevidence are authenticated with the native timings. AUTO receives one untimed\nroute-resolution probe and is then held to the same exact-symbol resource gate.\n\n```bash\nPYTHONPATH=tests\u002Fv2\u002Fperformance\u002Fkernels \\\n  python3 -m native_vnni_dispatch.production_dense_prefill_sweep run \\\n    --backend \u003Ccuda|rocm> --output-dir \u003Cwork-dir> \\\n    --binary \u003Crelease-native-vnni-prefill-perf-binary> --devices \u003Cordinals>\n\nPYTHONPATH=tests\u002Fv2\u002Fperformance\u002Fkernels \\\n  python3 -m native_vnni_dispatch.production_dense_prefill_sweep status \\\n    --backend \u003Ccuda|rocm> --output-dir \u003Cwork-dir>\n\nPYTHONPATH=tests\u002Fv2\u002Fperformance\u002Fkernels \\\n  python3 -m native_vnni_dispatch.production_dense_prefill_sweep combine \\\n    --backend \u003Ccuda|rocm> --output-dir \u003Cwork-dir>\n\nPYTHONPATH=tests\u002Fv2\u002Fperformance\u002Fkernels \\\n  python3 -m native_vnni_dispatch.dense_production_overlay \\\n    --backend \u003Ccuda|rocm> --work-dir \u003Cwork-dir> \\\n    --output \u003Cbackend-generated-include> --summary-csv \u003Csummary.csv>\n```\n\nAn installed overlay must not contaminate a later additive sweep. The native\ntournament scopes exact-overlay lookup off, so `AUTO` always denotes the total\ngeneric policy and each forced candidate retains its physical identity.\nProduction keeps overlay lookup enabled. A corpus row in which `AUTO` resolves\nthrough an installed exact cell is invalid evidence and must fail\nauthentication.\n\nFor a focused dense refresh, retain unrelated installed exact rows with the\ngenerator's paired `--retain-base-include` and `--retention-receipt` options.\nThe base must be an immutable copy of the installed include. The generator\nauthenticates its selector ABI and sorted literal keys, replaces only the\nnewly measured plan's keys, and preserves every other row byte-for-byte. The\nreceipt identifies retained policy separately from fresh measurements; the\nsummary CSV describes only the latter. This does not recertify old timing or\nchange Auto on unseen geometry. See the additive recipe in\n[pipeline internals](references\u002Fpipeline.md#additive-dense-gpu-prefill).\n\nFor routed production MoE prefill, use the same backend-neutral resumable\ntransaction for CUDA and ROCm. One worker owns each physical device; every cell\nmeasures the complete arithmetic-eligible candidate inventory and is promoted\natomically only after aggregate\u002Fraw-timing authentication. Missing M values for\none source tuple, geometry, and route profile share one native process and one\nprepared expert set, while retaining independent timing rows and commit\nmanifests per M.\n\nThe corpus root is immutable with respect to backend, candidate and route\nsemantics, and the exact Release trainer plus resolved\n`libllaminar2_core.so`. Every invocation writes a content-addressed plan under\n`plans\u002F` that binds its selected GGUF source geometries and positive M values;\na later source geometry or M is therefore an additive plan and reuses\noverlapping committed cells without rewriting the baseline plan. Do not hash\nthe whole evolving GGUF inventory into the root contract, because adding one\nnew model shape must not strand valid measurements. Each cell manifest is\npromoted last and binds the producing plan, shared native-process invocation,\ndevice ordinal, and aggregate, raw-timing, and log digests. `status`, `combine`,\nand overlay installation are read-only and authenticate that closure. Orphaned\nfiles, staging remnants, changed producer bytes, and incomplete route\u002Fsource\nsurfaces are fatal. `combine` publishes beneath\n`combined\u002F\u003Cplan-sha256>\u002F` so supplemental plans cannot overwrite an earlier\naggregate:\n\n```bash\nPYTHONPATH=tests\u002Fv2\u002Fperformance\u002Fkernels \\\n  python3 -m native_vnni_dispatch.production_moe_prefill_sweep run \\\n    --backend \u003Ccuda|rocm> --output-dir \u003Cwork-dir> \\\n    --binary \u003Cv2_perf_moe_verifier_prefill> --devices \u003Cordinals>\n\nPYTHONPATH=tests\u002Fv2\u002Fperformance\u002Fkernels \\\n  python3 -m native_vnni_dispatch.production_moe_prefill_sweep status \\\n    --backend \u003Ccuda|rocm> --output-dir \u003Cwork-dir>\n\nPYTHONPATH=tests\u002Fv2\u002Fperformance\u002Fkernels \\\n  python3 -m native_vnni_dispatch.production_moe_prefill_sweep combine \\\n    --backend \u003Ccuda|rocm> --output-dir \u003Cwork-dir>\n\nPYTHONPATH=tests\u002Fv2\u002Fperformance\u002Fkernels \\\n  python3 -m native_vnni_dispatch.moe_production_overlay \\\n    --backend \u003Ccuda|rocm> --work-dir \u003Cwork-dir> \\\n    --output \u003Cbackend-generated-include> --summary-csv \u003Csummary.csv>\n```\n\nThe generated key contains only execution codebooks, hidden\u002Fexpert geometry,\nexpert count, top-k, and exact M. Source GGUF labels remain evidence metadata.\nCUDA overlays may change only arithmetic-neutral gate\u002Fup block width; fixed\npartition counts and reduction trees are correctness policy, not candidates.\nROCm overlays select only the explicitly registered byte-equivalent geometry\naxes. After installation, prove exact precedence with PerfStats and byte-compare\nthe real production path against serial rows; separately prove unseen positive\nM reaches the generic policy.\n\nFor canonical multi-GPU timing, CUDA assigns disjoint format shards. ROCm\nassigns disjoint shape shards and runs the complete format matrix on each\nshard; do not statically divide 21 ROCm formats over four cards because the\n6\u002F5\u002F5\u002F5 assignment leaves three devices idle during the final format. A phase\nwith fewer shapes than visible devices uses only the useful lane count.\n- **Dense and MoE:** include attention, GDN, short-conv consumers, dense FFN,\n  expert gate\u002Fup\u002Fdown, MTP hidden\u002Fembedding projection, and LM head geometries\n  that actually route through NativeVNNI.\n\nSweep every supported source format and validate source-to-execution-codebook\naliases. Train on execution codebooks but retain source formats for evidence\ncompleteness.\n\n## Profiling And Feature Use\n\nDerive immutable profiler requests only after timing is complete. Profile each\nphysical candidate in a fresh discrete launch and profiler range; one process\nmay amortize setup only when every launch retains independently authenticated\nattribution. Keep pipeline dispatches (quantize\u002Fproducer\u002Freducer\u002Fepilogue)\nordered and separate.\n\n- For CUDA metrics and Nsight procedure, read\n  [cuda-tuning](..\u002Fcuda-tuning\u002FSKILL.md).\n- For ROCm metrics, ISA, and rocprofiler limits, read\n  [rocm-tuning](..\u002Frocm-tuning\u002FSKILL.md).\n- For CPU, use trainer-owned `perf_event_open` groups attached to the exact\n  persistent OpenMP worker TIDs. Arm all per-thread groups concurrently after\n  warmup, execute exactly one production candidate launch, disarm concurrently,\n  and reject multiplexed events. Do not use system-wide `perf stat` FIFO\n  control: polling delay admits unrelated work after the target launch.\n\nFor CPU short launches, retain raw evidence but admit duration-derived\nfeatures only when the exact wall interval is at least 500 microseconds and\n`task_clock \u002F wall_clock` does not exceed the physical worker count by more\nthan 5%. Instructions per logical work and L1 behavior are stable primary\nsignals in the focused probe. Cycles, reference cycles, task clock, and IPC are\nsecondary only after that reliability gate. One-shot wall\u002Ftask clock values are\ndiagnostics beside the repeated canonical timing corpus, not auxiliary timing\nlabels. Normalize decode counters by both expected payload MiB and logical\nmillion MACs; normalize prefill by logical million MACs. Assign sparse LLC misses lower\nreliability weight than instructions and L1 evidence. Raw counters remain in\nthe immutable corpus so later feature studies never require recollection.\nThe 2026-07-18 calibration measured roughly 0.2% repeat CV for instructions and\nL1 traffic on grouped decode, versus up to 20% for LLC misses on sub-500-us\nlaunches. On a 152064x5120 Q4_0 launch, Pairwise M=16 executed about 7.9 times\nthe M=2 instructions in only 2.0 times the wall duration while LLC misses stayed\napproximately flat, directly demonstrating grouped weight reuse. At equal M,\nWideRows used about 6% more instructions and 47% more L1 loads than Pairwise on\nthat geometry despite fewer misses and slower canonical timing. Never interpret\na lower miss count without its total traffic and logical-work denominators.\n\nCPU collection amortizes process startup with exact-request TSV batches.\nRequests may share one process only when build\u002FISA\u002Fthreading, operation,\ncontract\u002Fbundle, execution mode, and N\u002FK geometry match. M, format, and\ncandidate may vary within that process. The trainer reuses packed fixtures and\nthe persistent OpenMP team, but it rebinds request\u002Foutput identity, resets and\narms every per-TID event group, executes one candidate launch, disarms, reads,\nand atomically publishes before advancing. Each request directory contains only\nits perf CSV, binary provenance, and exact batch-member record; shared process\nlogs and canonical-style diagnostics live outside request evidence digests.\nBatch completion is all-ID checked and appended once to the authenticated\n`\u003Cevidence>.inprogress.jsonl` journal. The journal fsyncs each completed batch,\nrecovers every newline-complete member after interruption, and materializes the\nfull canonical evidence manifest only when the invocation exits. Never rewrite\nthe complete growing JSON after each request or batch. Use\n`--disable-cpu-process-batching` only to diagnose the amortized protocol, and\nadjust `--cpu-process-batch-size` only after a focused throughput\u002Freliability\nA\u002FB. The production default is 1,024 requests: this keeps the usual 288-request\ngrouped geometry in one process, avoiding a second source-format packing pass,\nwhile each member still receives one separately reset, armed, and disarmed\ncounter interval. Profiler mode performs fixture preparation and exactly that\none production target launch; canonical timing and byte-equivalence replay\nremain in the independently authenticated timing corpus.\n\nCUDA collection likewise batches exact requests into one trainer process, but\nevery request owns a distinct explicit nonblocking CUDA stream and stable CUDA\nstream ID. Start one profiler range, issue exactly one production operation or\none graph replay on that request stream, synchronize only that stream, and end\nthe range before advancing. Invoke NCU once per process batch with a production\nkernel-name filter such as `regex:nativeVnni`; do not profile setup quantizers,\nsynthetic markers, or unrelated kernels. Export the shared raw report once,\npartition physical dispatches by the trainer-authenticated stream IDs, and\nreject duplicate, unknown, unclaimed, or dispatch-free streams. Each request\nretains an authenticated batch-member pointer to the shared raw report instead\nof duplicating it. Prefer a one-replay-pass metric set containing duration,\nregister\u002Fshared\u002Flocal-memory resources, occupancy, DRAM throughput, and the\nALU\u002FFMA\u002Ftensor utilization pipes; define compute utilization as the maximum of\nthe simultaneously measured compute pipes. Add a replay pass only when a\nfocused feature-value study proves it justifies the collection cost.\n\nROCm collection uses the same exact-plan batching and request-local ROCTx\nranges, but ROCm 7.1 profiler interception has a validated process-lifetime\nbound. Keep each process at no more than 256 total requests and no more than\n256 graph-captured requests. The collector and trainer both reject larger\nplans; do not raise either ceiling without repeated real-profiler stress runs\nof mixed eager\u002Fgraph and graph-only plans on the target ROCm runtime. Canonical\ntiming still precedes the one isolated profiler replay, and the profiled graph\nlaunch is terminal for its graph executable.\n\nROCm profiler-only trainer invocations must not repeat canonical correctness or\ntiming work. The immutable timing corpus already owns D2H byte checks, warmups,\nand event-timed samples. For each request and each rocprof pass, verify the\nforced route, execute two fixed unprofiled preconditioning launches while\ncollection is paused, execute exactly one request-local selected launch, and\nreturn. Profiler-only source weights use one valid factory-generated quantized\nrow tiled across N: this preserves the concrete source format, raw byte\nfootprint, production upload\u002Frepack path, and launch geometry without paying\nfor value-independent full-matrix Gaussian generation on every profiler pass.\nCanonical collection mode remains unchanged and retains independently random\nfull matrices. Keep focused source, all-format, and real-profiler regressions\nso timing loops or expensive value generation cannot drift back into profiler\nmode.\n\nLarge request construction and CUDA timing-sidecar adaptation use fork-based,\nphysical-core-capped workers. Partition timing CSVs only at complete\nmeasurement-group boundaries so candidate permutations, seeds, and sample\nindices remain locally valid; merge worker output in canonical source order and\nprove serial-versus-parallel byte identity in unit tests. Worker environment\nvariables are diagnostic overrides, not production defaults.\n\nNormalize metrics into architecture-relative features that explain candidate\neconomy. Decode emphasizes memory efficiency, transactions, launch structure,\nand occupancy needed to hide latency. Prefill emphasizes compute utilization,\ntensor\u002FVNNI issue, occupancy, register\u002Fscratch pressure, and avoidable memory\ntraffic. Profiler features may influence the fit only after authenticated join\nto the exact timing corpus or its exact compact request witness. A broad\nobservation superset is not itself a witness. Run feature ablations when their\neffect is unclear.\n\n## Fit And Certification\n\nExact seen-shape overlays lock the best observed launch. Generic rules are fit\nby codebook, execution mode, geometry\u002Faspect, and work size and must dispatch\nevery unseen smaller or larger shape. Use geometry-atomic grouped CV, not\nrandom row CV or shape-name grouping: all aliases at one exact `(N,K)` must\nleave training together. For sufficiently large domains, withhold coherent\nbalanced N\u002FK regions so both local neighborhoods and low\u002Fhigh support\nboundaries are tested; spreading adjacent points round-robin across folds\nproves interpolation only and is not an unseen-shape certificate. Small\ndomains use leave-one-geometry-out validation. The fold schema participates\nin fit-cache identity.\nFreeze generic IR before opening sealed evidence. Evaluate sealed shapes with\nexact overlays disabled and do not refit after seeing them.\n\nPromotion is domain based:\n\n1. every required codebook\u002FISA\u002Fexecution-mode\u002FM domain must have complete CV\n   coverage and a nonempty generic tree;\n2. each domain independently computes nearest-rank p95 observed regret and p95\n   simultaneous-UCB regret, with both required to be strictly below 5%;\n3. at least 95% of required domains must pass those two performance gates;\n4. the remaining at-most-5% performance exceptions keep their best measured\n   generic trees and typed diagnostics so runtime dispatch remains total; and\n5. missing domains, uncovered points, empty trees, ambiguous predicates,\n   unexercised sealed leaves, byte mismatches, or M\u002FN*K\u002Fcodebook holes are\n   structural failures and cannot consume the performance-exception allowance.\n\nGlobal p95 and maximum regret remain useful refinement diagnostics, but neither\nmay replace the per-domain decision. Exact overlays never count toward generic\ncoverage, CV, sealed rule exercise, or the 95% quota.\n\nProduction fitting auto-discovers every CUDA and ROCm device. Rebuild and test:\n\n```bash\ncmake --build build_v2_release --parallel \\\n  --target v2_native_vnni_leaf_primary_scorer_cuda \\\n           v2_native_vnni_leaf_primary_scorer_rocm\nctest --test-dir build_v2_integration \\\n  -R '^V2_Integration_NativeVNNILeafPrimaryScorer_(CUDA|ROCm)$' \\\n  --output-on-failure --parallel\n```\n\nKeep uploaded regret matrices, streams, and scratch buffers persistent in GPU\nscorers. Batch leaves, refill lanes dynamically, and restore deterministic task\norder before policy reduction. Do not synchronize after each leaf.\n\nGrouped CV uses scorer ABI v12's fused\n`llaminarNativeVNNITreeSearchAndEvaluate` path. One graph replay must perform\nthe complete beam search, held-out threshold precomputation, exact-candidate\nselection, tree routing, and compact fold-result publication on an explicit\nnon-default stream. Persistent device scratch owns all matrices, descriptors,\ntrees, and reductions. The only synchronization is one terminal stream sync\nafter the compact final D2H; full-device syncs, per-leaf syncs, temporary host\ntrees, and Python held-out replay are contract violations. Keep the standalone\ntree-publication entry point only for final policy publication, where the host\nactually needs the stable tree IR.\n\nKeep expanded candidates compact and virtual. A candidate stores its parent\nfrontier index, split descriptor, scalar objective, and exact signature hash;\nit does not copy a complete leaf array. Compute the positioned-token signature\nhash with one 32-lane subgroup, then compare every colliding canonical token\nsequence in full. Hash equality is only a lookup accelerator, never a\ncorrectness predicate. Preserve the dense one-thread, left-to-right FP64 mean,\nbut compute order-only expanded-tree p95 in the existing subgroup finishing\nkernel. Candidate-column p95 uses reversible uint64 IEEE-754 order keys and an\nexact bounded upper-tail scan while retaining the selected source bits.\n\nAll scratch, graph executables, streams, and matrices are allocated or grown\nbefore capture\u002Freplay and then reused. Stable replay must not allocate, free,\ngrow scratch, recapture, or synchronize except for the single terminal stream\nwait after compact D2H publication. Keep runtime-counter regressions for these\ninvariants. Timeline allocation records across test cases are acceptable only\nwhen they belong to session setup, reviewed high-water growth, or teardown,\nnever to a captured graph node or replay.\n\nABI v12 carries eight 64-bit mask words and therefore supports up to 512\ntraining points and 512 held-out points in one captured transaction. Keep the\nCUDA\u002FROCm integration regression at the production high-water mark of 444\ncollapsed-aspect CPU decode points. A smaller test would miss the ABI v7\npre-capture failure that originally surfaced this requirement.\n\nBuild both scorer DSOs with explicit device `-O3`, including Integration\nbuilds. CMake custom build types do not automatically imply CUDA\u002FHIP\noptimization. Profile scorer-kernel changes with isolated integration launches:\n\n- CUDA: ncu `SpeedOfLight`, `Occupancy`, `LaunchStats`,\n  `MemoryWorkloadAnalysis`, and `WarpStateStats`;\n- ROCm: inspect code-object private segment, stack, SGPR\u002FVGPR counts, and spills,\n  then collect `VALUUtilization`, `MemUnitBusy`, and `L2CacheHit` in separate\n  rocprofiler passes on gfx906; and\n- reject any production kernel with local\u002Fprivate scratch or register spills.\n\nThe current profiled scorer has zero CUDA local-memory spills and zero ROCm\nscratch\u002Fprivate allocation in child scoring, compact objective finishing,\ndeduplication, and top-k selection. The retained subgroup signature hash reduced\nrepresentative deduplication from 2.162 ms to 0.011 ms on GA102 and from\n13.654 ms to 0.026 ms on gfx906. Splitting exact ordered mean from order-only\np95 reduced objective-plus-finishing time from about 2.115 ms to 1.134 ms on\nGA102 and from about 4.492 ms to 2.232 ms on gfx906. Treat these as regression\nbaselines, not timeless thresholds; remeasure after toolchain or ABI changes.\n\nThe held-out scorer kernels are integer predicates\u002Freductions plus exact FP64\ncomparisons. Tensor cores do not accelerate this workload and would weaken the\nexact-key contract; use them only if a future scorer stage becomes a real\nmatrix operation and exact equivalence is separately proved.\n\n## Kernel Tuning Loop\n\n1. Reproduce one dispatch\u002Feconomy gap in a focused `Perf__` test.\n2. Add the candidate to the real templated registry and route it through the\n   production dispatch surface.\n3. Prove all-format byte equality for grouped rows before considering timing.\n4. Gather stable canonical timing and separate profiler evidence.\n5. Inspect occupancy, vector\u002Ftensor\u002FVNNI issue, register\u002FVGPR pressure, spills,\n   memory transactions, barriers, and grid utilization.\n6. Keep real winners even when they increase learner complexity; improve the\n   generic fit rather than deleting useful kernel families.\n7. Refit from the retained corpus, certify, install, run all-format integration\n   sweeps, then run model-level parity and performance gates.\n\nFor a backend handoff, finish the complete transaction before starting another\nbackend: freeze, sealed-certify, validate the staged artifact\u002Finclude, install,\nrun backend smoke coverage through production dispatch, and preserve the\nresult. CUDA and ROCm collection\u002Ffitting should otherwise remain symmetric and\nmay run concurrently on disjoint devices; always rebuild and use both scorer\nfamilies so policy search can use every available GPU.\n\nDo not tune one model format in isolation. Turn every discovered format\u002Fshape\nbug into an all-format regression when the behavior is format-generic.\n\n## Required Validation\n\nAt minimum run:\n\n```bash\nctest --test-dir build_v2_integration \\\n  -L Unit -L NativeVNNI \\\n  --output-on-failure --parallel\nctest --test-dir build_v2_integration \\\n  -R '^V2_Integration_.*NativeVNNI|^V2_Integration_.*VerifierRows' \\\n  --output-on-failure --parallel\n```\n\nThe unit command is deliberately label-based. Every pure-Python corpus,\nlineage, measurement-plan, profiler-evidence, fitter, and generated-policy\nregression must be registered with both labels so adding a module cannot make\nit invisible to the canonical gate. Python unit tests must never launch GPU\nwork; scorer execution belongs in the integration suite.\n\nAlso run backend all-format grouped equivalence, graph-captured\u002Feager, dense\u002FMoE,\nand model parity suites touched by the change. Build performance targets from\nrelease builds and correctness\u002Fintegration targets from the integration build.\n\n## Internal Reference\n\nRead [references\u002Fpipeline.md](references\u002Fpipeline.md) when changing corpus\nschema, refresh phases, fitter\u002Fscorer internals, generated artifacts, or resume\nsemantics. The full design and current status remain in\n`docs\u002Fv2\u002Fprojects\u002F2026-07\u002FNATIVE_VNNI_BATCH_INVARIANT_LEARNED_DISPATCH_POLICY.md`.\n","# NativeVNNI GEMM Tuning\n\nUse the common evidence and policy pipeline. Do not create a backend-local\nheuristic, model-shape override, CSV parser, or installation path.\n\n## Non-Negotiable Invariants\n\n1. Require grouped MTP rows to be byte-identical to independent serial M=1\n   decode rows for every format and backend. Relaxed FP metrics are not an MTP\n   acceptance threshold.\n2. Measure the production kernel path with production graph\u002Fstream modes. Do\n   not disable optimizations to manufacture determinism.\n3. Keep canonical timing separate from profiler launches. `ncu`, rocprofiler,\n   and Linux `perf` replay must never become a latency label.\n4. Retain every measured candidate, raw timing sample, and per-physical-launch\n   profiler record. Do not retain winners only.\n5. Emit exact overlays and generic rules. Exact overlays have runtime\n   precedence, but cannot replace generic coverage or participate in sealed\n   generic certification.\n6. Evaluate measured p95 regret and conservative p95 regret UCB independently\n   in every required generic domain. Production defaults require both to be\n   strictly below 5% in at least 95% of domains. Maximum regret and global cell\n   p95 are diagnostics. A deliberate best-effort transaction may override the\n   p95 and passing-domain percentages through the turnkey flags, but the\n   frozen artifact must record them and every miss must remain explicit. Such\n   an override never relaxes correctness, byte equality, generic totality,\n   evidence completeness, or sealed rule exercise.\n   Final publication distills the complete cross-fitted decision surface using\n   the reviewed global leaf bound, because the union of independent fold\n   boundaries can require more leaves than any fold-local selected complexity.\n   Every over-budget leaf remains visible, owns a real measured generic tree,\n   and participates in untouched sealed generic-only certification.\n7. Keep CPU, CUDA, and ROCm feature and format coverage symmetric. CPU policy\n   identity includes AVX2 build\u002Fruntime, AVX512 build with AVX2 runtime, and\n   AVX512 build\u002Fruntime regimes.\n8. Never install from partial, pointer-only, unprofiled, stale-build, failed-CV,\n   or development-only evidence. Never silently fall back to a serial policy,\n   row replay, CPU fitting, or another scorer after explicit acceleration.\n9. Unit tests launch no GPU work. Put CUDA\u002FROCm execution in integration or\n   performance suites.\n10. Prove dispatch totality independently along every runtime axis. Every\n    positive M must map to exactly one certified bucket, every legal positive\n    `(N,K)` geometry must reach exactly one complementary generic-tree leaf,\n    and every production runtime codebook must own every required domain. CPU\n    generic decode and grouped-verifier rules must additionally dispatch every\n    positive runtime thread count: exact overlays remain scoped to their\n    measured thread regime, while learned wave and tail-utilization predicates\n    evaluate the actual OpenMP team width. Keep focused negative regressions\n    that remove one M domain, one codebook, one tree branch, or positive-thread\n    coverage while exact overlays remain present; installation must reject all\n    four cases.\n\n## Use The Turnkey Transaction\n\nWhen the user explicitly requests an **exact-only refresh**, do not run the\ngeneric fitting transaction below. Retain the installed Auto rules for unseen\nshapes. The CUDA analyzer accepts `--exact-only --require-fast-m1-complete\n--profile production --retain-auto-policy-json \u003Cbase-policy.json>\n--retain-auto-include \u003Cinstalled.inc>` alongside the normal strong timing and\nmeasurement-provenance inputs. This authenticates the base, updates only shared\nproduction-shape M1 exact tables, and preserves the complete Auto\u002Fgrouped code\nverbatim. It does not create a new generic certificate. Keep the immutable base\nartifacts and validate the refreshed M1 arithmetic with the all-format grouped\nbyte gate, affected model parity, isolated resources\u002Fprofiling, and matched\nRelease benchmarks before accepting it. Bare `--exact-only` remains a staging\nartifact with no generic coverage and must not replace production dispatch.\n\nRun one backend end to end:\n\n```bash\nscripts\u002Ftrain_native_vnni_dispatch.sh --backend cuda --install\nscripts\u002Ftrain_native_vnni_dispatch.sh --backend rocm --install\nscripts\u002Ftrain_native_vnni_dispatch.sh --backend cpu --install -- \\\n  --cpu-format-shards\nscripts\u002Ftrain_native_vnni_dispatch.sh --backend all --install \\\n  --minimum-passing-domain-percent 0\n```\n\nThe learned-tree transaction installs dispatch for serial M=1 and grouped\nverifier rows. Ordinary CPU prefill retains its total generic policy. CUDA and\nROCm dense prefill use the separate authenticated exact-overlay transaction\ndescribed below: measured production cells take precedence, while the generic\npolicy remains total for unseen positive M\u002FN\u002FK combinations. Routed CUDA\u002FROCm\nMoE prefill has its own whole-operation exact-overlay transaction. The explicit\n`--backend cpu-prefill` transaction remains available for offline kernel\nresearch and corpus analysis, but `--install` is intentionally rejected.\n\nPass hardware\u002Ftool\u002Flane controls after `--`. Do not pass `--shapes` or\n`--shape-partition`; add production overlays to the shared inventory. The\ndriver owns backend, profile, output path, fit-only flags, and installation.\nThe production exact-overlay matrix is symmetric: every known geometry is\nmeasured for all 21 registry formats at Fast M=1 and grouped-verifier M=2..16\nplus M=31. LM heads participate because both learned surfaces execute them.\nUnmeasured positive grouped M values remain total through generic rules.\n\nUse the focused `qwen-mtp-head` profile when changing the MTP projection or\nterminal-head candidate families and only additive evidence is required:\n\n```bash\nscripts\u002Frefresh_native_vnni_dispatch_tables.sh \\\n  --backend \u003Ccpu|cuda|rocm> --profile qwen-mtp-head \\\n  --output-dir \u003Cwork-dir>\n```\n\nThe profile derives its matrix list from the shared reviewed Qwen 3.5\u002F3.6\nrelease catalog and resolves physical dimensions through the canonical shape\nmanifest. It covers the six distinct hidden widths, both MTP-specific `H x 2H`\nhidden\u002Fembedding projections and `248320 x H` terminal heads, every registry\nformat, Fast M=1, grouped M=2..16, and M=31. Do not replace it with a hardcoded\nsingle-model LM-head list. Ordinary sidecar attention and FFN\u002FMoE matrices are\nowned by the complete release inventory; this focused profile measures only the\ntwo matrix families introduced specifically by the MTP head.\n\nCPU collection automatically uses every detected physical socket. Each MPMD\nrank owns a distinct resumable timing cell and retains the production\nper-socket thread count; set `--cpu-measurement-lanes N` only for deliberate\nisolation.\n\nCPU production refresh is dependency ordered. Certify and install the complete\n`Fast M=1` decode policy first, rebuild both AVX2 and AVX512 trainers against\nthat include, and only then collect grouped-verifier evidence through the\nproduction `Auto` route. Use\n`--stop-after-cpu-decode --install` for this explicit checkpoint. Do not make a\nprefill profiler process bypass an uncertified M=1 selector with a diagnostic\nserial-oracle override; that would profile a non-production path.\nContinue grouped collection in the same output directory with\n`--resume-after-cpu-decode --install`. This continuation authenticates the\nsealed M=1 policy artifact and requires its generated include to match the\ninstalled CPU decode table byte-for-byte before it bypasses decode collection,\nprofiling, and fitting.\n\nEvery CPU timing stage publishes shape\u002Fformat\u002FISA partials atomically. Use\n`--cpu-batch-limit N` to bound one invocation and rerun against the same output\ndirectory to collect only missing partials. Batch limits and\n`--resume-cpu-partials` are execution controls, not corpus-identity inputs;\nthe turnkey driver retains a clean checkpoint and attempts sealing only after\nthe backend's complete production payload inventory exists. M=1 fixture\nsynthesis prepares independent source formats in parallel before timing;\npacked construction and candidate measurements remain format-serial so\nbenchmark kernels never contend. A timing-harness setup optimization requires\na new build identity but must preserve each format's deterministic fixture\nbytes.\nOrdinary-prefill trainers additionally flush after every complete ordered M\nphase. If a later phase is interrupted, the wrapper authenticates aggregate and\ntiming sidecars with the production adapter, requires identical prefixes across\nthe paired socket ranks, and appends only the missing M suffix. A legacy header,\npartial candidate round, non-prefix inventory, or mismatched rank progress is\ndiscarded instead of appended. Final publication still requires the exact full\nplanned M inventory.\n\nPost-freeze CPU-prefill collection coalesces source formats only when geometry,\nISA regime, and ordered M inventory are identical. One process still packs,\nvalidates, and times every format separately, while byte-identical legacy Q8_1\nactivation fixtures are cached by M and format-seed class. Pair MPMD jobs only\ninside equal `(format phase count, M inventory)` groups and retain the runtime\nphase-inventory handshake; grouping by M alone can deadlock at the next format\nphase. Every frozen witness plan must serialize to fewer process jobs without\nlosing or duplicating a format record; lock that equality in a unit regression\nrather than documenting one generation's transient cardinality here.\n\nFit-only CPU-prefill replay keeps the immutable development build provenance\nthrough generic fit and freeze. A newly launched post-freeze seal is a separate\nmeasurement generation: its resume contract and certification context must use\nthe current AVX2\u002FAVX512 trainer digest and current host\u002Fcompiler provenance.\nReject collection when the current production serial-policy hash differs from\nthe frozen development generation; a harness-only rebuild is not permission to\ncertify changed arithmetic.\n\nThe command:\n\n1. computes the shared resolved shape-inventory digest and, for CPU prefill,\n   authenticates the matrix, training plan, split loader, and current split\n   manifest into a backend-specific corpus generation;\n2. rebuilds both CUDA and ROCm leaf-primary scorer DSOs plus the selected\n   backend trainer;\n3. runs both scorer integration equivalence suites;\n4. selects a corpus by backend, architecture, authenticated inventory digest,\n   and collection argument digest;\n5. collects timing and isolated profiler evidence only when no matching corpus\n   exists;\n6. fits the development corpus, requires complete generic-tree totality plus\n   the 95%-of-domains performance quota, freezes the generic digest, opens\n   sealed evidence, applies the same domain quota, emits, validates, and\n   optionally installs the generated include;\n7. seals successful new evidence and atomically publishes it for Git LFS; or\n8. verifies and refits an existing corpus without launching candidate kernels\n   or profilers.\n\nMaximum-regret and passing-domain thresholds are fit-only controls and do not\nparticipate in corpus identity. Changing them must reuse the authenticated raw\ntiming and profiler corpus rather than trigger another measurement sweep.\n\nComplete-tree GPU scoring owns one grow-only graph cache and exact frontier\nworkspace per worker process. The turnkey scheduler therefore defaults to one\npersistent worker lane per physical CUDA or ROCm device. Additional lanes\nduplicate the complete per-lane high-water allocation and require an explicit\nprofile showing a workload-specific gain within the reviewed VRAM budget; do\nnot add lanes merely to create more host workers. Prefer using every distinct\nCUDA and ROCm device before duplicating a device-resident scorer workspace.\nBefore a long fit, run `Perf__NativeVNNIPolicyCrossValidation.py`; its default\nprojection includes both grouped CV and the selected OOF winner's publication\ntournament. A CV-only projection is not evidence for end-to-end fit economy.\n\nUse `scripts\u002Frefresh_native_vnni_dispatch_tables.sh` directly only for focused\ndiagnostic phases, partition collection, or lineage\u002Frefinement work that the\nturnkey driver delegates internally.\n\n## Corpus Rules\n\nPublished generations live at:\n\n```text\ncorpora\u002Fnative_vnni_dispatch\u002F\n  \u003Cbackend>\u002F\u003Carchitecture>\u002F\u003Cshape-digest>-\u003Cconfiguration-digest>\u002F\n```\n\nThe top-level `corpora\u002F` directory is the optional `Llaminar\u002Fcorpora` submodule,\nthe home for all published corpus families. Initialize only for corpus work:\n\n```bash\nGIT_LFS_SKIP_SMUDGE=1 git submodule update --init -- corpora\ngit -C corpora lfs pull --include 'native_vnni_dispatch\u002F\u003Cbackend>\u002F**' --exclude ''\n```\n\n`corpus.manifest.json` is reviewable ordinary Git in the data repository. Large\nCSV, JSON, profiler, trace, and archive payloads use its `.gitattributes` LFS\npolicy. Push the data commit and LFS payloads before updating the source\nrepository's gitlink. Never add corpus payloads to the source repository or\nfetch them during ordinary builds or Unit\u002Fpreflight gates.\nThe corpus sealer\u002Fverifier is:\n\n```bash\nPYTHONPATH=tests\u002Fv2\u002Fperformance\u002Fkernels \\\n  python3 -m native_vnni_dispatch.corpus_bundle verify \\\n    --manifest \u003Ccorpus>\u002Fcorpus.manifest.json \\\n    --repository-root .\n```\n\nReject unresolved LFS pointers, symlinks, `.inprogress` files, missing payloads,\ndigest changes, and stale shape inventories. Collect into the ignored `work\u002F`\nstaging root and publish only after certification. A fit failure must reuse the\nsame immutable timing\u002Fprofiler corpus; generate additional measurements only\nfrom an authenticated refinement or shape-lineage plan.\nThe CPU bundle is one dependency-ordered transaction: it must retain the\ncertified Fast-M1 include, policy, timing, and profiler evidence together with\nthe grouped-verifier include, policy, timing, and profiler evidence. Never\npublish grouped rows without the exact serial policy against which they were\ncompiled and certified.\n\nFit-only replay uses `--skip-sweep --reuse-profiler-evidence`. It may regenerate\ncommon observations and authenticated profiler feature tables. Every profiler\ntransaction also retains an exact compact observation-witness CSV. If an older\ntransaction omitted that file, recover it with `profiler_evidence\ncompact-witnesses --feature-table ...`; the command reconstructs only strict\ncommon-observation columns, verifies their embedded digests, and authenticates\nthem against request\u002Fevidence manifests. It must not run trainer timing tests or\nprofiler collectors. Legacy indented evidence is decoded and authenticated on\nphysical-core-capped workers during this recovery, then rewritten in compact\ncanonical form with the same semantic manifest digest. Later feature export and\ncertification can consequently use direct mmap byte authentication instead of\nrepeating the legacy parse.\n\nAll three backend analyzers use a content-addressed policy fit cache beneath\nthe transaction output directory. Development freeze and the mandatory\npre-seal reconstruction must share that cache so unchanged candidate costs,\ncross-validation folds, and final publication trees are reused; cache keys,\nnot directory presence, decide whether retained work is valid.\n\nWhen a ROCm M=1 development transaction has complete timing and profiler\nevidence but has not yet opened its seal, continue with\n`--reuse-rocm-development --rocm-development-build-change-audit NOTE`. This\nmode retains the original timing provenance, authenticates and re-exports the\nisolated profiler evidence, and collects only the fresh sealed and grouped\nphases. The audit is mandatory because the profiler executable may contain a\nharness-only lifetime fix while the immutable timing rows still belong to the\nolder build. Do not use `--skip-sweep` for this state: the sealed and grouped\ncorpora legitimately do not exist yet.\n\n```bash\nscripts\u002Ftrain_native_vnni_dispatch.sh --backend rocm --install -- \\\n  --reuse-rocm-development \\\n  --rocm-development-build-change-audit \"reviewed harness-only rebuild\"\n```\n\nAfter Fast sealed and grouped-verifier timing are also complete, resume the\nsame workspace through the refresh driver with both `--skip-sweep` and\n`--reuse-rocm-development`. The driver authenticates development provenance\nfrom the immutable development common corpus, sealed provenance from the\ncomplementary Fast common rows, and verifier provenance from the grouped common\ncorpus. It must schedule no timing lane and may resume an exact profiler journal\nafter staging the already certified policy. Never use bare `--skip-sweep` for a\ncross-build ROCm workspace because that would substitute current harness\nmetadata for retained measurements.\n\n```bash\nscripts\u002Frefresh_native_vnni_dispatch_tables.sh \\\n  --backend rocm --profile all --output-dir \u003Cworkspace> --install \\\n  --skip-sweep --reuse-rocm-development \\\n  --rocm-development-build-change-audit \"reviewed harness-only rebuild\"\n```\n\nWhen changing only profiler-model features, assess the cross-fitted teacher\nbefore paying for the complete tree frontier. Add\n`--cpu-prefill-diagnostic-max-leaves 1` to a fit-only\n`--stop-after-cpu-prefill-freeze` replay. Despite that authorization flag's\nhistorical name, diagnostic mode stops immediately after the development-fit\nreport and does not freeze, seal, or install anything. Run the profiler-informed\nhalf normally, then repeat the identical command with\n`--cpu-prefill-ablate-profiler-features`; the reports are retained separately as\n`.profiler-informed` and `.profiler-ablated`. The ablation still authenticates\nthe complete request\u002Fevidence\u002Fwitness catalog and withholds only learner\nfeatures. These options are deliberately rejected for collection, sealing,\ninstallation, and every non-CPU-prefill workflow. The teacher's held choices do\nnot depend on leaf budget; a promising diagnostic can then be rerun at the\ncanonical leaf budget while reusing every durable profiler surface.\n\nBefore either A\u002FB fit, inspect the exact model-visible evidence rather than raw\ncounter JSON:\n\n```bash\nPYTHONPATH=tests\u002Fv2\u002Fperformance\u002Fkernels \\\n  python3 -m native_vnni_dispatch.profiler_diagnostics \\\n    --observation \u003Ccompact-observation-witness.csv> \\\n    --requests \u003Cexact-v4-requests.json> \\\n    --evidence \u003Cexact-v4-evidence.json> \\\n    --output \u003Cprofiler-diagnostics.json> \\\n    --require-meaningful-signal\n```\n\nRequire complete per-candidate contests for the stable instruction\u002Fwork and L1\ntargets, meaningful within-contest variation, and explicit reliability rates\nfor duration-derived targets. Runtime codebook and prepared-family counts must\nmatch the physical execution identities requested by the corpus; source-format\naliases may deduplicate only when their complete prepared launch identity is\nidentical. Never treat a binary reliability flag as a continuous learner\nmetric.\n\nThe same diagnostic calibrates feature value against canonical timing. Within\neach exact `(format, mode, M, N, K)` contest, compare the fastest and slowest\ncandidate only when canonical repeated timing separates them by at least 5%.\nReview metric coverage, median fast-minus-slow movement, and expected-direction\nmatch rate. Keep profiler-duration-derived throughput proxies labeled\nseparately from static resources and dynamic hardware counters: a timing proxy\ncan validate attribution but is not evidence that occupancy, cache behavior,\nor issue efficiency explains the win, and it must not become an auxiliary fit\ntarget beside canonical repeated timing. Collapse correlated GPU ALU\u002FFMA\u002Ftensor\npipe counters into the reviewed aggregate compute-throughput target instead of\ngiving one latent signal several votes. Candidate dispatch count is a static,\nruntime-known model input. A metric that is unavailable across a complete\ncontest, mostly tied, directionally inconsistent, or unchanged in the\nprofiler-informed versus ablated CV run is not a useful dispatch feature.\n\nEvery profiler record belongs to one exact physical production invocation:\nbackend, architecture\u002FISA, operation, bundle, prepared family, packing ABI,\nruntime codebook, effective candidate, execution mode, `M`, ordered projection\n`N` vector, aggregate `N`, and `K`. Generate one request for every measured\nlaunchable point. Deduplicate only true aliases with that complete identity.\nNever broadcast counters from a representative anchor to another work size or\ncandidate, and never average unrelated launches into one descriptor.\n\nFinal CUDA\u002FROCm combined profiler transactions are additive. Seed them from\nthe authenticated development request\u002Fevidence\u002Fwitness triplet, derive exact\nmissing requests from the enlarged sealed\u002Fgrouped observation surface, profile\nonly that delta, and compose atomically. Never re-profile unchanged M=1\ndevelopment launches merely because the final corpus has a different filename.\n\nNsight byte prefixes are decimal: `Kbyte` means 1,000 bytes, not 1,024.\nCollectors export explicit base units; retained scaled CSVs use the same\ncanonical parser. For completed older CUDA batch evidence, use\n`native_vnni_dispatch.profiler_reparse --requests \u003Crequests.json>\n--source-evidence \u003Cevidence.json> --raw-directory \u003Craw-dir>\n--upgrade-in-place`. It authenticates and reparses saved batches without GPU\nwork, preserves a versioned original and lineage receipt, and rejects changes\noutside byte-valued metrics. Never edit counter JSON or relaunch timing to fix\ndisplay units. Finish or explicitly recover an old live journal before this\ncompleted-manifest upgrade; the command will not truncate it. An unavailable\nspill metric is not a zero-spill result: retain separate exact-kernel resource\nand dynamic-spill evidence when the economical collection pass omits it.\n\nCUDA and ROCm collectors amortize profiler injection, device-context creation,\nand fixture preparation across bounded exact-request batches. The collector\nwrites an authenticated TSV plan; the trainer claims every row once and opens\none distinct controlled range around that row's extra production launch. Nsight\npartitions CUDA evidence by the request's explicit stream, while rocprofiler\npartitions the ordered physical trace by its per-request renamed ranges on every\ncounter pass. A successful process must report every planned request exactly\nonce, retain per-member binary and batch provenance, and reject missing,\nduplicate, reordered, non-contiguous, or cross-attributed ranges. Process\nbatching changes setup cost only: it never merges candidate metrics or turns a\nmulti-candidate interval into one profiler record.\n\nFor CPU grouped-verifier evidence, retain the authenticated effective N-block\nchunk width in every observation. Pairwise and WideRows inherit that geometry\nfrom serial M=1 planning, while the full-K row-chunk, N-major, and pair-grid\nfamilies own distinct task grids. Model their producer tasks, waves, final-wave\nutilization, row-tile coverage, and (for K-part routes) ordered reduction work\nseparately. Inferring one family's geometry from another erases the schedule\nsignal the learner needs and can make physically different candidates appear\nidentical.\n\nRequest schema `native-vnni-profiler-request-v5-stratified-exact-point` is the\ncurrent fit contract. Canonical timing remains exhaustive. For every exact\nbackend\u002FISA\u002Fformat\u002Fshape\u002Fmode\u002FM contest, rank its physical candidates by the\ncanonical timing result and profile the fastest 5%, centered median 5%, and\nslowest 5%, with a minimum of one candidate per stratum. Each selected physical\nlaunch is still profiled separately; true launch aliases may share evidence\nonly when every launch-changing field is identical. Historical v3 anchor and\nv4 exhaustive exact-point catalogs remain immutable and readable for\nprovenance, but are not admissible current fit evidence. A replacement\ntransaction is derived from existing canonical timing witnesses and does not\nrepeat canonical timing. Evidence composition rejects incompatible request or\ncollector generations, missing records, conflicting counters, or a profiled\nlaunch whose complete identity differs from its request. Compatible immutable\nraw-profiler feature generations are normalized to the current exporter schema\nduring composition; a feature-engineering change is never authority to\nrelaunch hardware counters.\n\nWhen a final timing corpus extends a previously complete profiler transaction,\ndo not reprofile the covered launch surface. Run `profiler_evidence\nemit-missing-requests` with the final corpus and every covered request\u002Fevidence\nmanifest, collect the emitted exact delta with `--resume --retry-failures`, and\ncompose the transactions only after exact physical-key coverage succeeds. A\nzero-row delta is the proof that the profiler catalog covers the fit corpus.\nThe turnkey driver discovers completed content-addressed deltas that were not\nyet atomically published, authenticates them, and includes them in coverage\nbefore emitting another request. It also resumes when only the durable\n`.inprogress.jsonl` collector journal exists, or when request publication\ncompleted before any final evidence or journal record was written. If corpus\nregeneration changes only representative provenance and therefore derives new\nobservation\u002Frequest IDs, the driver authenticates the old manifest and journal,\npublishes successful terminal members as an immutable subset transaction, and\nsubtracts exact physical-launch coverage before opening a new delta. It never\nrewrites old request IDs, observation digests, command digests, raw-artifact\ndigests, or counters; failed\u002Fmissing journal members remain fresh obligations,\nand overlapping journals contribute only their uncovered physical tail. A\nretained legacy request generation may remain beside a current exact-v4\ntransaction for provenance; authenticate and resume the current manifest\ninstead of copying the legacy generation over it. Audited common-observation\nreuse snapshots its retained input through an atomic reflink copy and never\nrenames away the canonical analyzer input. CPU decode retains one stable\ndevelopment run ID per output directory so a restart reopens the same partial\ntransaction instead of creating a timestamp sibling. Physical resume identity\nignores timing-run provenance but includes arithmetic fingerprint, candidate\npolicy hash, schedule, workspace, prepared resources, threading\u002Fstream mode,\nexecution mode, and exact `M\u002FN\u002FK` geometry.\n\nMigrate the recipe through its authenticated command, not by editing JSON:\n\n```bash\nPYTHONPATH=tests\u002Fv2\u002Fperformance\u002Fkernels \\\n  python3 -m native_vnni_dispatch.cpu_prefill_replay_recipe \\\n  set-primary-profiler \\\n  --recipe \u003Ccorpus>\u002Fcpu_prefill_replay_recipe.v1.json \\\n  --requests \u003Ccorpus>\u002Fcpu_prefill_profiler_requests.aligned.json \\\n  --evidence \u003Ccorpus>\u002Fcpu_prefill_profiler_evidence.aligned.json \\\n  --observations \u003Ccorpus>\u002Fcpu_prefill_profiler_observation_witnesses.aligned.csv \\\n  --clear-additive-profiler-transactions\n```\n\nThe clear flag is required when the replacement transaction completely\nsupersedes incompatible additive catalogs; the command refuses to discard\nthose lineage records implicitly.\n\nThe immutable corpus is the reusable evidence product. A failed fit does not\nauthorize another broad measurement sweep. Refit from the same timing and\nper-candidate profiler records, adjust learner features\u002Fsearch, or append only\nan authenticated refinement plan for named domains. Resume collection from\ncontent-addressed checkpoints; never discard completed cells because one later\nshape is flaky or one fitter configuration changes.\n\nRefinement fits are content-addressed and incremental. Candidate costs\ninvalidate only the changed generic domain. Profiler-informed CV invalidates\nevery codebook and prefill M in the changed cross-M transfer pool because those\ndomains share one surrogate. M is a numeric model feature, not a pool boundary;\nheld-out N\u002FK geometry must be removed across all M and formats before fitting.\nUnrelated ISA, arithmetic-contract, operation, bundle, and execution-mode pools\nmust remain cache hits. Cache CV on normalized model-visible descriptor content\nplus the affected pool's cost identities; keep the full request\u002Fevidence\u002Fcorpus\nprovenance digest in frozen policy metadata. Never put a global additive\ntiming-corpus digest in every domain's CV key. Cache the stable final\npublication leaves with each production CV entry as well; an identical replay\nmust not deserialize candidate costs or rerun final GPU tree fitting for\nunchanged domains.\n\nProfiler-model parallelism covers both feature materialization and independent\nsurfaces. Alias indexing compares cheap source\u002Fmode\u002Fcandidate identities first\nand computes observation SHA-256 only for true ties. Materialize each large\npool's normalized candidate feature index in deterministic contiguous\nphysical-core shards into aligned `float32` inputs, `float64` auxiliary and\nregret targets, N\u002FK anchors, contest IDs, and one point-to-row table. Forked GPU\nworkers inherit those immutable matrices and the point table copy-on-write;\nnever rescan the complete transfer pool for each held-out surface. Run one\npersistent XGBoost CUDA-histogram worker per selected CUDA device. Divide\naffinity-visible physical cores across those workers for quantile construction,\nnever count SMT siblings as additional capacity, and keep explicit worker\u002Fthread\nenvironment variables as diagnostic overrides. Serial and parallel feature\npublication and predictions must remain exactly equal.\n\nPost-accelerator CV reduction is also domain-parallel. The parent groups fold\nresults by generic domain, forks immutable cost\u002Ffold matrices copy-on-write,\nand sends only inherited domain indices to workers. Cap the reduction pool at\nthe affinity-visible physical-core count even when\n`LLAMINAR_NATIVE_VNNI_POLICY_WORKERS` requests more; merge results in canonical\ndomain order and publish fit-cache records only from the parent. With\n`LLAMINAR_NATIVE_VNNI_POLICY_TIMING=1`, require a nonzero\n`cv_reduction_workers` field for an uncached multi-domain fit and compare\n`cv_reduction` separately from device `fold_fit`. Serial and parallel runs over\nthe same evidence must produce identical policy objects and generated bytes.\n\nLarge compact request\u002Fevidence manifests and canonical observation witnesses\nmust also parse and authenticate on the affinity-visible physical cores. Split\nJSON only at top-level record boundaries and CSV only at complete row\nboundaries; preserve source order, verify the unchanged root digest, retain a\nserial compatibility reader for noncanonical legacy JSON, and prove\nserial\u002Fparallel value and tamper-detection equivalence in unit tests.\n\nEvery profiler descriptor retains the exact isolated launch identity, including\n`M`, ordered `N`, aggregate `N`, and `K`. Dynamic counters such as throughput,\nIPC, cache behavior, achieved occupancy, and traffic describe only\nthat exact point; they are never shape-independent candidate constants and are\nnever model inputs for a held\u002Funseen point. Model inputs are runtime geometry,\ncodebook, candidate configuration, analytical schedule geometry, and genuinely\nstatic resource descriptors. Selected exact dynamic metrics are centered\nagainst the other candidates at the same work point and added as standardized\nauxiliary targets beside log-regret. The deterministic CUDA-histogram learner\nmixes them into a fixed number of zero-sum target projections whose mean exactly\nreconstructs standardized regret; adding another reviewed counter must not grow\none tree family per metric. One-shot profiler duration and\nrates derived from it remain attribution diagnostics because canonical repeated\ntiming already owns the latency label. The auxiliary metrics' combined target\nvariance weight is\nbounded below the timing target, so they can teach which execution properties\ntrack candidate economy without becoming a runtime dependency or overwhelming\ncanonical latency. Admit one metric for a candidate contest only when every\ncompeting candidate published it; optional-event absence is neutral, never the\nnumeric value zero. Apply reviewed reliability weights inside the bounded\nauxiliary budget: stable instructions-per-work outrank L1 behavior, and sparse\nLLC or duration-derived evidence remains secondary. During coherent N\u002FK CV,\nremove held geometry across every M and format before constructing both regret\nand auxiliary targets. A fold with no varying candidate-relative dynamic target\nis measured-only; configuration features cannot masquerade as profiler\ninfluence.\n\nCPU decode retains two normalized views of the same exact counters. Per\nexpected MiB captures the bandwidth and weight-reuse question; per million\nlogical MACs captures scheduler and instruction overhead as grouped M grows.\nExpose decode arithmetic intensity from runtime-visible geometry, and expose\nboth effective GB\u002Fs and GOP\u002Fs for GPU decode. Do not classify grouped verifier\nrows as prefill merely because M is larger than the original MTP range.\n\nTreat the profiler surrogate as two additive CV candidates. The bounded-prior\nvariants may reshape only training costs before an ordinary generic tree is\nfitted. The cross-fitted teacher may instead choose a held candidate directly\nfrom its complete predicted regret surface. In both cases the choice is judged\nonly by held canonical timing. A winning teacher is never a runtime dependency:\nits out-of-fold candidate decisions are distilled by the existing publication\ntournament into a bounded, total generic C++ tree.\n\nProfiler records must also contain reviewed candidate-aware schedule geometry.\nRaw `(M,N,K)` plus a categorical family name is insufficient when two kernels\npublish different task grids. Derive exact runtime-visible task counts, worker\nwaves, final-wave utilization, rows\u002Foutput values\u002FMACs per task, and tile-tail\nutilization from the same launch formulas used in production. These analytical\nfeatures contain no winner or latency label; held canonical timing decides\nwhether they improve selection. Add formulas symmetrically as CUDA and ROCm\ncandidate families enter the common fitter.\n\nPersist each paid profiler prediction surface in the policy fit cache. Its\nidentity binds the complete cross-M candidate-cost pool, model-visible profiler\ndescriptor digest, held N\u002FK geometry set, and exact prediction-point inventory.\nStore only the domain-local training points consumed by bounded-prior fitting\nand held points consumed by teacher scoring; do not persist unrelated transfer-\npool rows. Store one canonical little-endian `float64` value per point plus a\nsmall JSON manifest containing the ordered point digest, value digest, count,\nand model\u002Fholdout identities; never repeat runtime keys in every surface JSON.\nParallel cache workers authenticate raw arrays and return hit identities only.\nThe coordinator opens read-only memmaps and shares one lazy point-to-row index\nacross sibling fold surfaces, so neither cache replay nor worker publication\npickles complete prediction maps. Reject partial, foreign, non-finite, or\ndigest-changed arrays. An identical replay must report zero profiler-model\nworkers even when its in-memory cache starts empty; changing timing labels,\ndescriptors, holdouts, or requested points must produce a new immutable surface.\nPublish misses from their owning GPU worker and consume completion order; parent\nserialization or ordered draining can strand accelerators behind one slow fit.\n\nInventory preparation must preserve the historical point order and framed JSON\ndigest when reusing encoded runtime\u002Fstring fragments or flattened sort keys.\nProve equality against an independent original encoder, including every runtime\ndiscriminator and escaped\u002FUnicode strings. Memoized structural lookup hashes\nbelong only to their Python process: omit them from pickle and verify dictionary\nreconstruction under another interpreter hash seed. Measure preparation apart\nfrom GPU fitting; unchanged semantic evidence must remain a cache hit.\n\nCV fitting-label reuse belongs to one scorer lane and one active immutable\ncost\u002Fheld-geometry\u002Fprediction scope. Reuse labels across feature\u002Fplacement\nalternatives, never their evaluated decisions. Prove exact uncached CV results,\nstorage invalidation, mutable-map rejection from retention, and joined lane\ncleanup; see the ownership contract in [pipeline internals](references\u002Fpipeline.md#fit-internals).\n\nLarge CPU common-observation checkpoints are parsed in deterministic byte-range\nprocess partitions and reduced in source order. Keep the measured 8-worker\ndefault unless a new corpus benchmark proves another winner. Use\n`LLAMINAR_NATIVE_VNNI_ADAPTATION_WORKERS` for controlled A\u002FB runs and\n`LLAMINAR_NATIVE_VNNI_DISABLE_PARALLEL_ADAPTATION=1` only for serial diagnosis;\nparallel and serial replay must produce the identical corpus digest.\n\nLarge common-observation checkpoints are also emitted in deterministic process\npartitions. Workers format private row-range shards, and the parent assembles\nthem in source order before one atomic publication. Control this only for A\u002FB\ndiagnosis with `LLAMINAR_NATIVE_VNNI_IO_WORKERS`; parallel and serial CSV bytes\nmust remain identical.\n\nCPU M=1 and grouped decode adapt their raw aggregate\u002Ftiming transaction once,\nthen freeze, fresh-seal planning where applicable, and certification reuse the\ncommon checkpoint through `--reuse-development-common`. Reuse must revalidate\nthe raw corpus digest plus every git\u002Fbuild\u002Fcompiler\u002Fhost\u002Fruntime\u002Fserial-policy\nfield, including the ISA-specific build suffix. Never trade repeated adaptation\nfor an unauthenticated common CSV. Both regimes also persist the authenticated\nnormalized profiler catalog under their fit-cache directory; freeze and\ncertification must reuse it when the bound request\u002Fevidence\u002Fwitness identities\nare unchanged.\n\nFor large CPU, CUDA, or ROCm timing transactions, parse exact sidecars in\nbyte-safe physical-core ranges that begin and end only at complete measurement\ngroups or candidate trials. Adapt aggregate rows into private canonical CSV\nshards before ordered atomic assembly. Keep small corpora serial below reviewed\nthresholds. Any change to this preprocessing must prove equal timing maps,\nobservation order, corpus digest, and output bytes against serial replay.\n\nBoth CPU decode surfaces require iterative paired development before freeze:\nuse `paired_requests --surface decode-m1` for serial decode and\n`--surface grouped-verifier` for grouped verifier rows, retain every completed\ncontent-addressed shard, and feed the resulting `--paired-development-csv`\nset into freeze and certification. Read independent paired shards in a\nphysical-core process pool, but merge and validate the comparison graph in the\nparent so serial and parallel evidence digests remain identical. Increase a\ntree ceiling only after diagnostics prove the selected model exhausted the\ncurrent bound; a failing domain whose selected tree is smaller has a different\nmodel or evidence problem. Never freeze directly from broad timing\nwhen paired refinement still reports pending or confirmed failing domains.\nFor alias-robust cells, request the source alias whose corrected best candidate\nhas the greatest advantage over the selected route; the minimax compromise\ncandidate is not necessarily that regret witness. In the same refinement\ngeneration, complete a direct star from the selected launch to every physical\ncandidate forceable across all source aliases. Keep every edge for that runtime\ncell in one producer process\u002Fshard even when doing so exceeds the nominal shard\npacking target. Indirect graph connectivity assembled from separate process,\nsocket, clock, cache, or thread-runtime histories is not evidence for a direct\ncandidate ordering. Once a same-session selected-to-witness edge is complete,\nthe complete directional star is the immutable evidence unit for that runtime\ncell. Derive every later selected-candidate ordering from that original star;\na refit-selected anchor must never mint a second star. A remaining contradiction\nis a terminal evidence conflict. Never mint another request for the same\nphysical edge merely because the aggregate corpus digest changed.\n\nCanonical observation hashing and fit-cache identity preparation are also\nhost-parallel. `ObservationCorpus.digest()` serializes\u002Fsorts row shards in fork\nworkers, derives deterministic lexical range splitters, merges disjoint global\nranges on the worker pool, streams already ordered fragments into SHA-256, and\nmemoizes the result on the immutable corpus. The coordinator must never perform\na corpus-wide Python row merge. Serialization, shard partitioning, and range\nmerge reuse one persistent physical-core-capped process pool so a large loaded\ncorpus is forked only once per digest. Regressions must prove both one-pool\nlifetime and exact historical digest bytes. Domain-local\nsemantic, paired-edge, legacy-migration, and serial-oracle cache identities are\ncomputed independently across policy workers. Use\n`LLAMINAR_NATIVE_VNNI_CORPUS_DIGEST_WORKERS` and\n`LLAMINAR_NATIVE_VNNI_POLICY_WORKERS` only for controlled A\u002FB diagnosis; a\nserial\u002Fparallel equality regression is mandatory for either implementation.\nWith `LLAMINAR_NATIVE_VNNI_POLICY_TIMING=1`, inspect `cache_identity`,\n`cost_keys`, `profiler_identity`, `cache_lookup`, and `candidate_costs`\nseparately instead of treating their sum as tree-search time.\n\nCPU prefill split migrations use\n`--cpu-prefill-fit-development-lineage-plan` during fit-only replay. Supply the\nimmutable source aggregate\u002Ftiming, all source route manifests, every historical\nrefinement plan in order, and every distinct split manifest named by those\nplans. The analyzer routes each plan by its embedded split digest; never flatten\na mixed v8\u002Fv9 lineage onto the newest source split or omit older rounds.\nFor collection, pass the intended plan path even when it does not exist. The\nrefresh transaction first probes the exact target binaries, authors the plan\nfrom those route manifests, and thereafter treats it as immutable resumable\nevidence. Do not precompute a plan against another build.\n\nOnce a CPU-prefill corpus has candidate expansion, split lineage, or generic\nrefinement history, production replay MUST use its typed\n`cpu_prefill_replay_recipe.v1.json`; the individual flags above are diagnostic\nand collection primitives, not an operator interface. The direct supported\nreplay is:\n\n```bash\nscripts\u002Frefresh_native_vnni_dispatch_tables.sh \\\n  --backend cpu-prefill --profile all \\\n  --output-dir \u003Ccorpus> --skip-sweep --reuse-profiler-evidence \\\n  --collect-cpu-prefill-sealed-after-freeze \\\n  --cpu-prefill-fit-replay-recipe \\\n    \u003Ccorpus>\u002Fcpu_prefill_replay_recipe.v1.json \\\n  --install\n```\n\nA post-freeze seal must use artifact names that cannot collide with an opened\nor burned generation. Relocate the authenticated recipe before launching a new\nseal instead of copying it or editing path strings by hand:\n\n```bash\nPYTHONPATH=tests\u002Fv2\u002Fperformance\u002Fkernels \\\n  python3 -m native_vnni_dispatch.cpu_prefill_replay_recipe relocate \\\n    --recipe \u003Csource>\u002Fcpu_prefill_replay_recipe.v1.json \\\n    --output \u003Cfresh-seal>\u002Fcpu_prefill_replay_recipe.v1.json\n```\n\nRelocation rewrites recipe-relative artifacts, copies the common-observation\ncheckpoint, publishes a new self digest atomically, and authenticates the\nresult. It does not authorize reuse after the production serial-M1 policy hash\nchanges. That hash identifies the row oracle against which grouped candidates\nwere proved byte exact; a changed hash requires a fresh CPU-prefill measurement\ngeneration built against the installed serial policy.\n\nThe public `train_native_vnni_dispatch.sh --backend cpu-prefill --install`\ncommand discovers that recipe automatically in a materialized corpus. Recipe\npreflight runs before route probes and authenticates candidate-expansion\nsource pairing, target\u002Fsource routes, distinct split generations, historical\nversus current plan roles, additive timing order, profiler triplets, and\ncheckpoint state. A copied path-bound complete checkpoint is automatically\nrebased after its complete plan partition is validated; only transaction\nprovenance changes, and historical timing is not reinterpreted under newer\nadapter code. This adaptation launches no trainer kernel or profiler.\nFor a complete checkpoint, preflight forwards its authenticated raw corpus\nidentity to development fit, freeze, and certification; those processes must\nnot stream-hash the same raw sidecars again. Prefix and sealed contexts keep\ntheir own independently derived identities.\nOnly an explicitly declared `prefix` checkpoint may be extended, and its input\ncount is mandatory. Never infer checkpoint state from file existence.\n\nCPU-prefill sealed evidence is planned after generic freeze. Every frozen leaf\nmust receive one physical route witness from authenticated target route\nmanifests or an untimed diagnostic completion probe. Generated\n`CPUPrefillAutoRefine_*` geometry must be absent from development, and the\nself-contained witness plan embeds its exact C++ route. Validate that every\nfrozen predicate is exercised before launching timing and again during\ncertification; a fixed hand-authored sealed shape list is not sufficient.\n\nCPU M=1 and grouped-decode certification use the same fresh-leaf rule. M=1\nfreeze emits a generated geometry probe; run the production C++ route planner\nfor AVX2-build\u002FAVX2-runtime, AVX512-build\u002FAVX2-runtime, and\nAVX512-build\u002FAVX512-runtime before emitting paired request shards. Grouped\nfreeze emits direct Pairwise\u002FWideRows paired shards for every frozen M leaf.\nEach shard must cover every source alias and every alternate forceable\ncandidate. Admit grouped timings only after the production route counter and\ncomplete `M*N` byte comparison against production serial M=1 pass. Never\nsubstitute the historical static CPU sealed-shape CSVs for this transaction.\n\nCPU paired timing must alternate and record selected-first and exact-first\ninvocation order. Estimate candidate regret by taking the median log ratio in\neach order stratum and weighting the two strata equally; never pool raw ratios\nacross opposite orders. Bootstrap each stratum independently, and reject a\ncell that lacks complete order identity or either crossover direction. This\nremoves stable first\u002Fsecond invocation effects without weakening the paired\nconfidence bound.\n\nDo not defer sealed-capacity planning until installation. Before final\ndevelopment refinement, authenticated preflight must report the provisional\nleaf count, untouched-reserve reachability, projected witness geometry,\nsource-format, format\u002FM-cell, process-job, and candidate-measurement counts,\nplus calibrated wall time by ISA regime and available measurement lane. Fix\nthe reserve commitment and coverage obligations before fitting, but keep all\nholdout timings opaque until the final generic digest is frozen. Development\nCV may guide fitting; sealed evidence must never do so. If a policy changes\nafter sealed results are inspected, burn that seal and certify against a new\nuntouched partition.\n\nA burned seal is reusable development evidence only through a typed\n`cpu-prefill-burned-seal-development-v1` transaction. The transaction binds\nthe aggregate, timing sidecar, old witness plan, and the git\u002Fbuild\u002Fcompiler\u002F\nhost\u002Fruntime\u002Fserial-policy provenance that actually measured it. Add it to the\nCPU-prefill replay recipe with `cpu_prefill_replay_recipe add-burned-seal`.\nReplay materializes a mixed common-observation checkpoint before fitting and\nvalidates each original corpus-ID partition independently. Never append failed\nseal CSVs under development provenance, and never reuse that opened partition\nto certify the changed policy.\n\nCPU M=1 and grouped-decode use paired burned-seal transactions rather than\nordinary observation adaptation. Supply each inspected plan and its complete\npaired CSV directory positionally through the repeatable\n`--cpu-decode-burned-sealed-plan` \u002F\n`--cpu-decode-burned-sealed-paired-dir` or grouped equivalents. Revalidate the\nrequest\u002Fevidence identity and convert selected-versus-challenger ratios only\ninto supplemental generic candidate costs. Never create exact overlays or\nordinary timing observations from those ratios. At unseen burned geometry,\nprofiler input may carry runtime geometry plus static candidate\u002Fresource\ndescriptors, but no request-local dynamic counter. Exclude every burned\ngeometry from the next reserve, freeze a changed generic digest, and require a\nnew untouched seal before publication. Carry the same burned transaction\nthrough freeze, fresh-plan construction, and certification so replay cannot\nsilently regenerate a different policy generation.\nThe later development corpus is expected to have a different digest after\nadditive geometry or another burned generation. Authenticate the old plan's\nself digest and current candidate\u002Fformat registries, replay every paired row,\nand require each witness to resolve to exactly one compatible current generic\ndomain; never require whole-corpus equality for generic-only burned evidence.\n\nTrack every newly discovered orchestration failure in the project document's\n**Turnkey replay defect journal** before fixing it, and add a focused negative\npreflight regression. A dry command rendering is not authenticated preflight.\n\n## Shared Shape And Candidate Ownership\n\nUse `native_vnni_dispatch.shape_manifest.load_shape_manifest()` as the one\nresolved CPU\u002FCUDA\u002FROCm shape inventory. `tests\u002Fv2\u002FCMakeLists.txt` centralizes\nthe JSON sources used by all C++ trainers. Add Qwen release architecture data\nonce to the shared catalog; never add corresponding backend-specific lists.\nRuntime dispatch keys remain model-agnostic: codebook, execution mode, M, N,\nand K, with generic predicates based on codebook, geometry\u002Faspect, and work.\nSynthetic boundary-refinement geometries are generic-learning evidence only.\nExact overlays may be emitted only for shape\u002FM cells declared as production\noverlays in the shared manifest\u002Fprefill matrix, and emitted names must be the\ncanonical production names rather than synthetic evidence aliases.\n\nRegister launchable template instantiations in the common candidate registry.\nThe sweep must execute the real registered candidate ID and confirm the\nobserved route\u002Fcounters. Unsupported combinations need explicit typed records,\nnot missing rows. Do not serialize a combinatorially projected formula corpus;\nretain measured cells and evaluate formulas during fitting.\n\nCUDA `fused_kpar` is a distinct physical publication family with the same\nexact-KB arithmetic fingerprint as global KPAR. Its CTA width and partition\ncount must pass `CUDACanonicalKpartFoldPlan` admission without clamping. The\ntrainer authenticates compiler resources before timing, and grouped verifier\nrows inherit the frozen KB through their own economical grouped producer.\nNever interpret the historical `force_two_phase` CSV field as a launch count:\nit authenticates ordered partials; the candidate family owns physical storage\nand dispatch count. Changing the registry requires a new or authenticated\nexpanded corpus, not relabeling old measurements.\n\nLiteral global and fused KPAR counts are exact-overlay candidates, not total\ngeneric leaves. Project both families through `cuda_shape_resolved.py`; each\nformula must resolve to a directly measured physical candidate and respect its\nCTA capacity. Emitters must reject literal-count generic leaves, never append\nan admission condition absent from the certified tree. Verify Python\u002FC++\nresolver agreement at small K and physical-capacity boundaries before fitting.\n\nBefore timing any CUDA or ROCm candidate, query the exact compiled template\nspecialization's static resources through the backend runtime. A non-zero CUDA\nlocal-memory allocation or ROCm private\u002Fscratch allocation disqualifies that\nspecialization before graph capture and timing; register spilling is an\neligibility failure, not a learner feature. Keep an all-format\u002Frole\u002Fcandidate\nresource-inventory regression, and require isolated `ncu`\u002F`rocprof` evidence to\nconfirm zero dynamic spill traffic for every promoted production candidate.\n\n## Measurement Surfaces\n\n- **Fast M=1 decode\u002FGEMV:** bandwidth-sensitive serial decode. Optimize the\n  fraction of sustainable memory throughput while accounting for launch and\n  reduction overhead.\n- **Grouped verifier M=2..16 plus sentinels:** require byte equality with each\n  serial row. M=31 is evidence that runtime support is not artificially capped;\n  production M is not limited to the measured buckets.\n- **Ordinary prefill\u002FGEMM:** sweep every applicable production geometry and all\n  21 source formats. CPU uses M={32,128} below 7B, M={32,64} from 7B through\n  below 14B, and M={32} at 14B and above; it measures every build\u002Fruntime ISA\n  regime. CUDA and ROCm consume the exact physical capture inventory from\n  `src\u002Fv2\u002Futils\u002FPrefillGraphBuckets.def`; never train virtual long-context M\n  values that production only realizes as repeated captured chunks. Exact\n  overlays come only from these exact cells; generic rules provide total\n  dispatch for every unseen positive M and N\u002FK geometry.\n\nAn installable GPU prefill row must compare the complete `M*N` output against\nits certified oracle on the exact producer stream. Use\n`GPUTrainerVerification.h`: retain the oracle in device memory, enqueue the\nbackend comparison after canonical timing, and materialize only mismatch count\nand first-byte offset. Sampled rows, cosine alone, or a host-side full-output\ndownload are diagnostic evidence and cannot authorize an overlay. Keep\n`V2_Integration_CUDATrainerFullBufferByteCertificate` and\n`V2_Integration_ROCmTrainerFullBufferByteCertificate` green; they prove signed\nzero and NaN-payload sensitivity, full-span mismatch detection, and null-stream\nintolerance.\n\nFor dense CUDA\u002FROCm prefill, use the backend-neutral resumable transaction.\nEvery cell is one source format, exact production geometry, and physical graph\nbucket. The runner may place all missing M cells for one format\u002Fgeometry into\none native process so prepared weights are uploaded once; it must split and\nauthenticate aggregate rows and every native-event sample back into independent\ncell artifacts before atomic promotion. Thus batching changes setup cost only,\nnot timing semantics or resume granularity:\n\nThe transaction accepts only a `Release` scorer. Its immutable plan hashes the\nexact trainer executable and its resolved `libllaminar2_core.so`; every cell\npublishes a manifest last that binds those hashes, the plan\u002Ftiming cardinality,\nthe shared native-process invocation, and all artifact digests. `status`,\n`combine`, and installation authenticate those manifests without rewriting the\nplan. A rebuilt scorer\u002Fcore or changed matrix requires a new corpus directory;\nnever seed a Release corpus with Integration measurements.\n\nCUDA additionally preflights the complete compiler specialization matrix.\nOnly candidates with zero primary and ordered-reducer local memory enter timing;\nthe per-row registers, shared-memory footprint, launch width, and active-block\nevidence are authenticated with the native timings. AUTO receives one untimed\nroute-resolution probe and is then held to the same exact-symbol resource gate.\n\n```bash\nPYTHONPATH=tests\u002Fv2\u002Fperformance\u002Fkernels \\\n  python3 -m native_vnni_dispatch.production_dense_prefill_sweep run \\\n    --backend \u003Ccuda|rocm> --output-dir \u003Cwork-dir> \\\n    --binary \u003Crelease-native-vnni-prefill-perf-binary> --devices \u003Cordinals>\n\nPYTHONPATH=tests\u002Fv2\u002Fperformance\u002Fkernels \\\n  python3 -m native_vnni_dispatch.production_dense_prefill_sweep status \\\n    --backend \u003Ccuda|rocm> --output-dir \u003Cwork-dir>\n\nPYTHONPATH=tests\u002Fv2\u002Fperformance\u002Fkernels \\\n  python3 -m native_vnni_dispatch.production_dense_prefill_sweep combine \\\n    --backend \u003Ccuda|rocm> --output-dir \u003Cwork-dir>\n\nPYTHONPATH=tests\u002Fv2\u002Fperformance\u002Fkernels \\\n  python3 -m native_vnni_dispatch.dense_production_overlay \\\n    --backend \u003Ccuda|rocm> --work-dir \u003Cwork-dir> \\\n    --output \u003Cbackend-generated-include> --summary-csv \u003Csummary.csv>\n```\n\nAn installed overlay must not contaminate a later additive sweep. The native\ntournament scopes exact-overlay lookup off, so `AUTO` always denotes the total\ngeneric policy and each forced candidate retains its physical identity.\nProduction keeps overlay lookup enabled. A corpus row in which `AUTO` resolves\nthrough an installed exact cell is invalid evidence and must fail\nauthentication.\n\nFor a focused dense refresh, retain unrelated installed exact rows with the\ngenerator's paired `--retain-base-include` and `--retention-receipt` options.\nThe base must be an immutable copy of the installed include. The generator\nauthenticates its selector ABI and sorted literal keys, replaces only the\nnewly measured plan's keys, and preserves every other row byte-for-byte. The\nreceipt identifies retained policy separately from fresh measurements; the\nsummary CSV describes only the latter. This does not recertify old timing or\nchange Auto on unseen geometry. See the additive recipe in\n[pipeline internals](references\u002Fpipeline.md#additive-dense-gpu-prefill).\n\nFor routed production MoE prefill, use the same backend-neutral resumable\ntransaction for CUDA and ROCm. One worker owns each physical device; every cell\nmeasures the complete arithmetic-eligible candidate inventory and is promoted\natomically only after aggregate\u002Fraw-timing authentication. Missing M values for\none source tuple, geometry, and route profile share one native process and one\nprepared expert set, while retaining independent timing rows and commit\nmanifests per M.\n\nThe corpus root is immutable with respect to backend, candidate and route\nsemantics, and the exact Release trainer plus resolved\n`libllaminar2_core.so`. Every invocation writes a content-addressed plan under\n`plans\u002F` that binds its selected GGUF source geometries and positive M values;\na later source geometry or M is therefore an additive plan and reuses\noverlapping committed cells without rewriting the baseline plan. Do not hash\nthe whole evolving GGUF inventory into the root contract, because adding one\nnew model shape must not strand valid measurements. Each cell manifest is\npromoted last and binds the producing plan, shared native-process invocation,\ndevice ordinal, and aggregate, raw-timing, and log digests. `status`, `combine`,\nand overlay installation are read-only and authenticate that closure. Orphaned\nfiles, staging remnants, changed producer bytes, and incomplete route\u002Fsource\nsurfaces are fatal. `combine` publishes beneath\n`combined\u002F\u003Cplan-sha256>\u002F` so supplemental plans cannot overwrite an earlier\naggregate:\n\n```bash\nPYTHONPATH=tests\u002Fv2\u002Fperformance\u002Fkernels \\\n  python3 -m native_vnni_dispatch.production_moe_prefill_sweep run \\\n    --backend \u003Ccuda|rocm> --output-dir \u003Cwork-dir> \\\n    --binary \u003Cv2_perf_moe_verifier_prefill> --devices \u003Cordinals>\n\nPYTHONPATH=tests\u002Fv2\u002Fperformance\u002Fkernels \\\n  python3 -m native_vnni_dispatch.production_moe_prefill_sweep status \\\n    --backend \u003Ccuda|rocm> --output-dir \u003Cwork-dir>\n\nPYTHONPATH=tests\u002Fv2\u002Fperformance\u002Fkernels \\\n  python3 -m native_vnni_dispatch.production_moe_prefill_sweep combine \\\n    --backend \u003Ccuda|rocm> --output-dir \u003Cwork-dir>\n\nPYTHONPATH=tests\u002Fv2\u002Fperformance\u002Fkernels \\\n  python3 -m native_vnni_dispatch.moe_production_overlay \\\n    --backend \u003Ccuda|rocm> --work-dir \u003Cwork-dir> \\\n    --output \u003Cbackend-generated-include> --summary-csv \u003Csummary.csv>\n```\n\nThe generated key contains only execution codebooks, hidden\u002Fexpert geometry,\nexpert count, top-k, and exact M. Source GGUF labels remain evidence metadata.\nCUDA overlays may change only arithmetic-neutral gate\u002Fup block width; fixed\npartition counts and reduction trees are correctness policy, not candidates.\nROCm overlays select only the explicitly registered byte-equivalent geometry\naxes. After installation, prove exact precedence with PerfStats and byte-compare\nthe real production path against serial rows; separately prove unseen positive\nM reaches the generic policy.\n\nFor canonical multi-GPU timing, CUDA assigns disjoint format shards. ROCm\nassigns disjoint shape shards and runs the complete format matrix on each\nshard; do not statically divide 21 ROCm formats over four cards because the\n6\u002F5\u002F5\u002F5 assignment leaves three devices idle during the final format. A phase\nwith fewer shapes than visible devices uses only the useful lane count.\n- **Dense and MoE:** include attention, GDN, short-conv consumers, dense FFN,\n  expert gate\u002Fup\u002Fdown, MTP hidden\u002Fembedding projection, and LM head geometries\n  that actually route through NativeVNNI.\n\nSweep every supported source format and validate source-to-execution-codebook\naliases. Train on execution codebooks but retain source formats for evidence\ncompleteness.\n\n## Profiling And Feature Use\n\nDerive immutable profiler requests only after timing is complete. Profile each\nphysical candidate in a fresh discrete launch and profiler range; one process\nmay amortize setup only when every launch retains independently authenticated\nattribution. Keep pipeline dispatches (quantize\u002Fproducer\u002Freducer\u002Fepilogue)\nordered and separate.\n\n- For CUDA metrics and Nsight procedure, read\n  [cuda-tuning](..\u002Fcuda-tuning\u002FSKILL.md).\n- For ROCm metrics, ISA, and rocprofiler limits, read\n  [rocm-tuning](..\u002Frocm-tuning\u002FSKILL.md).\n- For CPU, use trainer-owned `perf_event_open` groups attached to the exact\n  persistent OpenMP worker TIDs. Arm all per-thread groups concurrently after\n  warmup, execute exactly one production candidate launch, disarm concurrently,\n  and reject multiplexed events. Do not use system-wide `perf stat` FIFO\n  control: polling delay admits unrelated work after the target launch.\n\nFor CPU short launches, retain raw evidence but admit duration-derived\nfeatures only when the exact wall interval is at least 500 microseconds and\n`task_clock \u002F wall_clock` does not exceed the physical worker count by more\nthan 5%. Instructions per logical work and L1 behavior are stable primary\nsignals in the focused probe. Cycles, reference cycles, task clock, and IPC are\nsecondary only after that reliability gate. One-shot wall\u002Ftask clock values are\ndiagnostics beside the repeated canonical timing corpus, not auxiliary timing\nlabels. Normalize decode counters by both expected payload MiB and logical\nmillion MACs; normalize prefill by logical million MACs. Assign sparse LLC misses lower\nreliability weight than instructions and L1 evidence. Raw counters remain in\nthe immutable corpus so later feature studies never require recollection.\nThe 2026-07-18 calibration measured roughly 0.2% repeat CV for instructions and\nL1 traffic on grouped decode, versus up to 20% for LLC misses on sub-500-us\nlaunches. On a 152064x5120 Q4_0 launch, Pairwise M=16 executed about 7.9 times\nthe M=2 instructions in only 2.0 times the wall duration while LLC misses stayed\napproximately flat, directly demonstrating grouped weight reuse. At equal M,\nWideRows used about 6% more instructions and 47% more L1 loads than Pairwise on\nthat geometry despite fewer misses and slower canonical timing. Never interpret\na lower miss count without its total traffic and logical-work denominators.\n\nCPU collection amortizes process startup with exact-request TSV batches.\nRequests may share one process only when build\u002FISA\u002Fthreading, operation,\ncontract\u002Fbundle, execution mode, and N\u002FK geometry match. M, format, and\ncandidate may vary within that process. The trainer reuses packed fixtures and\nthe persistent OpenMP team, but it rebinds request\u002Foutput identity, resets and\narms every per-TID event group, executes one candidate launch, disarms, reads,\nand atomically publishes before advancing. Each request directory contains only\nits perf CSV, binary provenance, and exact batch-member record; shared process\nlogs and canonical-style diagnostics live outside request evidence digests.\nBatch completion is all-ID checked and appended once to the authenticated\n`\u003Cevidence>.inprogress.jsonl` journal. The journal fsyncs each completed batch,\nrecovers every newline-complete member after interruption, and materializes the\nfull canonical evidence manifest only when the invocation exits. Never rewrite\nthe complete growing JSON after each request or batch. Use\n`--disable-cpu-process-batching` only to diagnose the amortized protocol, and\nadjust `--cpu-process-batch-size` only after a focused throughput\u002Freliability\nA\u002FB. The production default is 1,024 requests: this keeps the usual 288-request\ngrouped geometry in one process, avoiding a second source-format packing pass,\nwhile each member still receives one separately reset, armed, and disarmed\ncounter interval. Profiler mode performs fixture preparation and exactly that\none production target launch; canonical timing and byte-equivalence replay\nremain in the independently authenticated timing corpus.\n\nCUDA collection likewise batches exact requests into one trainer process, but\nevery request owns a distinct explicit nonblocking CUDA stream and stable CUDA\nstream ID. Start one profiler range, issue exactly one production operation or\none graph replay on that request stream, synchronize only that stream, and end\nthe range before advancing. Invoke NCU once per process batch with a production\nkernel-name filter such as `regex:nativeVnni`; do not profile setup quantizers,\nsynthetic markers, or unrelated kernels. Export the shared raw report once,\npartition physical dispatches by the trainer-authenticated stream IDs, and\nreject duplicate, unknown, unclaimed, or dispatch-free streams. Each request\nretains an authenticated batch-member pointer to the shared raw report instead\nof duplicating it. Prefer a one-replay-pass metric set containing duration,\nregister\u002Fshared\u002Flocal-memory resources, occupancy, DRAM throughput, and the\nALU\u002FFMA\u002Ftensor utilization pipes; define compute utilization as the maximum of\nthe simultaneously measured compute pipes. Add a replay pass only when a\nfocused feature-value study proves it justifies the collection cost.\n\nROCm collection uses the same exact-plan batching and request-local ROCTx\nranges, but ROCm 7.1 profiler interception has a validated process-lifetime\nbound. Keep each process at no more than 256 total requests and no more than\n256 graph-captured requests. The collector and trainer both reject larger\nplans; do not raise either ceiling without repeated real-profiler stress runs\nof mixed eager\u002Fgraph and graph-only plans on the target ROCm runtime. Canonical\ntiming still precedes the one isolated profiler replay, and the profiled graph\nlaunch is terminal for its graph executable.\n\nROCm profiler-only trainer invocations must not repeat canonical correctness or\ntiming work. The immutable timing corpus already owns D2H byte checks, warmups,\nand event-timed samples. For each request and each rocprof pass, verify the\nforced route, execute two fixed unprofiled preconditioning launches while\ncollection is paused, execute exactly one request-local selected launch, and\nreturn. Profiler-only source weights use one valid factory-generated quantized\nrow tiled across N: this preserves the concrete source format, raw byte\nfootprint, production upload\u002Frepack path, and launch geometry without paying\nfor value-independent full-matrix Gaussian generation on every profiler pass.\nCanonical collection mode remains unchanged and retains independently random\nfull matrices. Keep focused source, all-format, and real-profiler regressions\nso timing loops or expensive value generation cannot drift back into profiler\nmode.\n\nLarge request construction and CUDA timing-sidecar adaptation use fork-based,\nphysical-core-capped workers. Partition timing CSVs only at complete\nmeasurement-group boundaries so candidate permutations, seeds, and sample\nindices remain locally valid; merge worker output in canonical source order and\nprove serial-versus-parallel byte identity in unit tests. Worker environment\nvariables are diagnostic overrides, not production defaults.\n\nNormalize metrics into architecture-relative features that explain candidate\neconomy. Decode emphasizes memory efficiency, transactions, launch structure,\nand occupancy needed to hide latency. Prefill emphasizes compute utilization,\ntensor\u002FVNNI issue, occupancy, register\u002Fscratch pressure, and avoidable memory\ntraffic. Profiler features may influence the fit only after authenticated join\nto the exact timing corpus or its exact compact request witness. A broad\nobservation superset is not itself a witness. Run feature ablations when their\neffect is unclear.\n\n## Fit And Certification\n\nExact seen-shape overlays lock the best observed launch. Generic rules are fit\nby codebook, execution mode, geometry\u002Faspect, and work size and must dispatch\nevery unseen smaller or larger shape. Use geometry-atomic grouped CV, not\nrandom row CV or shape-name grouping: all aliases at one exact `(N,K)` must\nleave training together. For sufficiently large domains, withhold coherent\nbalanced N\u002FK regions so both local neighborhoods and low\u002Fhigh support\nboundaries are tested; spreading adjacent points round-robin across folds\nproves interpolation only and is not an unseen-shape certificate. Small\ndomains use leave-one-geometry-out validation. The fold schema participates\nin fit-cache identity.\nFreeze generic IR before opening sealed evidence. Evaluate sealed shapes with\nexact overlays disabled and do not refit after seeing them.\n\nPromotion is domain based:\n\n1. every required codebook\u002FISA\u002Fexecution-mode\u002FM domain must have complete CV\n   coverage and a nonempty generic tree;\n2. each domain independently computes nearest-rank p95 observed regret and p95\n   simultaneous-UCB regret, with both required to be strictly below 5%;\n3. at least 95% of required domains must pass those two performance gates;\n4. the remaining at-most-5% performance exceptions keep their best measured\n   generic trees and typed diagnostics so runtime dispatch remains total; and\n5. missing domains, uncovered points, empty trees, ambiguous predicates,\n   unexercised sealed leaves, byte mismatches, or M\u002FN*K\u002Fcodebook holes are\n   structural failures and cannot consume the performance-exception allowance.\n\nGlobal p95 and maximum regret remain useful refinement diagnostics, but neither\nmay replace the per-domain decision. Exact overlays never count toward generic\ncoverage, CV, sealed rule exercise, or the 95% quota.\n\nProduction fitting auto-discovers every CUDA and ROCm device. Rebuild and test:\n\n```bash\ncmake --build build_v2_release --parallel \\\n  --target v2_native_vnni_leaf_primary_scorer_cuda \\\n           v2_native_vnni_leaf_primary_scorer_rocm\nctest --test-dir build_v2_integration \\\n  -R '^V2_Integration_NativeVNNILeafPrimaryScorer_(CUDA|ROCm)$' \\\n  --output-on-failure --parallel\n```\n\nKeep uploaded regret matrices, streams, and scratch buffers persistent in GPU\nscorers. Batch leaves, refill lanes dynamically, and restore deterministic task\norder before policy reduction. Do not synchronize after each leaf.\n\nGrouped CV uses scorer ABI v12's fused\n`llaminarNativeVNNITreeSearchAndEvaluate` path. One graph replay must perform\nthe complete beam search, held-out threshold precomputation, exact-candidate\nselection, tree routing, and compact fold-result publication on an explicit\nnon-default stream. Persistent device scratch owns all matrices, descriptors,\ntrees, and reductions. The only synchronization is one terminal stream sync\nafter the compact final D2H; full-device syncs, per-leaf syncs, temporary host\ntrees, and Python held-out replay are contract violations. Keep the standalone\ntree-publication entry point only for final policy publication, where the host\nactually needs the stable tree IR.\n\nKeep expanded candidates compact and virtual. A candidate stores its parent\nfrontier index, split descriptor, scalar objective, and exact signature hash;\nit does not copy a complete leaf array. Compute the positioned-token signature\nhash with one 32-lane subgroup, then compare every colliding canonical token\nsequence in full. Hash equality is only a lookup accelerator, never a\ncorrectness predicate. Preserve the dense one-thread, left-to-right FP64 mean,\nbut compute order-only expanded-tree p95 in the existing subgroup finishing\nkernel. Candidate-column p95 uses reversible uint64 IEEE-754 order keys and an\nexact bounded upper-tail scan while retaining the selected source bits.\n\nAll scratch, graph executables, streams, and matrices are allocated or grown\nbefore capture\u002Freplay and then reused. Stable replay must not allocate, free,\ngrow scratch, recapture, or synchronize except for the single terminal stream\nwait after compact D2H publication. Keep runtime-counter regressions for these\ninvariants. Timeline allocation records across test cases are acceptable only\nwhen they belong to session setup, reviewed high-water growth, or teardown,\nnever to a captured graph node or replay.\n\nABI v12 carries eight 64-bit mask words and therefore supports up to 512\ntraining points and 512 held-out points in one captured transaction. Keep the\nCUDA\u002FROCm integration regression at the production high-water mark of 444\ncollapsed-aspect CPU decode points. A smaller test would miss the ABI v7\npre-capture failure that originally surfaced this requirement.\n\nBuild both scorer DSOs with explicit device `-O3`, including Integration\nbuilds. CMake custom build types do not automatically imply CUDA\u002FHIP\noptimization. Profile scorer-kernel changes with isolated integration launches:\n\n- CUDA: ncu `SpeedOfLight`, `Occupancy`, `LaunchStats`,\n  `MemoryWorkloadAnalysis`, and `WarpStateStats`;\n- ROCm: inspect code-object private segment, stack, SGPR\u002FVGPR counts, and spills,\n  then collect `VALUUtilization`, `MemUnitBusy`, and `L2CacheHit` in separate\n  rocprofiler passes on gfx906; and\n- reject any production kernel with local\u002Fprivate scratch or register spills.\n\nThe current profiled scorer has zero CUDA local-memory spills and zero ROCm\nscratch\u002Fprivate allocation in child scoring, compact objective finishing,\ndeduplication, and top-k selection. The retained subgroup signature hash reduced\nrepresentative deduplication from 2.162 ms to 0.011 ms on GA102 and from\n13.654 ms to 0.026 ms on gfx906. Splitting exact ordered mean from order-only\np95 reduced objective-plus-finishing time from about 2.115 ms to 1.134 ms on\nGA102 and from about 4.492 ms to 2.232 ms on gfx906. Treat these as regression\nbaselines, not timeless thresholds; remeasure after toolchain or ABI changes.\n\nThe held-out scorer kernels are integer predicates\u002Freductions plus exact FP64\ncomparisons. Tensor cores do not accelerate this workload and would weaken the\nexact-key contract; use them only if a future scorer stage becomes a real\nmatrix operation and exact equivalence is separately proved.\n\n## Kernel Tuning Loop\n\n1. Reproduce one dispatch\u002Feconomy gap in a focused `Perf__` test.\n2. Add the candidate to the real templated registry and route it through the\n   production dispatch surface.\n3. Prove all-format byte equality for grouped rows before considering timing.\n4. Gather stable canonical timing and separate profiler evidence.\n5. Inspect occupancy, vector\u002Ftensor\u002FVNNI issue, register\u002FVGPR pressure, spills,\n   memory transactions, barriers, and grid utilization.\n6. Keep real winners even when they increase learner complexity; improve the\n   generic fit rather than deleting useful kernel families.\n7. Refit from the retained corpus, certify, install, run all-format integration\n   sweeps, then run model-level parity and performance gates.\n\nFor a backend handoff, finish the complete transaction before starting another\nbackend: freeze, sealed-certify, validate the staged artifact\u002Finclude, install,\nrun backend smoke coverage through production dispatch, and preserve the\nresult. CUDA and ROCm collection\u002Ffitting should otherwise remain symmetric and\nmay run concurrently on disjoint devices; always rebuild and use both scorer\nfamilies so policy search can use every available GPU.\n\nDo not tune one model format in isolation. Turn every discovered format\u002Fshape\nbug into an all-format regression when the behavior is format-generic.\n\n## Required Validation\n\nAt minimum run:\n\n```bash\nctest --test-dir build_v2_integration \\\n  -L Unit -L NativeVNNI \\\n  --output-on-failure --parallel\nctest --test-dir build_v2_integration \\\n  -R '^V2_Integration_.*NativeVNNI|^V2_Integration_.*VerifierRows' \\\n  --output-on-failure --parallel\n```\n\nThe unit command is deliberately label-based. Every pure-Python corpus,\nlineage, measurement-plan, profiler-evidence, fitter, and generated-policy\nregression must be registered with both labels so adding a module cannot make\nit invisible to the canonical gate. Python unit tests must never launch GPU\nwork; scorer execution belongs in the integration suite.\n\nAlso run backend all-format grouped equivalence, graph-captured\u002Feager, dense\u002FMoE,\nand model parity suites touched by the change. Build performance targets from\nrelease builds and correctness\u002Fintegration targets from the integration build.\n\n## Internal Reference\n\nRead [references\u002Fpipeline.md](references\u002Fpipeline.md) when changing corpus\nschema, refresh phases, fitter\u002Fscorer internals, generated artifacts, or resume\nsemantics. The full design and current status remain in\n`docs\u002Fv2\u002Fprojects\u002F2026-07\u002FNATIVE_VNNI_BATCH_INVARIANT_LEARNED_DISPATCH_POLICY.md`.\n",{"name":5,"description":7},"master","454741b1b2228bc6874e46ade75bbf523a8385d5",".agents\u002Fnativevnni-gemm-tuning",4,"https:\u002F\u002Fgithub.com\u002FLlaminar\u002Fllaminar","https:\u002F\u002Fllaminar.ai","https:\u002F\u002Fgithub.com\u002FLlaminar","Home of the Llaminar inferencing engine.","2026-11-15 04:04:16",{"source":8,"skillName":5,"commands":53,"prompt":63,"zipAvailable":64},[54,57,60],{"tool":55,"command":56},"npx","npx skills add Llaminar\u002Fllaminar --skill nativevnni-gemm-tuning",{"tool":58,"command":59},"bunx","bunx skills add Llaminar\u002Fllaminar --skill nativevnni-gemm-tuning",{"tool":61,"command":62},"pnpm","pnpm dlx skills add Llaminar\u002Fllaminar --skill nativevnni-gemm-tuning","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FLlaminar\u002Fllaminar\u002Fblob\u002Fmaster\u002F.agents\u002Fnativevnni-gemm-tuning\u002FSKILL.md",true,[66,72],{"path":67,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":70,"sourceHtmlUrl":71},"agents\u002Fopenai.yaml","REFERENCE","参考文档",291,"https:\u002F\u002Fgithub.com\u002FLlaminar\u002Fllaminar\u002Fblob\u002Fmaster\u002F.agents\u002Fnativevnni-gemm-tuning\u002Fagents\u002Fopenai.yaml",{"path":73,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":74,"sourceHtmlUrl":75},"references\u002Fpipeline.md",17059,"https:\u002F\u002Fgithub.com\u002FLlaminar\u002Fllaminar\u002Fblob\u002Fmaster\u002F.agents\u002Fnativevnni-gemm-tuning\u002Freferences\u002Fpipeline.md",[77,85,93,103,110,115],{"skillNo":78,"name":79,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":38},"01M718P9ZZSG781K5PXM1V3KG2","rocm-tuning","https:\u002F\u002Fgithub.com\u002FLlaminar\u002Fllaminar\u002Fblob\u002Fmaster\u002F.codex\u002Fskills\u002Frocm-tuning\u002FSKILL.md",[],[83,19,84],"rocm tuning","rocm",{"skillNo":86,"name":87,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":38},"01M718P95WX88GYN9MTSC6AE40","mtp-tuning","https:\u002F\u002Fgithub.com\u002FLlaminar\u002Fllaminar\u002Fblob\u002Fmaster\u002F.codex\u002Fskills\u002Fmtp-tuning\u002FSKILL.md",[],[91,19,92],"mtp tuning","mtp",{"skillNo":94,"name":95,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":38},"01M718P7JK26A3N6VZYSE2J36T","cuda-kernel-profiling","https:\u002F\u002Fgithub.com\u002FLlaminar\u002Fllaminar\u002Fblob\u002Fmaster\u002F.codex\u002Fskills\u002Fcuda-kernel-profiling\u002FSKILL.md",[],[99,100,101,102],"profiling","cuda kernel profiling","cuda","kernel",{"skillNo":104,"name":105,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":106,"categories":107,"keywords":108,"publishedAt":38},"01M718P5YCB9J40NZZ0PRAKS5V","cpu-tuning","https:\u002F\u002Fgithub.com\u002FLlaminar\u002Fllaminar\u002Fblob\u002Fmaster\u002F.codex\u002Fskills\u002Fcpu-tuning\u002FSKILL.md",[],[109,27,19],"cpu tuning",{"skillNo":111,"name":79,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":38},"01M718P57PZ4G3X1B24ZVWR2PQ","https:\u002F\u002Fgithub.com\u002FLlaminar\u002Fllaminar\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Frocm-tuning\u002FSKILL.md",[],[83,19,84],{"skillNo":116,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":119,"publishedAt":38},"01M718P4GF2X3EHBTY7ZB1Q2T2","https:\u002F\u002Fgithub.com\u002FLlaminar\u002Fllaminar\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Fnativevnni-gemm-tuning\u002FSKILL.md",[],[19,18]]