interplane.Get Omega
Read in your language

CUDApp

CUDA++: AIEN’s GPU machine-code toolchain, runtime and driver client for NVIDIA GPUs without the CUDA toolkit. Hardware coverage and driver replacement limits are explicit.

Brought by drakestapleton

perf(prefill): select scoped Omega reading profiles and reuse safe storage

closed 85c9b6b582755e7a #259 · opened 2026-11-01 20:00 UTC · closed 2026-11-02 00:28 UTC

Imported from GitHub aien-dev/CUDApp#259, by drakestapleton

Base a73ab6538fbbf4f96fb2db04be92d8ceea7b840a · Head 6820ff0f95ca798a44d42767e5ecb1ee6592eeeb

drakestapleton wrote on 2026-11-01 20:00 UTC

All 81 local host targets, API/version gates and all 16 hosted checks pass. The final integration preserves every score bit and next-token choice in six full-model cases and fourteen boundary cases. Its immutable server also passes short serving, streaming, quality and saved/fresh continuation checks through 128,000 tokens; full Core preflight passes.

The 27B reader needs faster long reads without imposing a large matrix tile on short requests or changing another caller's settings. This adds per-call matrix options and checked Omega policies for request-size selection and allocation reuse. Requests through 64 rows use 64-row/group0; larger requests use 128-row/group4. Omega admits reuse only when row, padded-row and tile capacities all fit. Existing C and Rust adapters transport these decisions. Original defaults are unchanged. Runtime API 0.12.0 records the additive entries. Stacked on #258; Core integration is aien-sovereign-core-mv#898.

At native 88379395 and Core f440df0e, the allocation oracle covers 1,575 cases and catches five source faults. Real-dispatch isolation and refusal tests pass. The repeated 5,017-token read took 14.497 s versus 18.901 s with fast mode off; the repeated 30-token case took 0.290 s versus 0.274 s. These are shared-machine screens. Quiet alternating performance qualification remains NOT_RUN and is required before a qualified speed claim or default promotion.

Native evidence is in om/prefill-shape/adaptive-validation.json. Its then-pending serving status is superseded by the completed integration receipt, which retains exact source/archive/binary identities and the earlier preflight failure alongside the passing unchanged final suite. Apache-2.0 WITH LLVM-exception notices retained; diff and pinned Crumb verification pass. No new foreign dependency, shared-service configuration change or default promotion.

The 27B reader needs faster long reads without imposing a large matrix tile on short requests or changing another caller's settings. This adds per-call matrix options and checked Omega policies for request-size selection and allocation reuse. Requests through 64 rows use 64-row/group0; larger requests use 128-row/group4. Omega admits reuse only when row, padded-row and tile capacities all fit. Existing C and Rust adapters transport these decisions. Original defaults are unchanged. Runtime API 0.12.0 records the additive entries. Stacked on #258; the base stays perf/q38-qg-order. Core integration is aien-sovereign-core-mv#898.

At native 88379395 and Core f440df0e, the allocation oracle covers 1,575 cases and catches five source faults. Real-dispatch isolation and refusal tests pass. The repeated 5,017-token read took 14.497 s versus 18.901 s with the setting off. The same screen's two 30-token reads were 0.288 s versus 0.298 s and 0.290 s versus 0.274 s. One candidate was faster and one was slower. GEMM time was 0.1641 s versus 0.1645 s and 0.1622 s versus 0.1622 s. Requests through 64 rows use the same profile as the baseline, so that gap is outside the matrix kernel and is not a significant effect. These are shared-machine screens. Quiet alternating performance qualification remains NOT_RUN and is required before a qualified speed claim or default promotion.

Native evidence for that screen is in om/prefill-shape/adaptive-validation.json. Its then-pending serving status is superseded by the completed integration receipt. That receipt's serving.long128.native_archive_sha256 is 752564da817349a38ced23a8beda735f221afce78b1dce0a2e20ea09be1d5ce0 at native_source 88379395. Reviewed head 6820ff0f does not change src/, m16/, nvrm/, third_party/ or mk/ relative to that source. make -j4 all on this x86_64 gcc 13.3.0 produced build/libomega_gpu.a sha256 c6b7052b8eb84e8fbe9b4bc9f87a6216af4ff55cc0d94073c28ac188d135be5b, which is not the GB10 archive. The new head changes src/omega_gpu_pfgemm.c, so its archive does not match either: fresh-clone build/libomega_gpu.a sha256 5677d44e1f494089ac62ec3d14ee1c01f988a8b1847f38f22757016ebf26a0a2. The 128K serving result stays on 88379395. Apache-2.0 WITH LLVM-exception notices retained. No new foreign dependency, shared-service configuration change or default promotion.

A scoped qgemm call with omega_gpu_pf_qgemm_test_set_mutant set now returns OMEGA_GPU_PF_BAD_ARGS before device access. docs/REVIEWING.md section 2.1 asks for that refusal in the change's own test (make test-prefill-scoped), not a full-model score-compare red run. No model-level control was added: that run is a GB10 result in another repository, and this session has no authorized GPU window.

Evidence on 932d9548d3ca8584316c9f2cd3307d2ec32535d7

Receipt: evidence/PREFILL-SCOPED-MUTANT-20261102/. The receipt commit is 1ddff2f and only adds that directory. Linux 6.12.94+ x86_64, gcc 13.3.0.

  • CUDAPP_MEM_RESERVE_MIB=0 make -j4 test PASS, exit 0, CUDA++ HOST TESTS PASS (78 targets). Log sha256 f32d60d0017ab4c467a39fdd7e45e63b59d8efcb659900aa25e535611ba9cfde.
  • make test-native-artifact PASS inside that suite (test_gpu_artifact_export: 47 checks, 0 failed).
  • make zero-cuda-gate PASS inside that suite (ZERO_CUDA PASS for build/hello_gpu and build/gpu_matmul_api_test; self-test rejected a CUDA probe).
  • build/hello_gpu --sim PASS inside that suite (hello --sim tests: 12 passed, 0 failed).
  • make doctor NOT READY, recipe exit 1 (make exit 2). No NVIDIA module and no /dev/nvidia*. Expected on this machine. The suite's fake-machine doctor printed doctor tests: 9 passed, 0 failed.
  • GB10 hardware tests NOT RUN. No authorized GPU window.

make -j4 test with the reserve unset refused a 741.9 MiB upload (CUDAPP_MEM_RESERVE_MIB=4096, 4.6 GiB free). That run was stopped while make was still waiting, so it has no completed exit code. See evidence/PREFILL-SCOPED-MUTANT-20261102/default-reserve.txt. The 4096 default is still checked by the platform test.

Stack

This PR was not retargeted. It merges into perf/q38-qg-order (#258). #258 is still a draft and has to leave draft and merge first. #257 is still a draft on #252, which is a draft on #251. Nothing here reaches main until that chain lands.

<div><a href="https://cursor.com/agents/bc-5feac0a1-f899-59d2-a603-c21c8f4e8875?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a href="https://cursor.com/background-agent?bcId=bc-5feac0a1-f899-59d2-a603-c21c8f4e8875&cursor_ref=pr_footer&cursor_cta=open_in_cursor"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a> </div>

cursor[bot] reviewed (COMMENTED) on 2026-11-02 00:42 UTC

cursor[bot] reviewed (COMMENTED) on 2026-11-02 00:42 UTC

cursor[bot] commented on om/prefill-shape/README.md line 63 on 2026-11-02 00:42 UTC

The penalty sentence is removed. The paragraph now reports both 30-token reads from adaptive-validation.json: 0.288 s versus 0.298 s, and 0.290 s versus 0.274 s. GEMM time was 0.1641 s versus 0.1645 s and 0.1622 s versus 0.1622 s. One candidate was faster and one was slower. Requests through 64 rows use the same 64-row/group0 profile as the baseline, so the wall-time gap is outside the matrix kernel and is not a significant effect.

cursor[bot] commented on src/omega_gpu_pfgemm.c line 200 on 2026-11-02 00:42 UTC

A scoped call with omega_gpu_pf_qgemm_test_set_mutant set now returns OMEGA_GPU_PF_BAD_ARGS before omega_gpu_pf_open_locked. om/prefill-shape/scoped-check.c requires return code -1 with the device path unopened. Before the guard, that check printed scoped mutant rc -2 opened 1 keyed 1 and scoped qgemm isolation: FAIL. drop_scoped_mutant_guard is caught by scoped-mutants.py.

docs/REVIEWING.md section 2.1, followed by convention until the proposed CODEOWNERS file is activated, requires a deliberately broken kernel or input to be refused or detected by the change's own test. That test is make test-prefill-scoped. It does not require a full-model score-compare red run. The Core compare harness is in another repository and needs a GB10 window this session does not have, so no model-level control was added. A model run on the scoped path can no longer pass by dropping the mutant: the call fails before a kernel exists.

cursor[bot] reviewed (COMMENTED) on 2026-11-02 00:42 UTC

cursor[bot] commented on src/omega_gpu_prefill.h line 110 on 2026-11-02 00:42 UTC

The tile-height comment now sits on omega_gpu_pf_qgemm_scoped_bm. The reading-option comment now sits on omega_gpu_pf_qgemm_reading_option.

cursor[bot] wrote on 2026-11-02 00:42 UTC

Fresh-clone host receipt for the suite that ran on 932d9548d3ca8584316c9f2cd3307d2ec32535d7: evidence/PREFILL-SCOPED-MUTANT-20261102/. Head is now 1ddff2f, which only adds that directory.

CUDAPP_MEM_RESERVE_MIB=0 make -j4 test exited 0. Last line: CUDA++ HOST TESTS PASS (78 targets). Log sha256 f32d60d0017ab4c467a39fdd7e45e63b59d8efcb659900aa25e535611ba9cfde.

The 128K serving archive 752564da817349a38ced23a8beda735f221afce78b1dce0a2e20ea09be1d5ce0 is recorded at native source 88379395. Reviewed head 6820ff0f has the same library inputs. make -j4 all here is x86-64 and hashed c6b7052b8eb84e8fbe9b4bc9f87a6216af4ff55cc0d94073c28ac188d135be5b, so this machine does not reproduce the GB10 bytes. The new head changes src/omega_gpu_pfgemm.c; its fresh-clone archive is 5677d44e1f494089ac62ec3d14ee1c01f988a8b1847f38f22757016ebf26a0a2 and does not match the 128K archive.

Stack, not retargeted. This PR still merges into perf/q38-qg-order.

  • #251 perf/q38-head-bounds into main: open, not a draft, head 6e2adc77, MERGEABLE. Not touched.
  • #252 perf/q38-prefill-shape into perf/q38-head-bounds: draft, head 2d7a41c0.
  • #257 perf/q38-prefill128 into perf/q38-prefill-shape: draft, head 2089a926, MERGEABLE, checks succeeded.
  • #258 perf/q38-qg-order into perf/q38-prefill128: draft, head a73ab653, MERGEABLE. native-x86-host was cancelled during "Native host build and tests" (run 41345106657). The other checks on that head succeeded.

#258 has to leave draft and merge before this PR. #257 has to merge before #258. The chain does not reach main until #252 and #251 land as well.

Fetch it

A git bundle of the pull request's head, 33308 bytes.

curl -fsSL https://interplane.io/drakestapleton/CUDApp/patches/85c9b6b582755e7a.bundle -o 85c9b6b582755e7a.bundle
git fetch 85c9b6b582755e7a.bundle refs/pull/259/head

Raw bundle · Diff

Provenance

This proposal is imported from GitHub; it is not signed by its author. Its import statement and source record:

github-import 1
aien-dev/CUDApp
259
6820ff0f95ca798a44d42767e5ecb1ee6592eeeb
{"kind":"github-import","owner":"aien-dev","repo":"CUDApp","number":259,"url":"https://github.com/aien-dev/CUDApp/pull/259","export_sha256":"0aafd51b77ff5776d6baaf9b88b48c8b36a6e27c8d829ae8ded561b71712b17a","imported_utc":"2026-11-18T16:38:20Z"}

Changes

diff --git a/docs/runtime/API.md b/docs/runtime/API.md
index 733b7535..6244a934 100644
--- a/docs/runtime/API.md
+++ b/docs/runtime/API.md
@@ -1,6 +1,6 @@
 # Omega Runtime API v0
 
-Omega Runtime API version: 0.10.0
+Omega Runtime API version: 0.12.0
 
 Status: first written version, 2026-10-19 (slice R1, omega-mv#594, tracking #593). Source of truth is the C headers in
 `src/`. This file describes them; `docs/runtime/omega_runtime_api.manifest` lists them; `make test-runtime-api` checks the
@@ -36,8 +36,10 @@ signature against the headers on every run.
 
 ## 2. Version and compatibility rule
 
-The version is MAJOR.MINOR.PATCH (semantic versioning), currently **0.10.0**. It is a property of the list of entries and
+The version is MAJOR.MINOR.PATCH (semantic versioning), currently **0.12.0**. It is a property of the list of entries and
 their behaviour, not of the library build. Changes so far:
+- 0.12.0: adds experimental `omega_gpu_pf_qgemm_reading_option` with `(rows, index)`. The checked Omega policy returns the scoped rt, warps, wait and group values at indices 0..3, or UINT32_MAX for invalid input. This proposed adaptive profile uses 64 rows for requests at most 64 rows and 128 above that threshold. Callers obtain the checked height and use `omega_gpu_pf_qgemm_workspace_fits` to check existing row, padded-row and tile capacities before switching profiles. The query returns 1 only when all capacities cover the request; otherwise callers allocate a compatible workspace.
+- 0.11.0: adds experimental `omega_gpu_pf_qgemm_scoped` per-call options and the checked `omega_gpu_pf_qgemm_scoped_bm` tile-height query. Explicit calls neither read nor modify process-global tuning knobs. Tile storage must use the queried height; actual projection dimensions are validated on every call.
 - 0.10.0: adds the experimental `omega_gpu_pf_qgemm_set_group` selector. Existing entry signatures and the default execution order are unchanged.
 - 0.9.0 (AmperePort, CUDApp#170): grows STABLE `OmegaGpuLaunch` with `target_sm` (a MAJOR-class change
   taken as MINOR under the major-version-zero rule); adds EXPERIMENTAL
diff --git a/docs/runtime/omega_runtime_api.manifest b/docs/runtime/omega_runtime_api.manifest
index b77f66eb..b96c638d 100644
--- a/docs/runtime/omega_runtime_api.manifest
+++ b/docs/runtime/omega_runtime_api.manifest
@@ -12,7 +12,7 @@
 # After a deliberate header change: edit the line here, run `tools/runtime_api_check.sh --bless` to refresh numbers, review the diff,
 # and bump the version (MAJOR/MINOR/PATCH, rule in API.md section 2; tools/runtime_api_semver.sh checks the bump against the base).
 # Names a manifest header declares that are NOT API go in omega_runtime_api.internal, each with a reason (the check fails otherwise).
-abi omega_runtime 0.10.0
+abi omega_runtime 0.12.0
 header src/omega_runtime_api.h
 header src/omega_gpu_platform.h
 header src/omega_gpu_session.h
@@ -38,9 +38,9 @@ header src/omega_gpu_pfhost.h
 header src/omega_gpu_gemm_ex.h
 # ---- version ----
 const OMEGA_RUNTIME_API_VERSION_MAJOR 0
-const OMEGA_RUNTIME_API_VERSION_MINOR 10
+const OMEGA_RUNTIME_API_VERSION_MINOR 12
 const OMEGA_RUNTIME_API_VERSION_PATCH 0
-const OMEGA_RUNTIME_API_VERSION 10
+const OMEGA_RUNTIME_API_VERSION 12
 # ---- platform contract (src/omega_gpu_platform.h, ABI 1.2) ----
 struct OmegaGpuDeviceHandle 8 4 # STABLE
 field OmegaGpuDeviceHandle index 0 4 u32 1
@@ -953,6 +953,8 @@ fn omega_gpu_pf_qgemm_bm fn() -> u32 # EXPERIMENTAL
 fn omega_gpu_pf_qgemm_tiles fn(*const OmegaGpuFp8Tensor, *const u32, *mut c_void, u32) -> u32 # EXPERIMENTAL
 fn omega_gpu_pf_qgemm_tiles_va fn(u32, *const u64, *const u64, *const u32, *mut c_void, u32) -> u32 # EXPERIMENTAL
 fn omega_gpu_pf_qgemm fn(u32, u32, u32, u64, u32, u64, u64, u64, u64, *mut u64) -> i32 # EXPERIMENTAL
+fn omega_gpu_pf_qgemm_scoped_bm fn(u32, u32, u32, u32) -> u32 # EXPERIMENTAL
+fn omega_gpu_pf_qgemm_scoped fn(u32, u32, u32, u32, u32, u32, u32, u64, u32, u64, u64, u64, u64, *mut u64) -> i32 # EXPERIMENTAL
 fn omega_gpu_pf_qgemm_set_shape fn(u32, u32, u32) -> () # EXPERIMENTAL
 fn omega_gpu_pf_qgemm_set_group fn(u32) -> () # EXPERIMENTAL
 fn omega_gpu_pf_quant_record fn(*mut OmegaGpuCmdList, u32, u32, u32, u64, u64, u64) -> i32 # EXPERIMENTAL
@@ -1092,3 +1094,5 @@ const OMEGA_GEMM_ROUTE_WIDEN 2 # EXPERIMENTAL
 const OMEGA_GEMM_ROUTE_BF16X3 3 # EXPERIMENTAL
 const OMEGA_GEMM_ROUTE_FAST_BF16 4 # EXPERIMENTAL
 const OMEGA_GEMM_ROUTE_FFMA 5 # EXPERIMENTAL
+fn omega_gpu_pf_qgemm_reading_option fn(u32, u32) -> u32 # EXPERIMENTAL
+fn omega_gpu_pf_qgemm_workspace_fits fn(u64, u64, u64, u64, u64) -> i32 # EXPERIMENTAL
diff --git a/mk/prefill-shape.mk b/mk/prefill-shape.mk
index 375f4d46..113f0ab5 100644
--- a/mk/prefill-shape.mk
+++ b/mk/prefill-shape.mk
@@ -25,3 +25,33 @@ test-prefill-order: $(OUT_DIR)/prefill-order.so $(OUT_DIR)/gpu_qgemm_test
 ifeq ($(CUDAPP_OMC_HOST),1)
 	OMEGA_OMC="$(OMEGA_OMC)" OMEGA_BRIDGE="$(OMEGA_BRIDGE)" CC="$(CC)" python3 om/prefill-shape/order-mutants.py
 endif
+
+CARRIED_HOST_TESTS += test-prefill-scoped
+.PHONY: test-prefill-scoped
+$(OUT_DIR)/prefill-scoped-check: om/prefill-shape/scoped-check.c $(OUT_DIR)/libomega_gpu.a
+	$(CC) $(CFLAGS) -o $@ $< $(OUT_DIR)/libomega_gpu.a -Wl,--wrap=omega_gpu_pf_open_locked -Wl,--wrap=omega_gpu_pf_kernel_locked -lpthread -lm
+test-prefill-scoped: $(OUT_DIR)/prefill-scoped-check
+	$(abspath $(OUT_DIR))/prefill-scoped-check
+	CC="$(CC)" python3 om/prefill-shape/scoped-mutants.py $(abspath $(OUT_DIR))/libomega_gpu.a
+
+CARRIED_HOST_TESTS += test-prefill-reading
+.PHONY: test-prefill-reading
+$(OUT_DIR)/prefill-reading.so: src/cudapp_om_prefill_reading.c
+	@mkdir -p $(OUT_DIR)
+	$(CC) $(filter-out -MMD -MP,$(CFLAGS)) -shared -fPIC $< -o $@
+test-prefill-reading: $(OUT_DIR)/prefill-reading.so
+	python3 om/prefill-shape/reading-check.py $(abspath $(OUT_DIR))/prefill-reading.so
+ifeq ($(CUDAPP_OMC_HOST),1)
+	OMEGA_OMC="$(OMEGA_OMC)" OMEGA_BRIDGE="$(OMEGA_BRIDGE)" CC="$(CC)" python3 om/prefill-shape/reading-mutants.py
+endif
+
+CARRIED_HOST_TESTS += test-prefill-workspace
+.PHONY: test-prefill-workspace
+$(OUT_DIR)/prefill-workspace.so: src/cudapp_om_prefill_workspace.c
+	@mkdir -p $(OUT_DIR)
+	$(CC) $(filter-out -MMD -MP,$(CFLAGS)) -shared -fPIC $< -o $@
+test-prefill-workspace: $(OUT_DIR)/prefill-workspace.so
+	python3 om/prefill-shape/workspace-check.py $(abspath $(OUT_DIR))/prefill-workspace.so
+ifeq ($(CUDAPP_OMC_HOST),1)
+	OMEGA_OMC="$(OMEGA_OMC)" OMEGA_BRIDGE="$(OMEGA_BRIDGE)" CC="$(CC)" python3 om/prefill-shape/workspace-mutants.py
+endif
diff --git a/om/prefill-shape/.crumb b/om/prefill-shape/.crumb
index bde24f45..d6d39e3b 100644
--- a/om/prefill-shape/.crumb
+++ b/om/prefill-shape/.crumb
@@ -3,14 +3,14 @@
     "generated": {
       "children": [],
       "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
-      "compiled_at": "2026-11-01T20:06:13Z",
+      "compiled_at": "2026-11-01T20:39:42Z",
       "compiler": "crumb-compile/1",
-      "digest": "sha256:4c2da4b06b3a47de49eab897326282dd21ea66e3ae1947054c5fb6e42b500e83",
+      "digest": "sha256:50312e9b639e794fd27ea8c0a76f6834b7d9fe8401615e55dd09a5c80eadaae1",
       "evidence_files": 0,
       "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
-      "files": 20,
-      "generated_at_commit": "3751e1ab02034a48d1fbc1217c70d60dc97382fc",
-      "source_tree": "sha256:141935040c08042f989ba49e50d9b43736e36c5f10faedad3b3af5b42c158e6b"
+      "files": 29,
+      "generated_at_commit": "88379395296357571618ebf7f701a6e2cdf8be31",
+      "source_tree": "sha256:d9d47631c2b8d7c2bfed72eaa9d4334eecc4933a233e94fb992f15a828d6a17e"
     }
   },
   "layer": "native-policy",
diff --git a/om/prefill-shape/README.md b/om/prefill-shape/README.md
index 9fed5be1..b6c2f165 100644
--- a/om/prefill-shape/README.md
+++ b/om/prefill-shape/README.md
@@ -42,6 +42,22 @@ The first full-model 128-row trial exposed an older cache-admission cap: it refu
 
 With the cache-budget correction included, the 128-row/group4 combination passed all six full-model score and next-token comparisons. The repeated 5,017-token read took 14.348 seconds versus 18.817 seconds for 64-row/group0. Group5 at 128 rows took 15.379 seconds in the same screening series. These are shared-machine observations. `order-combined-validation.json` records every compared setting and the complete selected-candidate comparison. The combined host rerun and serving qualification remain pending; no default changed.
 
+## Per-call reading options
+
+`omega_gpu_pf_qgemm_scoped` carries explicit row, warp, wait and order settings into the existing validated kernel specification and cache key. It neither reads nor modifies process-global tuning controls. `omega_gpu_pf_qgemm_scoped_bm` checks a profile and returns its tile height, or zero on refusal. Callers must construct and pad their tile buffers with that height; each projection is validated again at execution. Original calls retain their behavior. API version 0.11.0 adds these entries.
+
+The host isolation test interleaves two scoped configurations and a different legacy configuration through the real dispatch path, intercepting the cache boundary before any device use. Three source faults are caught. API and semantic-version gates pass. `scoped-validation.json` records the exact source and library. Full host and full-model scoped qualification remain pending; previous global-knob speed screens do not prove this new entry.
+
 The subsequent full host rerun completed successfully: all 78 targets passed at runtime source `28b533c95a2dce42cb14c9d8bc4a05847a5981a0`. See `order-combined-full-host-validation.json` for the command, timing and log digest. This does not qualify the later scoped API or serving performance.
 
 The subsequent full host rerun completed successfully: all 77 targets passed at runtime source `572a73bfd138b78154172f7746504842a7168f9c`. See `cache-full-host-validation.json` for the command, timing and log digest. This does not qualify the later scoped API or serving performance.
+
+The scoped entry subsequently passed the complete 79-target host suite and API version gate. `scoped-validation.json` records the exact command and log digest. Scoped full-model and server qualification remain separate.
+
+The scoped adapter also passed all six full-score comparisons and the initial serving correctness and quality suite. Its repeated 5,017-token read took 14.515 seconds versus 19.123 seconds with the setting off. The repeated 30-token case was slower, 0.358 versus 0.282 seconds. These shared-machine screens support an adaptive-batch experiment, not promotion of the fixed profile. See `scoped-model-validation.json` and its linked Ribbon receipt.
+
+The adaptive experiment adds `reading.om`, a separate checked Omega unit. It returns the full matrix profile for a request, choosing the existing 64-row/group0 profile through 64 rows and the 128-row/group4 profile above that proposed boundary. `omega_gpu_pf_qgemm_reading_option` transports one option; it adds no host-side numerical policy. The profile oracle covers the boundary, invalid inputs and option order, and five source faults must be caught. Full-model measurements determine whether this policy is retained.
+
+`workspace.om` admits existing storage only when its row, padded-row and tile capacities all cover the newly selected profile. This lets the adapter rebuild each tile table without reallocating otherwise sufficient storage. The independent oracle passes 1,575 cases and catches five source faults. Incompatible storage is refused. Revised full-model reuse measurements and the complete host suite remain pending.
+
+The revised adaptive profile and capacity reuse pass the complete 81-target host suite and version gate at native source `88379395296357571618ebf7f701a6e2cdf8be31`. Core source `f440df0e3f9fd4c6b5d37deb1b635037f140bb32` preserves all score bits and next-token choices in six model cases and 14 boundary cases. The repeated 5,017-token read took 14.497 seconds versus 18.901 seconds with the setting off. The repeated 30-token case took 0.290 versus 0.274 seconds. These shared-machine observations do not establish quiet timing or eliminate the small-request penalty. Exact commands, identities and raw observations are in `adaptive-validation.json`. Serving and long-context validation remain separate.
diff --git a/om/prefill-shape/adaptive-validation.json b/om/prefill-shape/adaptive-validation.json
new file mode 100644
index 00000000..1abfd239
--- /dev/null
+++ b/om/prefill-shape/adaptive-validation.json
@@ -0,0 +1,300 @@
+{
+  "status": "PASS all81 native host targets, runtime version gate, six complete-model score comparisons, 14 profile-boundary comparisons. Serving and controlled timing remain pending.",
+  "base": "6068d94a8ad8",
+  "source_sha256": {
+    "om/prefill-shape/reading.om": "5415d3146b00c74e75592866d37833cd80fc7523cbdd4b4b9502ce1ecce51749",
+    "om/prefill-shape/reading-check.py": "2ce18d71296f1a1a11414904ac69cf7df2a12f3b0fd232164d95c0b9d2da35fc",
+    "om/prefill-shape/reading-mutants.py": "d9585e059c0f8ace7105696793500c9623aed305d7f3498d34623ad5cafc8f0b",
+    "om/prefill-shape/scoped-check.c": "a3e030e15eaa558e5b68e17715cbbe36981985b9b3c1006eaf286ae64dcea3e5",
+    "om/units.sh": "87b79c8f4230be5a3a2ad9f6676c6fd5e714dde7558b79b8eeecb2dc6be3317e",
+    "src/cudapp_om_prefill_reading.c": "82ba2d9c34ffd2e006f7b3028f509068d80c5c6f6cc27bdfea81ee972323108d",
+    "src/cudapp_om_prefill_reading.ident": "2eb37ac0c9280ea5e4e78246f7ddd4f759de8c4c238e2db1f00687e429bf9d42",
+    "src/cudapp_native.h": "c474fc5969b745715d9c4f2cbd22c56a973e59f07a315fbb487bbe578338d6c4",
+    "src/cudapp_om_units.ident": "607e3cf5e2a80a182facb97b76d8ef8c34c5394f2c240a5da17428d0938a154c",
+    "src/omega_gpu_pfgemm.c": "31ade74e532bf70c53db02a00094d12d797dc03200af0dd68eaaf7a32066be10",
+    "src/omega_gpu_prefill.h": "5ef3810afc3976654b4c86d5774f02d9a4211c6f05610ce9e9eaf4dd30b66fda",
+    "src/omega_runtime_api.h": "937712e9cc2b6b644a8d14b58375740ce592dd29cfd57292b3a2c8435a2094af",
+    "mk/prefill-shape.mk": "42eb254bdc284fcee2e8a450803f64eabfb9825f958abec7bebf993716dbbf2f",
+    "docs/runtime/omega_runtime_api.manifest": "1107dd42566a97c09e2060b995daabe115ebab2cf847cf63e9f8ab561bad76c9",
+    "om/prefill-shape/workspace.om": "6b6f9342a66a73667fa3a2c4d0392ab2817a6a6f2c623dc38119de99d45f12e8",
+    "om/prefill-shape/workspace-check.py": "2e76c25e0adffb654dec29066fe57c2a33b2caf65d651868f5370c8057260a25",
+    "om/prefill-shape/workspace-mutants.py": "e2c35f673d3936217350d538a961a90ff578ba594a8e96f83360dedec6445775",
+    "src/cudapp_om_prefill_workspace.c": "893d9ede96e003d763d8022e2fa60b9619b92399d186460043125c4c974fe7fb",
+    "src/cudapp_om_prefill_workspace.ident": "25692a15e87cfc1e210a6a4fd95cc1a2b8fde2c429a9a1c4b6e9cc9b31c730e2"
+  },
+  "build": {
+    "command": [
+      "taskset",
+      "-c",
+      "12-15",
+      "nice",
+      "-n",
+      "19",
+      "make",
+      "-j4",
+      "OUT_DIR=../optimize27-adaptive-reading-build",
+      "all",
+      "test-prefill-workspace",
+      "test-prefill-reading",
+      "test-prefill-scoped",
+      "test-prefill-shape",
+      "test-runtime-api",
+      "test-runtime-api-semver",
+      "RUNTIME_API_BASE=6068d94a8ad8"
+    ],
+    "cwd": "/tmp/optimize27-adaptive-reading-cudapp",
+    "started": "2026-11-01T20:27:09.626673+00:00",
+    "exit_code": 0,
+    "ended": "2026-11-01T20:28:48.214809+00:00",
+    "archive_sha256": "752564da817349a38ced23a8beda735f221afce78b1dce0a2e20ea09be1d5ce0"
+  },
+  "log_sha256": "7d9f8fd613960d6c4a536925333cb3165a3483ca49b206d9113688399c066772",
+  "earlier_attempts": [
+    "First API check refused missing exact function-name documentation and stale version labels.",
+    "Second API check still refused stale version labels. Both logs are preserved; final labels and function documentation pass."
+  ],
+  "scope": "Omega owns profile selection and reuse admission across row, padded-row and tile capacities. C transports scalar results; no second allocation cache is introduced.",
+  "workspace_cases": 1575,
+  "full_host": {
+    "command": [
+      "taskset",
+      "-c",
+      "12-15",
+      "nice",
+      "-n",
+      "19",
+      "make",
+      "-j4",
+      "OUT_DIR=../optimize27-adaptive-reading-build",
+      "test",
+      "test-runtime-api-semver",
+      "RUNTIME_API_BASE=6068d94a8ad8"
+    ],
+    "source_head": "88379395296357571618ebf7f701a6e2cdf8be31",
+    "started": "2026-11-01T20:31:20.278500+00:00",
+    "exit_code": 0,
+    "ended": "2026-11-01T20:38:18.004647+00:00",
+    "log_sha256": "9ed03fc7cffeca1ea7893251ebe3b4a4e612358c56852ce2f13168344405e5e7"
+  },
+  "model_source_core": "f440df0e3f9fd4c6b5d37deb1b635037f140bb32",
+  "model_archive_sha256": "752564da817349a38ced23a8beda735f221afce78b1dce0a2e20ea09be1d5ce0",
+  "full_scores": {
+    "status": "PASS_EXACT_SCORES",
+    "scope": "Shared-machine single-run diagnostic. Not quiet or statistically qualified.",
+    "formula": "seconds=ns/1e9; reduction_percent=100*(baseline_ns-candidate_ns)/baseline_ns",
+    "inputs": {
+      "/home/drakestapleton/handoffs/Optimize27-checkpoint-20261101/adaptive-workspace-profile-mode0-20261101T203344Z/data": "e01c57860f40dd6bc272fcb40c31e14284b7878135301a037f4ea30189f704af",
+      "/home/drakestapleton/handoffs/Optimize27-checkpoint-20261101/adaptive-workspace-profile-mode1-20261101T203500Z/data": "4c2dca37deb05f102fbb92509e7428a89d7b0a785b92e49d2853af32e38a6b88",
+      "/home/drakestapleton/handoffs/Optimize27-checkpoint-20261101/scratch-baseline-data": "44e4cb62fc06712f3728c26d0ba0a70dc4e516fb4557f80060f756720e8d26d6"
+    },
+    "rows": [
+      {
+        "trial": 0,
+        "prompt_tokens": 30,
+        "chunk": 4096,
+        "all_score_bits_and_next_equal": true,
+        "score_sha256": "890aabe9fed6550d1665eaa1fb20c3dfc25efe514db8d8ca6b97160be5bde853",
+        "baseline_s": 0.298454205,
+        "candidate_s": 0.288015902,
+        "wall_reduction_percent": 3.4974554974020218,
+        "baseline_gemm_s": 0.164497227,
+        "candidate_gemm_s": 0.164053323
+      },
+      {
+        "trial": 1,
+        "prompt_tokens": 513,
+        "chunk": 512,
+        "all_score_bits_and_next_equal": true,
+        "score_sha256": "751c59e6812c98bedc12ccb72bf878cb7c52fe6734a51a96646b1d0bd5937396",
+        "baseline_s": 2.237638067,
+        "candidate_s": 1.787905271,
+        "wall_reduction_percent": 20.098549565835572,
+        "baseline_gemm_s": 1.32816245,
+        "candidate_gemm_s": 0.875335721
+      },
+      {
+        "trial": 2,
+        "prompt_tokens": 941,
+        "chunk": 4096,
+        "all_score_bits_and_next_equal": true,
+        "score_sha256": "36dabb2803481bdd0e552d3c631557e3047d2e233e43f5636dccceae143661c0",
+        "baseline_s": 3.639586159,
+        "candidate_s": 2.82594369,
+        "wall_reduction_percent": 22.35535672065402,
+        "baseline_gemm_s": 2.204775979,
+        "candidate_gemm_s": 1.388874326
+      },
+      {
+        "trial": 3,
+        "prompt_tokens": 5017,
+        "chunk": 4096,
+        "all_score_bits_and_next_equal": true,
+        "score_sha256": "88ca539df5ecfc096a32e59aec5c48da86f9bcc54f6d78e2bcb9fa4a79535447",
+        "baseline_s": 19.011002207,
+        "candidate_s": 14.495573323,
+        "wall_reduction_percent": 23.751661458107577,
+        "baseline_gemm_s": 11.542581134,
+        "candidate_gemm_s": 7.106313296
+      },
+      {
+        "trial": 4,
+        "prompt_tokens": 30,
+        "chunk": 4096,
+        "all_score_bits_and_next_equal": true,
+        "score_sha256": "890aabe9fed6550d1665eaa1fb20c3dfc25efe514db8d8ca6b97160be5bde853",
+        "baseline_s": 0.273931474,
+        "candidate_s": 0.290243282,
+        "wall_reduction_percent": -5.954703839544922,
+        "baseline_gemm_s": 0.162181131,
+        "candidate_gemm_s": 0.162219472
+      },
+      {
+        "trial": 5,
+        "prompt_tokens": 5017,
+        "chunk": 4096,
+        "all_score_bits_and_next_equal": true,
+        "score_sha256": "88ca539df5ecfc096a32e59aec5c48da86f9bcc54f6d78e2bcb9fa4a79535447",
+        "baseline_s": 18.900996682,
+        "candidate_s": 14.497095094,
+        "wall_reduction_percent": 23.299837897934616,
+        "baseline_gemm_s": 11.594070291,
+        "candidate_gemm_s": 7.178247109
+      }
+    ]
+  },
+  "boundary_scores": {
+    "status": "PASS_EXACT_BOUNDARY_SCORES",
+    "scope": "Two shared-machine observations per size, not quiet qualification or a statistical claim",
+    "formula": "seconds=ns/1e9; reduction_percent=100*(baseline_ns-candidate_ns)/baseline_ns",
+    "baseline": "adaptive-workspace-boundary-profile-mode0-20261101T203626Z/data",
+    "candidate": "adaptive-workspace-boundary-profile-mode1-20261101T203816Z/data",
+    "rows": [
+      {
+        "trial": 0,
+        "prompt_tokens": 3,
+        "exact_full_scores_and_next": true,
+        "score_sha256": "a67a5840407ff2b55fcfac379446fdd1e786585a5ba03220661c10db1a31798e",
+        "baseline_s": 0.221802577,
+        "candidate_s": 0.208090229,
+        "wall_reduction_percent": 6.182231146935682
+      },
+      {
+        "trial": 1,
+        "prompt_tokens": 63,
+        "exact_full_scores_and_next": true,
+        "score_sha256": "f3661f250ea50c41aa37ef8829094d16ae7acf6ad7e3f6f8b571b864aca9a6da",
+        "baseline_s": 0.366342819,
+        "candidate_s": 0.352700871,
+        "wall_reduction_percent": 3.723820228614881
+      },
+      {
+        "trial": 2,
+        "prompt_tokens": 64,
+        "exact_full_scores_and_next": true,
+        "score_sha256": "106f5f371937128d2527fcd8db3f0f7e030a2fed76697ee3d47f14882efc7ccc",
+        "baseline_s": 0.358343964,
+        "candidate_s": 0.361493718,
+        "wall_reduction_percent": -0.8789750397470069
+      },
+      {
+        "trial": 3,
+        "prompt_tokens": 65,
+        "exact_full_scores_and_next": true,
+        "score_sha256": "bb41da526ea6f0f81b2fda8c6e23b725cdf742b62a321bee6b7979eb1830fc18",
+        "baseline_s": 0.466726558,
+        "candidate_s": 0.364658402,
+        "wall_reduction_percent": 21.86894108562813
+      },
+      {
+        "trial": 4,
+        "prompt_tokens": 127,
+        "exact_full_scores_and_next": true,
+        "score_sha256": "ee377fd9bcb7a76a43688c1531b5ae78b35a888cf756af5a8f40bca047b6ab01",
+        "baseline_s": 0.592993214,
+        "candidate_s": 0.517265899,
+        "wall_reduction_percent": 12.770351027996755
+      },
+      {
+        "trial": 5,
+        "prompt_tokens": 128,
+        "exact_full_scores_and_next": true,
+        "score_sha256": "606d7ae396d5f0cee66142918b877813d6995fa0ea53482a8f11b45cdb0bc96e",
+        "baseline_s": 0.587665487,
+        "candidate_s": 0.498192786,
+        "wall_reduction_percent": 15.225107306667475
+      },
+      {
+        "trial": 6,
+        "prompt_tokens": 129,
+        "exact_full_scores_and_next": true,
+        "score_sha256": "ae912b406cc3ebb51401164941c01c41c637587c01cc7fac8605ba56904db038",
+        "baseline_s": 0.721145008,
+        "candidate_s": 0.607569309,
+        "wall_reduction_percent": 15.749356612061579
+      },
+      {
+        "trial": 7,
+        "prompt_tokens": 3,
+        "exact_full_scores_and_next": true,
+        "score_sha256": "a67a5840407ff2b55fcfac379446fdd1e786585a5ba03220661c10db1a31798e",
+        "baseline_s": 0.212806256,
+        "candidate_s": 0.21332082,
+        "wall_reduction_percent": -0.24179928244214777
+      },
+      {
+        "trial": 8,
+        "prompt_tokens": 63,
+        "exact_full_scores_and_next": true,
+        "score_sha256": "f3661f250ea50c41aa37ef8829094d16ae7acf6ad7e3f6f8b571b864aca9a6da",
+        "baseline_s": 0.350606135,
+        "candidate_s": 0.347893789,
+        "wall_reduction_percent": 0.7736162403433129
+      },
+      {
+        "trial": 9,
+        "prompt_tokens": 64,
+        "exact_full_scores_and_next": true,
+        "score_sha256": "106f5f371937128d2527fcd8db3f0f7e030a2fed76697ee3d47f14882efc7ccc",
+        "baseline_s": 0.349292236,
+        "candidate_s": 0.341890904,
+        "wall_reduction_percent": 2.1189511924908633
+      },
+      {
+        "trial": 10,
+        "prompt_tokens": 65,
+        "exact_full_scores_and_next": true,
+        "score_sha256": "bb41da526ea6f0f81b2fda8c6e23b725cdf742b62a321bee6b7979eb1830fc18",
+        "baseline_s": 0.466400475,
+        "candidate_s": 0.353046795,
+        "wall_reduction_percent": 24.3039375120705
+      },
+      {
+        "trial": 11,
+        "prompt_tokens": 127,
+        "exact_full_scores_and_next": true,
+        "score_sha256": "ee377fd9bcb7a76a43688c1531b5ae78b35a888cf756af5a8f40bca047b6ab01",
+        "baseline_s": 0.615423734,
+        "candidate_s": 0.465094876,
+        "wall_reduction_percent": 24.426886662775342
+      },
+      {
+        "trial": 12,
+        "prompt_tokens": 128,
+        "exact_full_scores_and_next": true,
+        "score_sha256": "606d7ae396d5f0cee66142918b877813d6995fa0ea53482a8f11b45cdb0bc96e",
+        "baseline_s": 0.608295302,
+        "candidate_s": 0.493256086,
+        "wall_reduction_percent": 18.91173836486411
+      },
+      {
+        "trial": 13,
+        "prompt_tokens": 129,
+        "exact_full_scores_and_next": true,
+        "score_sha256": "ae912b406cc3ebb51401164941c01c41c637587c01cc7fac8605ba56904db038",
+        "baseline_s": 0.745165077,
+        "candidate_s": 0.612998524,
+        "wall_reduction_percent": 17.736546851081158
+      }
+    ]
+  }
+}
diff --git a/om/prefill-shape/reading-check.py b/om/prefill-shape/reading-check.py
new file mode 100644
index 00000000..7ceda8fb
--- /dev/null
+++ b/om/prefill-shape/reading-check.py
@@ -0,0 +1,17 @@
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+# External profile oracle, not a production dependency.
+import ctypes,sys
+lib=ctypes.CDLL(sys.argv[1])
+
+# Independent profile table at every small boundary and representative large rows.
+r=lib.omega_native_qgreading
+r.argtypes=[ctypes.POINTER(ctypes.c_uint64),ctypes.c_uint64,ctypes.c_uint64];r.restype=ctypes.c_uint32
+for rows in list(range(0,258))+[4095,4096,4097,2**32-1,2**32,2**64-1]:
+ for index in [0,1,2,3,4,2**64-1]:
+  out=ctypes.c_uint64(123)
+  assert r(ctypes.byref(out),rows,index)==0
+  expected=(4,8,45,0) if 0<rows<65 else (8,8,45,4)
+  want=expected[index] if 0<rows<2**32 and index<4 else 2**32-1
+  assert out.value==want,(rows,index,out.value,want)
+assert r(None,64,0)==32
+print('PASS adaptive profile boundaries, option order and refusal controls')
diff --git a/om/prefill-shape/reading-mutants.py b/om/prefill-shape/reading-mutants.py
new file mode 100644
index 00000000..760e04bd
--- /dev/null
+++ b/om/prefill-shape/reading-mutants.py
@@ -0,0 +1,33 @@
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+# External source-mutant verification, not a production dependency.
+import hashlib,os,subprocess,tempfile
+from pathlib import Path
+root=Path(__file__).resolve().parents[2]
+source=(root/'om/prefill-shape/reading.om').read_text()
+mutants={
+ 'reading_threshold':('if le rows 64\nret 4','if le rows 63\nret 4'),
+ 'reading_group':('if le rows 64\nret 0','if le rows 65\nret 0'),
+ 'reading_wait':('if eq index 2\nret 45','if eq index 2\nret 0'),
+ 'reading_zero':('if or eq rows 0 gt rows 4294967295','if or eq rows 1 gt rows 4294967295'),
+ 'reading_index':('if gt index 3','if gt index 4'),
+
+}
+ident=(root/'src/cudapp_om_prefill_reading.ident').read_text().strip()
+pins=dict(part.split('=',1) for part in ident.split() if '=' in part)
+assert hashlib.sha256(Path(os.environ['OMEGA_OMC']).read_bytes()).hexdigest()==pins['omc']
+env=dict(os.environ,OMEGA_SEEDED_OMC=os.environ['OMEGA_OMC'])
+bridge=Path(os.environ['OMEGA_BRIDGE'])/'tools/bridge-seeded'
+assert hashlib.sha256(bridge.read_bytes()).hexdigest()==pins['frontend']
+assert hashlib.sha256((bridge.parent.parent/'src/toc.om').read_bytes()).hexdigest()==pins['converter']
+with tempfile.TemporaryDirectory(prefix='prefill-shape-mutants-') as t:
+ t=Path(t)
+ for name,(old,new) in mutants.items():
+  assert source.count(old)==1
+  om=t/(name+'.om');om.write_text(source.replace(old,new))
+  c=t/(name+'.c');so=t/(name+'.so')
+  with c.open('w') as f:subprocess.run(['sh',str(bridge),'c',str(om)],env=env,stdout=f,check=True)
+  subprocess.run([os.environ.get('CC','cc'),'-O2','-shared','-fPIC',str(c),'-o',str(so)],check=True)
+  p=subprocess.run(['python3',str(root/'om/prefill-shape/reading-check.py'),str(so)],capture_output=True,text=True)
+  assert p.returncode!=0,name+' escaped oracle'
+  assert 'AssertionError' in p.stderr,(name,p.stderr)
+  print(name+': caught',flush=True)
diff --git a/om/prefill-shape/reading.om b/om/prefill-shape/reading.om
new file mode 100644
index 00000000..8cbde7e0
--- /dev/null
+++ b/om/prefill-shape/reading.om
@@ -0,0 +1,27 @@
+note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+note Reading profile proposal: avoid a second 64-row group for a short request.
+note Options are rt, warps, wait, group. Invalid input returns the u32 sentinel.
+fn native_qgreading rows ulong index ulong to ulong
+if or eq rows 0 gt rows 4294967295
+ret 4294967295
+end
+if gt index 3
+ret 4294967295
+end
+if eq index 0
+if le rows 64
+ret 4
+end
+ret 8
+end
+if eq index 1
+ret 8
+end
+if eq index 2
+ret 45
+end
+if le rows 64
+ret 0
+end
+ret 4
+end
diff --git a/om/prefill-shape/scoped-check.c b/om/prefill-shape/scoped-check.c
new file mode 100644
index 00000000..8e9cbfa1
--- /dev/null
+++ b/om/prefill-shape/scoped-check.c
@@ -0,0 +1,56 @@
+/* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */
+/* Real call-path isolation test. The device-open and kernel-cache boundaries are
+ * intercepted; neither a GPU nor fake matrix arithmetic is used. */
+#include "omega_gpu_prefill.h"
+#include "omega_blackwell_codegen_qg.h"
+#include <stdio.h>
+#include <string.h>
+static unsigned opened, keyed, failed;
+static OmegaQgSpec want;
+int __wrap_omega_gpu_pf_open_locked(void) { opened++; return OMEGA_GPU_PF_OK; }
+int __wrap_omega_gpu_pf_kernel_locked(const OmegaPfKey *key, OmegaPfGen gen, OmegaPfKernel *out) {
+    OmegaQgSpec got; (void)gen; (void)out;
+    memcpy(&got,key->words,sizeof got); keyed++;
+    if (memcmp(&got,&want,sizeof got)) { fprintf(stderr,"wrong per-call kernel key\n"); failed++; }
+    return OMEGA_GPU_PF_TOO_LARGE; /* stop before allocation/launch */
+}
+static void expect(unsigned rt,unsigned warps,unsigned group,unsigned mutant) {
+    memset(&want,0,sizeof want);want.rt=rt;want.warps=warps;want.group=group;want.mutant=mutant;
+    want.k=128;want.n=256;want.wait=45;want.direct=1;
+    opened=keyed=0;
+}
+static void check(int ok,const char *why) { if(!ok) {failed++;fprintf(stderr,"%s\n",why);} }
+static int scoped(unsigned rt,unsigned group) {
+    return omega_gpu_pf_qgemm_scoped(rt,8,45,group,256,128,OMEGA_GPU_PF_PLAIN,16,1,0,32,48,64,NULL);
+}
+int main(void) {
+    omega_gpu_pf_qgemm_set_shape(2,4,45);omega_gpu_pf_qgemm_set_group(1);omega_gpu_pf_qgemm_test_set_mutant(1);
+    check(omega_gpu_pf_qgemm_scoped_bm(8,8,45,4)==128,"checked128 tile height");
+    check(omega_gpu_pf_qgemm_scoped_bm(4,8,45,0)==64,"checked64 tile height");
+    check(omega_gpu_pf_qgemm_scoped_bm(0,8,45,4)==0,"zero shape refused");
+    check(omega_gpu_pf_qgemm_scoped_bm(8,8,121,4)==0,"unsafe wait refused");
+    check(omega_gpu_pf_qgemm_scoped_bm(8,8,45,6)==0,"group outside bound refused");
+    for(unsigned i=0;i<3;i++) {
+        unsigned rt=i==1?4:8, group=i==1?0:4;
+        expect(rt,8,group,0);
+        check(scoped(rt,group)==OMEGA_GPU_PF_TOO_LARGE && opened==1 && keyed==1,"scoped call reached its own kernel key");
+        expect(2,4,1,1);
+        int rc=omega_gpu_pf_qgemm(256,128,OMEGA_GPU_PF_PLAIN,16,1,0,32,48,64,NULL);
+        check(rc==OMEGA_GPU_PF_TOO_LARGE && opened==1 && keyed==1,"legacy settings unchanged after scoped call");
+        check(omega_gpu_pf_qgemm_bm()==32,"legacy tile height unchanged");
+    }
+    const uint32_t rows[] = {1,30,64,65,128,4096,UINT32_MAX};
+    for(unsigned i=0;i<sizeof(rows)/sizeof(rows[0]);i++) {
+        uint32_t p[4];for(unsigned j=0;j<4;j++)p[j]=omega_gpu_pf_qgemm_reading_option(rows[i],j);
+        expect(rows[i]<=64?4:8,8,rows[i]<=64?0:4,0);
+        int rc=omega_gpu_pf_qgemm_scoped(p[0],p[1],p[2],p[3],256,128,OMEGA_GPU_PF_PLAIN,16,1,0,32,48,64,NULL);
+        check(rc==OMEGA_GPU_PF_TOO_LARGE && opened==1 && keyed==1,"adaptive profile reaches matching cache key");
+        check(omega_gpu_pf_qgemm_bm()==32,"adaptive query leaves legacy height unchanged");
+    }
+    check(omega_gpu_pf_qgemm_reading_option(0,0)==UINT32_MAX,"zero reading rows refused");
+    check(omega_gpu_pf_qgemm_reading_option(64,4)==UINT32_MAX,"unknown reading option refused");
+    expect(8,8,6,0);
+    check(scoped(8,6)==OMEGA_GPU_PF_BAD_ARGS && opened==0 && keyed==0,"invalid options refused before device access");
+    omega_gpu_pf_qgemm_set_shape(0,0,0);omega_gpu_pf_qgemm_set_group(0);omega_gpu_pf_qgemm_test_set_mutant(0);
+    printf("scoped qgemm isolation: %s\n",failed?"FAIL":"PASS");return failed?1:0;
+}
diff --git a/om/prefill-shape/scoped-model-validation.json b/om/prefill-shape/scoped-model-validation.json
new file mode 100644
index 00000000..709342c3
--- /dev/null
+++ b/om/prefill-shape/scoped-model-validation.json
@@ -0,0 +1,132 @@
+{
+  "status": "PASS_EXACT_SCORES",
+  "scope": "Shared-machine single-run diagnostic. Not quiet or statistically qualified.",
+  "formula": "seconds=ns/1e9; reduction_percent=100*(baseline_ns-candidate_ns)/baseline_ns",
+  "inputs": {
+    "/home/drakestapleton/handoffs/Optimize27-checkpoint-20261101/scoped-profile-mode0-20261101T201048Z/data": "c66387fb7abd1a50b5515d06f3c925959c8ef3c68e47a48a7a5ec37cb1846691",
+    "/home/drakestapleton/handoffs/Optimize27-checkpoint-20261101/scoped-profile-mode1-20261101T201204Z/data": "9e084d7227443e9f706787d7b0f72aedd1cd34968104f83a9c26365a5f300eff",
+    "/home/drakestapleton/handoffs/Optimize27-checkpoint-20261101/scratch-baseline-data": "44e4cb62fc06712f3728c26d0ba0a70dc4e516fb4557f80060f756720e8d26d6"
+  },
+  "rows": [
+    {
+      "trial": 0,
+      "prompt_tokens": 30,
+      "chunk": 4096,
+      "all_score_bits_and_next_equal": true,
+      "score_sha256": "890aabe9fed6550d1665eaa1fb20c3dfc25efe514db8d8ca6b97160be5bde853",
+      "baseline_s": 0.310116316,
+      "candidate_s": 0.340853811,
+      "wall_reduction_percent": -9.911602006777354,
+      "baseline_gemm_s": 0.164876334,
+      "candidate_gemm_s": 0.171508113
+    },
+    {
+      "trial": 1,
+      "prompt_tokens": 513,
+      "chunk": 512,
+      "all_score_bits_and_next_equal": true,
+      "score_sha256": "751c59e6812c98bedc12ccb72bf878cb7c52fe6734a51a96646b1d0bd5937396",
+      "baseline_s": 2.274214302,
+      "candidate_s": 1.862565739,
+      "wall_reduction_percent": 18.10069361704331,
+      "baseline_gemm_s": 1.353240513,
+      "candidate_gemm_s": 0.869492863
+    },
+    {
+      "trial": 2,
+      "prompt_tokens": 941,
+      "chunk": 4096,
+      "all_score_bits_and_next_equal": true,
+      "score_sha256": "36dabb2803481bdd0e552d3c631557e3047d2e233e43f5636dccceae143661c0",
+      "baseline_s": 3.722388432,
+      "candidate_s": 2.933748301,
+      "wall_reduction_percent": 21.18640075872662,
+      "baseline_gemm_s": 2.21938298,
+      "candidate_gemm_s": 1.382941945
+    },
+    {
+      "trial": 3,
+      "prompt_tokens": 5017,
+      "chunk": 4096,
+      "all_score_bits_and_next_equal": true,
+      "score_sha256": "88ca539df5ecfc096a32e59aec5c48da86f9bcc54f6d78e2bcb9fa4a79535447",
+      "baseline_s": 19.07438026,
+      "candidate_s": 14.640784822,
+      "wall_reduction_percent": 23.24371946855588,
+      "baseline_gemm_s": 11.630266332,
+      "candidate_gemm_s": 7.109164731
+    },
+    {
+      "trial": 4,
+      "prompt_tokens": 30,
+      "chunk": 4096,
+      "all_score_bits_and_next_equal": true,
+      "score_sha256": "890aabe9fed6550d1665eaa1fb20c3dfc25efe514db8d8ca6b97160be5bde853",
+      "baseline_s": 0.282019619,
+      "candidate_s": 0.358219437,
+      "wall_reduction_percent": -27.019332296878254,
+      "baseline_gemm_s": 0.165838626,
+      "candidate_gemm_s": 0.170276119
+    },
+    {
+      "trial": 5,
+      "prompt_tokens": 5017,
+      "chunk": 4096,
+      "all_score_bits_and_next_equal": true,
+      "score_sha256": "88ca539df5ecfc096a32e59aec5c48da86f9bcc54f6d78e2bcb9fa4a79535447",
+      "baseline_s": 19.123025181,
+      "candidate_s": 14.51508928,
+      "wall_reduction_percent": 24.096270633886377,
+      "baseline_gemm_s": 11.665614326,
+      "candidate_gemm_s": 7.135011549
+    }
+  ],
+  "core_source": "af6a899c3e4826fbba2d8ee42d31d6d136bf2256",
+  "core_receipt": "https://github.com/aien-dev/aien-sovereign-core-mv/blob/4723174d/om/ribbon/q38-scoped-reading-validation.json",
+  "profile_build": {
+    "command": [
+      "taskset",
+      "-c",
+      "10-11",
+      "nice",
+      "-n",
+      "19",
+      "rustc",
+      "--edition=2021",
+      "-O",
+      "-C",
+      "panic=abort",
+      "-C",
+      "lto=thin",
+      "/home/drakestapleton/handoffs/Optimize27-checkpoint-20261101/scoped-profile.rs",
+      "-L",
+      "dependency=/tmp/optimize27-serving-target/release/deps",
+      "-L",
+      "native=/tmp/optimize27-scoped-reading-build",
+      "--extern",
+      "serde_json=/tmp/optimize27-serving-target/release/deps/libserde_json-c53b161b72615764.rlib",
+      "--extern",
+      "aien_inference_abi=/tmp/optimize27-serving-target/release/libaien_inference_abi.rlib",
+      "-o",
+      "/home/drakestapleton/handoffs/Optimize27-checkpoint-20261101/scoped-profile"
+    ],
+    "artifacts": {
+      "serde_json": {
+        "path": "/tmp/optimize27-serving-target/release/deps/libserde_json-c53b161b72615764.rlib",
+        "sha256": "3d48d513d1b663788c4ac635260557eb3251d02c594ccdf2392e76a0a92fe774"
+      },
+      "aien_inference_abi": {
+        "path": "/tmp/optimize27-serving-target/release/libaien_inference_abi.rlib",
+        "sha256": "6327d731fd5cb451fefdb995352a30976e5099d6b8c5586bc2bac13497a7a9ff"
+      }
+    },
+    "exit_code": 0,
+    "native_sha256": "97b822bd9e919e834adf90e7b9485bf73f7d4f2c0a80cfd1ecde9c8ff9ff1631",
+    "source_sha256": "a4e0bee1a17a82cedc6d17282d2144be5dc8efc10c86eaf44e52d1773ecf0553",
+    "source_core": "af6a899c3e4826fbba2d8ee42d31d6d136bf2256",
+    "binary_sha256": "691e75516b4134a47d1ff365742f6725b06217b1683212a434632d924d00abfa"
+  },
+  "input_tokens_sha256": "c77cea30c9f1344a22d664ed76f50b079aa02a48a88174feb5f928ce89feaaaa",
+  "serving_status": "Initial full serving quality and sampled32 parity PASS; clean build, long contexts and controlled timing are separate.",
+  "limitation": "The repeated30-token case increased from0.282019619s to0.358219437s. Fixed128 rows are not promoted; an adaptive profile remains to be tested."
+}
diff --git a/om/prefill-shape/scoped-mutants.py b/om/prefill-shape/scoped-mutants.py
new file mode 100644
index 00000000..3a4dc331
--- /dev/null
+++ b/om/prefill-shape/scoped-mutants.py
@@ -0,0 +1,20 @@
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+# External call-isolation fault tests; not a production dependency.
+from pathlib import Path
+import os,subprocess,sys,tempfile
+r=Path(__file__).resolve().parents[2]
+archive=Path(sys.argv[1]).resolve();src=(r/'src/omega_gpu_pfgemm.c').read_text()
+mutants={
+ 'ignore_scoped_options':('if (scoped) s = *scoped;','if (scoped && 0) s = *scoped;'),
+ 'leak_options_to_global':('const OmegaQgSpec s = qg_scoped_spec(rt, warps, wait, group);','omega_gpu_pf_qgemm_set_shape(rt, warps, wait); omega_gpu_pf_qgemm_set_group(group);\n    const OmegaQgSpec s = qg_scoped_spec(rt, warps, wait, group);'),
+ 'wrong_tile_height':('return omega_qg_spec_ok(&s) ? 16u * s.rt : 0;','return omega_qg_spec_ok(&s) ? 8u * s.rt : 0;'),
+}
+with tempfile.TemporaryDirectory(prefix='qg-scoped-faults-') as d:
+ d=Path(d)
+ for name,(old,new) in mutants.items():
+  assert src.count(old)==1,name
+  f=d/(name+'.c');f.write_text(src.replace(old,new));exe=d/name
+  subprocess.run([os.environ.get('CC','cc'),'-std=gnu11','-O2','-Wall','-Wextra','-Werror','-I'+str(r/'src'),str(f),str(r/'om/prefill-shape/scoped-check.c'),str(archive),'-Wl,--wrap=omega_gpu_pf_open_locked','-Wl,--wrap=omega_gpu_pf_kernel_locked','-lpthread','-lm','-o',str(exe)],check=True)
+  q=subprocess.run([str(exe)],capture_output=True,text=True)
+  assert q.returncode==1 and 'scoped qgemm isolation: FAIL' in q.stdout,(name,q.returncode,q.stdout,q.stderr)
+  print(name+': caught',flush=True)
diff --git a/om/prefill-shape/scoped-validation.json b/om/prefill-shape/scoped-validation.json
new file mode 100644
index 00000000..5704aeba
--- /dev/null
+++ b/om/prefill-shape/scoped-validation.json
@@ -0,0 +1,60 @@
+{
+  "status": "PASS all79 host targets, scoped call isolation, three fault controls and runtime API/version gates; scoped serving and full-model qualification still in progress",
+  "production_commit": "f50be1f9",
+  "base": "6d339a0dcbcada66fd211d89f5a0ed6704003f75",
+  "source_sha256": {
+    "src/omega_gpu_pfgemm.c": "f8ca4e4ca9dc841ced3b7ed344399a49352062f0244438ce9fc64f39156d619b",
+    "src/omega_gpu_prefill.h": "0bc62e9fd3a20bc801fb008aa55af953a412a104171bc450386bfb412a12fdbd",
+    "src/omega_runtime_api.h": "436604826fb01e10e6fb03490b3f0723f66b7b3b8171f96a277694947d62da0e",
+    "docs/runtime/omega_runtime_api.manifest": "b603dd037c8fc064f46fef994a43b56a4886e6aaed101b968d46451be601fbc4",
+    "om/prefill-shape/scoped-check.c": "aecddc1972fd6c452ed5429a525042abdf7b91e9c8bcd868a3ab874e64922a74",
+    "om/prefill-shape/scoped-mutants.py": "8a6a927d37976717305afca2ff7f1e4ce707c6f6f29bdbf078eb28149292dd63",
+    "mk/prefill-shape.mk": "e0bd383c075a634f85ca807e8cf5d392f8c06c557a81744a22be62cf62921da0"
+  },
+  "archive_sha256": "97b822bd9e919e834adf90e7b9485bf73f7d4f2c0a80cfd1ecde9c8ff9ff1631",
+  "commands": [
+    "make test-prefill-scoped",
+    "make test-runtime-api test-runtime-api-semver RUNTIME_API_BASE=6d339a0dcbcada66fd211d89f5a0ed6704003f75"
+  ],
+  "exit_codes": [
+    0,
+    0
+  ],
+  "logs_sha256": {
+    "scoped-native-final-target.log": "8d27a0929a3ce654c5f0f20acc1813623c91f9fa7042479e86ceaefa0097ee17",
+    "scoped-native-tests-fixed.log": "bf12b4a8230396ab52122cf8719558daa50e54ceb7d30ab4fc99031de4897fbc"
+  },
+  "negative_controls": [
+    "ignore_scoped_options",
+    "leak_options_to_global",
+    "wrong_tile_height"
+  ],
+  "scope": "The real qg_core constructs the intercepted kernel key. Tests interleave explicit128/group4, explicit64/group0, and legacy32/group1/mutant1 calls without opening a GPU. Invalid options are refused before device access. Checked Omega units retain numerical/order policy.",
+  "full_host": {
+    "command": [
+      "taskset",
+      "-c",
+      "12-15",
+      "nice",
+      "-n",
+      "19",
+      "make",
+      "-j4",
+      "OUT_DIR=../optimize27-scoped-reading-build",
+      "test",
+      "test-runtime-api-semver",
+      "RUNTIME_API_BASE=6d339a0dcbcada66fd211d89f5a0ed6704003f75"
+    ],
+    "cwd": "/tmp/optimize27-scoped-reading-cudapp",
+    "source_head": "fa70990c4af3dbf18469019c8707b7e0f5866998",
+    "started": "2026-11-01T20:00:46.400700+00:00",
+    "environment": {
+      "OMEGA_OMC": "/tmp/ribbon-seed-compiler/seed/out/omc",
+      "OMEGA_BRIDGE": "/tmp/optimize27-bridge"
+    },
+    "exit_code": 0,
+    "ended": "2026-11-01T20:07:51.693459+00:00",
+    "targets": 79,
+    "log_sha256": "f8ccb59ee6a562f2f0e2e3fdd57d5e9468fe798a82fa667097db5215262978ba"
+  }
+}
diff --git a/om/prefill-shape/workspace-check.py b/om/prefill-shape/workspace-check.py
new file mode 100644
index 00000000..f45cb168
--- /dev/null
+++ b/om/prefill-shape/workspace-check.py
@@ -0,0 +1,20 @@
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+# Independent capacity oracle, not production.
+import ctypes,sys,random
+lib=ctypes.CDLL(sys.argv[1]);f=lib.omega_native_qgworkspace
+f.argtypes=[ctypes.POINTER(ctypes.c_uint64)]+[ctypes.c_uint64]*5;f.restype=ctypes.c_uint32
+cases=[]
+for rows in [0,1,3,30,63,64,65,128,129,512,4096,2**32-1,2**32,2**64-1]:
+ for bm in [0,32,64,128,2**32-1,2**32,2**64-1]:
+  for delta in [-1,0,1]:
+   cap=max(0,rows+delta);pad=min(2**64-1,rows+bm+delta);tiles=(rows+bm-1)//bm+1 if bm else 0
+   if cap<2**64 and pad>=0:cases += [(cap,pad,tiles,rows,bm),(cap,pad,max(0,tiles-1),rows,bm)]
+cases += [(4096,4224,33,30,64),(4096,4224,33,4096,128),(4096,4224,33,4096,64)]
+rng=random.Random(710)
+for _ in range(1000):cases.append(tuple(rng.randrange(8193) for _ in range(5)))
+for args in cases:
+ capacity,padded,tiles,rows,bm=args
+ want=int(0<rows<2**32 and 0<bm<2**32 and rows<=capacity and rows+bm<=padded and (rows+bm-1)//bm+1<=tiles)
+ out=ctypes.c_uint64(9);assert f(ctypes.byref(out),*args)==0;assert out.value==want,(args,out.value,want)
+assert f(None,4096,4224,33,30,64)==32
+print('PASS independent workspace capacity oracle',len(cases),'cases')
diff --git a/om/prefill-shape/workspace-mutants.py b/om/prefill-shape/workspace-mutants.py
new file mode 100644
index 00000000..f6b95c25
--- /dev/null
+++ b/om/prefill-shape/workspace-mutants.py
@@ -0,0 +1,33 @@
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+# External source-mutant verification, not a production dependency.
+import hashlib,os,subprocess,tempfile
+from pathlib import Path
+root=Path(__file__).resolve().parents[2]
+source=(root/'om/prefill-shape/workspace.om').read_text()
+mutants={
+ 'drop_row_capacity':('if gt rows capacity','if lt rows capacity'),
+ 'drop_padding':('if gt add rows bm padded','if lt add rows bm padded'),
+ 'drop_tile_capacity':('if gt needed tiles','if lt needed tiles'),
+ 'lose_guard_tile':('needed = add div add rows sub bm 1 bm 1','needed = div add rows sub bm 1 bm'),
+ 'admit_zero_rows':('if or eq rows 0 gt rows 4294967295','if or eq rows 1 gt rows 4294967295'),
+}
+
+ident=(root/'src/cudapp_om_prefill_workspace.ident').read_text().strip()
+pins=dict(part.split('=',1) for part in ident.split() if '=' in part)
+assert hashlib.sha256(Path(os.environ['OMEGA_OMC']).read_bytes()).hexdigest()==pins['omc']
+env=dict(os.environ,OMEGA_SEEDED_OMC=os.environ['OMEGA_OMC'])
+bridge=Path(os.environ['OMEGA_BRIDGE'])/'tools/bridge-seeded'
+assert hashlib.sha256(bridge.read_bytes()).hexdigest()==pins['frontend']
+assert hashlib.sha256((bridge.parent.parent/'src/toc.om').read_bytes()).hexdigest()==pins['converter']
+with tempfile.TemporaryDirectory(prefix='prefill-shape-mutants-') as t:
+ t=Path(t)
+ for name,(old,new) in mutants.items():
+  assert source.count(old)==1
+  om=t/(name+'.om');om.write_text(source.replace(old,new))
+  c=t/(name+'.c');so=t/(name+'.so')
+  with c.open('w') as f:subprocess.run(['sh',str(bridge),'c',str(om)],env=env,stdout=f,check=True)
+  subprocess.run([os.environ.get('CC','cc'),'-O2','-shared','-fPIC',str(c),'-o',str(so)],check=True)
+  p=subprocess.run(['python3',str(root/'om/prefill-shape/workspace-check.py'),str(so)],capture_output=True,text=True)
+  assert p.returncode!=0,name+' escaped oracle'
+  assert 'AssertionError' in p.stderr,(name,p.stderr)
+  print(name+': caught',flush=True)
diff --git a/om/prefill-shape/workspace.om b/om/prefill-shape/workspace.om
new file mode 100644
index 00000000..b8bcd4c0
--- /dev/null
+++ b/om/prefill-shape/workspace.om
@@ -0,0 +1,22 @@
+note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+note Reuse only when every existing row, padded-row and tile capacity covers the request.
+note Rows and height are bounded before the ceiling division, so sums cannot overflow ulong.
+fn native_qgworkspace capacity ulong padded ulong tiles ulong rows ulong bm ulong to ulong
+if or eq rows 0 gt rows 4294967295
+ret 0
+end
+if or eq bm 0 gt bm 4294967295
+ret 0
+end
+if gt rows capacity
+ret 0
+end
+if gt add rows bm padded
+ret 0
+end
+needed = add div add rows sub bm 1 bm 1
+if gt needed tiles
+ret 0
+end
+ret 1
+end
diff --git a/om/units.sh b/om/units.sh
index 59913531..b281f356 100755
--- a/om/units.sh
+++ b/om/units.sh
@@ -19,7 +19,7 @@ ENC="om/encoder/bw_enc_sm121.om,om/encoder/bw_spec_sm121.om,om/components/encode
 MOE="om/moe/moe_plan.om om/moe/moe_group.om om/moe/moe_ids32.om om/moe/moe_maps32.om om/moe/moe_segs32.om om/moe/moe_windows.om moe_admission=$PIPE,om/moe/moe_group.om,om/moe/moe_admit.om"
 CLOSURE="$REAL,om/cache/digest.om,om/moe/moe_windows.om,om/moe/moe_group.om,native/learn53/moe-closure.om"
 OBSERVE="closure_code=$CLOSURE,om/moe/closure_code.om closure_launch=$CLOSURE,om/moe/closure_launch.om closure_dir=$CLOSURE,om/moe/closure_dir.om closure_alloc=$CLOSURE,om/moe/closure_alloc.om closure_series=$CLOSURE,om/moe/closure_series.om"
-UNITS="${OMEGA_UNITS:-om/encoder/bw_enc_sm121.om om/cubin/cubin_elf.om om/encoder/ampere_enc_sm86.om om/encoder/amp_runtime.om repack=$QUANT,om/quant/repack.om quant_wire=$QUANT,om/quant/runtime.om compose=$COMP encode=$ENC cache_runtime=om/cache/residency.om,om/cache/runtime.om lease=om/cache/residency.om,om/cache/runtime.om,om/cache/lease.om slotrev=om/cache/residency.om,om/cache/slotrev.om command=om/cache/residency.om,om/cache/command.om validate=$CACHE,$COMP,$ENC,om/components/admit.om,om/cache/validate.om digest=$REAL,om/cache/digest.om,om/cache/key.om code_digest=$REAL,om/cache/digest.om,om/cache/codekey.om templates=$REAL,om/cache/digest.om,om/cache/templates.om graph=$PIPE,om/pipeline/runtime.om context_lookup=om/pipeline/context.om,om/pipeline/context_abi.om binding=$REAL,om/pipeline/binding.om $MOE closure_pack=$CLOSURE,om/moe/closure_pack.om closure_bind=$CLOSURE,om/moe/closure_bind.om closure_blob=$CLOSURE,om/moe/closure_blob.om closure_cover=$CLOSURE,om/pipeline/mccover.om,om/pipeline/coverage_entry.om closure_intent=$CLOSURE,om/pipeline/mccover.om closure_seal=$CLOSURE,om/pipeline/mccover.om,om/pipeline/seal_entry.om closure_reseal=$CLOSURE,om/pipeline/mccover.om,om/pipeline/seal_reuse.om $OBSERVE prefill_shape=om/prefill-shape/admit.om prefill_order=om/prefill-shape/order.om q38_runtime=om/q38-head/envelope.om,om/q38-head/plan.om q38_emit=om/components/bw_alloc.om,om/components/bw_effect.om,om/components/bw_check.om,om/components/bw_project.om,$ENC,om/q38-head/bounds.om,om/q38-head/emit.om}"
+UNITS="${OMEGA_UNITS:-om/encoder/bw_enc_sm121.om om/cubin/cubin_elf.om om/encoder/ampere_enc_sm86.om om/encoder/amp_runtime.om repack=$QUANT,om/quant/repack.om quant_wire=$QUANT,om/quant/runtime.om compose=$COMP encode=$ENC cache_runtime=om/cache/residency.om,om/cache/runtime.om lease=om/cache/residency.om,om/cache/runtime.om,om/cache/lease.om slotrev=om/cache/residency.om,om/cache/slotrev.om command=om/cache/residency.om,om/cache/command.om validate=$CACHE,$COMP,$ENC,om/components/admit.om,om/cache/validate.om digest=$REAL,om/cache/digest.om,om/cache/key.om code_digest=$REAL,om/cache/digest.om,om/cache/codekey.om templates=$REAL,om/cache/digest.om,om/cache/templates.om graph=$PIPE,om/pipeline/runtime.om context_lookup=om/pipeline/context.om,om/pipeline/context_abi.om binding=$REAL,om/pipeline/binding.om $MOE closure_pack=$CLOSURE,om/moe/closure_pack.om closure_bind=$CLOSURE,om/moe/closure_bind.om closure_blob=$CLOSURE,om/moe/closure_blob.om closure_cover=$CLOSURE,om/pipeline/mccover.om,om/pipeline/coverage_entry.om closure_intent=$CLOSURE,om/pipeline/mccover.om closure_seal=$CLOSURE,om/pipeline/mccover.om,om/pipeline/seal_entry.om closure_reseal=$CLOSURE,om/pipeline/mccover.om,om/pipeline/seal_reuse.om $OBSERVE prefill_shape=om/prefill-shape/admit.om prefill_reading=om/prefill-shape/reading.om prefill_workspace=om/prefill-shape/workspace.om prefill_order=om/prefill-shape/order.om q38_runtime=om/q38-head/envelope.om,om/q38-head/plan.om q38_emit=om/components/bw_alloc.om,om/components/bw_effect.om,om/components/bw_check.om,om/components/bw_project.om,$ENC,om/q38-head/bounds.om,om/q38-head/emit.om}"
 PURE_UNITS="revision=om/pipeline/revision.om epoch=om/pipeline/epoch.om f16=om/numeric/f16.om"
 DEST="${OMEGA_UNITS_DEST:-$ROOT/src}"
 OUTS="cudapp_native.h cudapp_om_units.ident"
diff --git a/src/cudapp_native.h b/src/cudapp_native.h
index d52e4a26..ae2e3410 100644
--- a/src/cudapp_native.h
+++ b/src/cudapp_native.h
@@ -50,6 +50,8 @@ uint32_t omega_native_mcdir(uint64_t *result, const void *p0, uint64_t p0_n, con
 uint32_t omega_native_mcalloc(uint64_t *result, const void *p0, uint64_t p0_n, const void *p1, uint64_t p1_n, void *p2, uint64_t p2_n);
 uint32_t omega_native_mcseries(uint64_t *result, const void *p0, uint64_t p0_n, const void *p1, uint64_t p1_n, const void *p2, uint64_t p2_n, void *p3, uint64_t p3_n);
 uint32_t omega_native_qgshape(uint64_t *result, uint64_t p0, uint64_t p1, uint64_t p2, uint64_t p3);
+uint32_t omega_native_qgreading(uint64_t *result, uint64_t p0, uint64_t p1);
+uint32_t omega_native_qgworkspace(uint64_t *result, uint64_t p0, uint64_t p1, uint64_t p2, uint64_t p3, uint64_t p4);
 uint32_t omega_native_qgorder(uint64_t *result, void *p0, uint64_t p0_n, uint64_t p1, uint64_t p2, uint64_t p3, uint64_t p4);
 uint32_t omega_q38_runtime(uint64_t *result, const void *p0, uint64_t p0_n, const void *p1, uint64_t p1_n, void *p2, uint64_t p2_n);
 uint32_t omega_q38_emit(uint64_t *result, void *p0, uint64_t p0_n);
diff --git a/src/cudapp_om_prefill_reading.c b/src/cudapp_om_prefill_reading.c
new file mode 100644
index 00000000..1c19519e
--- /dev/null
+++ b/src/cudapp_om_prefill_reading.c
@@ -0,0 +1,86 @@
+#if defined(__GNUC__)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+#pragma GCC diagnostic ignored "-Wunused-parameter"
+#pragma GCC diagnostic ignored "-Wmisleading-indentation"
+#endif
+/* Emitted by Omega Bridge. GNU C11, POSIX. Scalars use canonical 64-bit bits. */
+#include <stdint.h>
+#include <stddef.h>
+#include <unistd.h>
+#include <errno.h>
+#include <setjmp.h>
+static _Thread_local jmp_buf o_jmp;
+static _Thread_local int o_busy;
+static __attribute__((noreturn)) void o_trap(int c){if(o_busy)longjmp(o_jmp,c);_exit(100+c);}
+static _Thread_local unsigned o_depth;
+static void o_enter(void){if(++o_depth>128)o_trap(6);}
+static uint64_t o_leave(uint64_t v){--o_depth;return v;}
+static unsigned o_width(unsigned t){static const unsigned w[]={0,1,8,16,32,64,8,16,32,64};return w[t];}
+static __int128 o_value(unsigned t,uint64_t v){return t>=6 && v>>63 ? (__int128)v-(((__int128)1)<<64):(__int128)v;}
+static uint64_t o_norm(unsigned t,__int128 v,int code){unsigned w=o_width(t);if(t>=6){__int128 m=((__int128)1)<<(w-1);if(v< -m||v>=m)o_trap(code);}else {if(v<0||(__uint128_t)v>=(((__uint128_t)1)<<w))o_trap(code);}return (uint64_t)v;}
+static uint64_t o_cast(unsigned t,unsigned s,uint64_t a){return o_norm(t,o_value(s,a),5);}
+static uint64_t o_op(unsigned op,unsigned t,uint64_t a,uint64_t b){
+ __int128 x=o_value(t,a),y=o_value(t,b),z=0;unsigned w=o_width(t);uint64_t mask=w==64?UINT64_MAX:(((uint64_t)1<<w)-1);
+ if(op>=6&&op<=11){switch(op){case 6:return x==y;case 7:return x!=y;case 8:return x<y;case 9:return x<=y;case 10:return x>y;default:return x>=y;}}
+ if(op==12)return a&b;if(op==13)return a|b;if(op==14)return a^b;
+ if(op==15||op==16){if(b>=w)o_trap(7);if(op==15)return t>=6?o_norm(t,x*(((__int128)1)<<b),1):(a<<b)&mask;if(t<6)return a>>b;if(!b)return a;return (a>>b)|((a>>63)?(UINT64_MAX<<(64-b)):0);}
+ if(op==17){if(t<6)return (0-a)&mask;return o_norm(t,-x,1);}if(op==18)return t==1?!a:(t>=6?~a:(~a)&mask);
+ if(op==4||op==5){if(!b)o_trap(2);z=op==4?x/y:x%y;return t>=6?o_norm(t,z,1):(uint64_t)z;}
+ if(t<6){if(op==1)return (a+b)&mask;if(op==2)return (a-b)&mask;return (a*b)&mask;}
+ if(op==1)z=x+y;if(op==2)z=x-y;if(op==3)z=x*y;return o_norm(t,z,1);
+}
+static uint64_t o_get(const void *p,uint64_t n,uint64_t i,unsigned t){if(i>=n)o_trap(3);switch(t){case 2:return ((const uint8_t*)p)[i];case 3:return ((const uint16_t*)p)[i];case 4:return ((const uint32_t*)p)[i];case 5:return ((const uint64_t*)p)[i];case 6:return (uint64_t)((const int8_t*)p)[i];case 7:return (uint64_t)((const int16_t*)p)[i];case 8:return (uint64_t)((const int32_t*)p)[i];default:return (uint64_t)((const int64_t*)p)[i];}}
+static void o_put(void *p,uint64_t n,uint64_t i,uint64_t v,unsigned t){if(i>=n)o_trap(3);o_norm(t,o_value(t,v),5);switch(t){case 2:((uint8_t*)p)[i]=(uint8_t)v;break;case 3:((uint16_t*)p)[i]=(uint16_t)v;break;case 4:((uint32_t*)p)[i]=(uint32_t)v;break;case 5:((uint64_t*)p)[i]=v;break;case 6:((int8_t*)p)[i]=(int8_t)o_value(t,v);break;case 7:((int16_t*)p)[i]=(int16_t)o_value(t,v);break;case 8:((int32_t*)p)[i]=(int32_t)o_value(t,v);break;default:((int64_t*)p)[i]=(int64_t)o_value(t,v);}}
+static void o_fill(void *p,uint64_t n,uint64_t v,unsigned t){for(uint64_t i=0;i<n;i++)o_put(p,n,i,v,t);}
+static uint64_t o_io(unsigned op,uint64_t fd,const void *p,uint64_t n,uint64_t off,uint64_t len){if(off>n||len>n-off)o_trap(3);int f=(int)o_value(8,fd);ssize_t r=op==1?read(f,(uint8_t*)p+off,(size_t)len):write(f,(const uint8_t*)p+off,(size_t)len);return r<0?(uint64_t)(-(int64_t)errno):(uint64_t)r;}
+static int o_valid(unsigned t,uint64_t v){unsigned w=o_width(t);__int128 x=o_value(t,v);__int128 m=((__int128)1)<<(t>=6?w-1:w);return t>=6?x>=-m&&x<m:x>=0&&x<m;}
+static int o_buf(const void *p,uint64_t n,uint64_t want,unsigned t){uintptr_t a=(uintptr_t)p;uint64_t z=t==2?1:8;return p&&n==want&&a%z==0&&n<=UINTPTR_MAX/z&&a<=UINTPTR_MAX-n*z;}
+static int o_overlap(const void *a,uint64_t an,const void *b,uint64_t bn){uintptr_t x=(uintptr_t)a,y=(uintptr_t)b;return x<y+bn&&y<x+an;}
+#include <float.h>
+#include <fenv.h>
+#if FLT_RADIX != 2 || FLT_MANT_DIG != 24 || FLT_MAX_EXP != 128 || FLT_EVAL_METHOD != 0
+#error unsupported binary32 environment
+#endif
+#if defined(__FAST_MATH__)
+#error fast math is not a supported Omega environment
+#endif
+static uint64_t o_f32(unsigned op,uint64_t a,uint64_t b){uint32_t ua=(uint32_t)a,ub=(uint32_t)b,ur;float x,y;__builtin_memcpy(&x,&ua,4);__builtin_memcpy(&y,&ub,4);if(op==1)return ua&UINT32_C(0x7fffffff);if(op==2){volatile float z=x*y;__builtin_memcpy(&ur,(const void*)&z,4);return ur;}return x<=y;}
+static uint64_t f0(uint64_t v0, uint64_t v1);
+static uint64_t f0(uint64_t v0, uint64_t v1){
+o_enter();
+if(({uint64_t _a=({uint64_t _a=v0;uint64_t _b=0ULL;o_op(6, 5, _a,_b);});uint64_t _b=({uint64_t _a=v0;uint64_t _b=4294967295ULL;o_op(10, 5, _a,_b);});o_op(13, 1, _a,_b);})){
+return o_leave(4294967295ULL);
+}
+if(({uint64_t _a=v1;uint64_t _b=3ULL;o_op(10, 5, _a,_b);})){
+return o_leave(4294967295ULL);
+}
+if(({uint64_t _a=v1;uint64_t _b=0ULL;o_op(6, 5, _a,_b);})){
+if(({uint64_t _a=v0;uint64_t _b=64ULL;o_op(9, 5, _a,_b);})){
+return o_leave(4ULL);
+}
+return o_leave(8ULL);
+}
+if(({uint64_t _a=v1;uint64_t _b=1ULL;o_op(6, 5, _a,_b);})){
+return o_leave(8ULL);
+}
+if(({uint64_t _a=v1;uint64_t _b=2ULL;o_op(6, 5, _a,_b);})){
+return o_leave(45ULL);
+}
+if(({uint64_t _a=v0;uint64_t _b=64ULL;o_op(9, 5, _a,_b);})){
+return o_leave(0ULL);
+}
+return o_leave(4ULL);
+}
+uint32_t omega_native_qgreading(uint64_t *result, volatile uint64_t p0, volatile uint64_t p1){
+if(!o_buf(result,1,1,5))return 32;
+if(!o_valid(5, p0))return 32;
+if(!o_valid(5, p1))return 32;
+if(o_busy)return 33;
+o_busy=1;o_depth=0;int code=setjmp(o_jmp);
+if(!code)*result=f0(p0, p1);
+o_busy=0;o_depth=0;return (uint32_t)code;
+}
+#if defined(__GNUC__)
+#pragma GCC diagnostic pop
+#endif
diff --git a/src/cudapp_om_prefill_reading.ident b/src/cudapp_om_prefill_reading.ident
new file mode 100644
index 00000000..77b54d73
--- /dev/null
+++ b/src/cudapp_om_prefill_reading.ident
@@ -0,0 +1 @@
+omega-ident 2 unit=prefill_reading abi=bridge-seeded src=e799870ac7fefc245695f040773b365209b960f9da336abad592b2fb812fb1d3 c=82ba2d9c34ffd2e006f7b3028f509068d80c5c6f6cc27bdfea81ee972323108d omc=2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f converter=3a416aea14770bd3fab4880337e89020c10476214d7a3c139d8cd1a8ba1423e6 frontend=23ff7a2356bb5d980060a4685a27ac46587013069b7d24b37c2873d7ee659b37 path=prefill_reading=om/prefill-shape/reading.om
diff --git a/src/cudapp_om_prefill_workspace.c b/src/cudapp_om_prefill_workspace.c
new file mode 100644
index 00000000..e7b0ae7d
--- /dev/null
+++ b/src/cudapp_om_prefill_workspace.c
@@ -0,0 +1,84 @@
+#if defined(__GNUC__)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+#pragma GCC diagnostic ignored "-Wunused-parameter"
+#pragma GCC diagnostic ignored "-Wmisleading-indentation"
+#endif
+/* Emitted by Omega Bridge. GNU C11, POSIX. Scalars use canonical 64-bit bits. */
+#include <stdint.h>
+#include <stddef.h>
+#include <unistd.h>
+#include <errno.h>
+#include <setjmp.h>
+static _Thread_local jmp_buf o_jmp;
+static _Thread_local int o_busy;
+static __attribute__((noreturn)) void o_trap(int c){if(o_busy)longjmp(o_jmp,c);_exit(100+c);}
+static _Thread_local unsigned o_depth;
+static void o_enter(void){if(++o_depth>128)o_trap(6);}
+static uint64_t o_leave(uint64_t v){--o_depth;return v;}
+static unsigned o_width(unsigned t){static const unsigned w[]={0,1,8,16,32,64,8,16,32,64};return w[t];}
+static __int128 o_value(unsigned t,uint64_t v){return t>=6 && v>>63 ? (__int128)v-(((__int128)1)<<64):(__int128)v;}
+static uint64_t o_norm(unsigned t,__int128 v,int code){unsigned w=o_width(t);if(t>=6){__int128 m=((__int128)1)<<(w-1);if(v< -m||v>=m)o_trap(code);}else {if(v<0||(__uint128_t)v>=(((__uint128_t)1)<<w))o_trap(code);}return (uint64_t)v;}
+static uint64_t o_cast(unsigned t,unsigned s,uint64_t a){return o_norm(t,o_value(s,a),5);}
+static uint64_t o_op(unsigned op,unsigned t,uint64_t a,uint64_t b){
+ __int128 x=o_value(t,a),y=o_value(t,b),z=0;unsigned w=o_width(t);uint64_t mask=w==64?UINT64_MAX:(((uint64_t)1<<w)-1);
+ if(op>=6&&op<=11){switch(op){case 6:return x==y;case 7:return x!=y;case 8:return x<y;case 9:return x<=y;case 10:return x>y;default:return x>=y;}}
+ if(op==12)return a&b;if(op==13)return a|b;if(op==14)return a^b;
+ if(op==15||op==16){if(b>=w)o_trap(7);if(op==15)return t>=6?o_norm(t,x*(((__int128)1)<<b),1):(a<<b)&mask;if(t<6)return a>>b;if(!b)return a;return (a>>b)|((a>>63)?(UINT64_MAX<<(64-b)):0);}
+ if(op==17){if(t<6)return (0-a)&mask;return o_norm(t,-x,1);}if(op==18)return t==1?!a:(t>=6?~a:(~a)&mask);
+ if(op==4||op==5){if(!b)o_trap(2);z=op==4?x/y:x%y;return t>=6?o_norm(t,z,1):(uint64_t)z;}
+ if(t<6){if(op==1)return (a+b)&mask;if(op==2)return (a-b)&mask;return (a*b)&mask;}
+ if(op==1)z=x+y;if(op==2)z=x-y;if(op==3)z=x*y;return o_norm(t,z,1);
+}
+static uint64_t o_get(const void *p,uint64_t n,uint64_t i,unsigned t){if(i>=n)o_trap(3);switch(t){case 2:return ((const uint8_t*)p)[i];case 3:return ((const uint16_t*)p)[i];case 4:return ((const uint32_t*)p)[i];case 5:return ((const uint64_t*)p)[i];case 6:return (uint64_t)((const int8_t*)p)[i];case 7:return (uint64_t)((const int16_t*)p)[i];case 8:return (uint64_t)((const int32_t*)p)[i];default:return (uint64_t)((const int64_t*)p)[i];}}
+static void o_put(void *p,uint64_t n,uint64_t i,uint64_t v,unsigned t){if(i>=n)o_trap(3);o_norm(t,o_value(t,v),5);switch(t){case 2:((uint8_t*)p)[i]=(uint8_t)v;break;case 3:((uint16_t*)p)[i]=(uint16_t)v;break;case 4:((uint32_t*)p)[i]=(uint32_t)v;break;case 5:((uint64_t*)p)[i]=v;break;case 6:((int8_t*)p)[i]=(int8_t)o_value(t,v);break;case 7:((int16_t*)p)[i]=(int16_t)o_value(t,v);break;case 8:((int32_t*)p)[i]=(int32_t)o_value(t,v);break;default:((int64_t*)p)[i]=(int64_t)o_value(t,v);}}
+static void o_fill(void *p,uint64_t n,uint64_t v,unsigned t){for(uint64_t i=0;i<n;i++)o_put(p,n,i,v,t);}
+static uint64_t o_io(unsigned op,uint64_t fd,const void *p,uint64_t n,uint64_t off,uint64_t len){if(off>n||len>n-off)o_trap(3);int f=(int)o_value(8,fd);ssize_t r=op==1?read(f,(uint8_t*)p+off,(size_t)len):write(f,(const uint8_t*)p+off,(size_t)len);return r<0?(uint64_t)(-(int64_t)errno):(uint64_t)r;}
+static int o_valid(unsigned t,uint64_t v){unsigned w=o_width(t);__int128 x=o_value(t,v);__int128 m=((__int128)1)<<(t>=6?w-1:w);return t>=6?x>=-m&&x<m:x>=0&&x<m;}
+static int o_buf(const void *p,uint64_t n,uint64_t want,unsigned t){uintptr_t a=(uintptr_t)p;uint64_t z=t==2?1:8;return p&&n==want&&a%z==0&&n<=UINTPTR_MAX/z&&a<=UINTPTR_MAX-n*z;}
+static int o_overlap(const void *a,uint64_t an,const void *b,uint64_t bn){uintptr_t x=(uintptr_t)a,y=(uintptr_t)b;return x<y+bn&&y<x+an;}
+#include <float.h>
+#include <fenv.h>
+#if FLT_RADIX != 2 || FLT_MANT_DIG != 24 || FLT_MAX_EXP != 128 || FLT_EVAL_METHOD != 0
+#error unsupported binary32 environment
+#endif
+#if defined(__FAST_MATH__)
+#error fast math is not a supported Omega environment
+#endif
+static uint64_t o_f32(unsigned op,uint64_t a,uint64_t b){uint32_t ua=(uint32_t)a,ub=(uint32_t)b,ur;float x,y;__builtin_memcpy(&x,&ua,4);__builtin_memcpy(&y,&ub,4);if(op==1)return ua&UINT32_C(0x7fffffff);if(op==2){volatile float z=x*y;__builtin_memcpy(&ur,(const void*)&z,4);return ur;}return x<=y;}
+static uint64_t f0(uint64_t v0, uint64_t v1, uint64_t v2, uint64_t v3, uint64_t v4);
+static uint64_t f0(uint64_t v0, uint64_t v1, uint64_t v2, uint64_t v3, uint64_t v4){
+o_enter();
+if(({uint64_t _a=({uint64_t _a=v3;uint64_t _b=0ULL;o_op(6, 5, _a,_b);});uint64_t _b=({uint64_t _a=v3;uint64_t _b=4294967295ULL;o_op(10, 5, _a,_b);});o_op(13, 1, _a,_b);})){
+return o_leave(0ULL);
+}
+if(({uint64_t _a=({uint64_t _a=v4;uint64_t _b=0ULL;o_op(6, 5, _a,_b);});uint64_t _b=({uint64_t _a=v4;uint64_t _b=4294967295ULL;o_op(10, 5, _a,_b);});o_op(13, 1, _a,_b);})){
+return o_leave(0ULL);
+}
+if(({uint64_t _a=v3;uint64_t _b=v0;o_op(10, 5, _a,_b);})){
+return o_leave(0ULL);
+}
+if(({uint64_t _a=({uint64_t _a=v3;uint64_t _b=v4;o_op(1, 5, _a,_b);});uint64_t _b=v1;o_op(10, 5, _a,_b);})){
+return o_leave(0ULL);
+}
+uint64_t __attribute__((unused)) v5=({uint64_t _a=({uint64_t _a=({uint64_t _a=v3;uint64_t _b=({uint64_t _a=v4;uint64_t _b=1ULL;o_op(2, 5, _a,_b);});o_op(1, 5, _a,_b);});uint64_t _b=v4;o_op(4, 5, _a,_b);});uint64_t _b=1ULL;o_op(1, 5, _a,_b);});
+if(({uint64_t _a=v5;uint64_t _b=v2;o_op(10, 5, _a,_b);})){
+return o_leave(0ULL);
+}
+return o_leave(1ULL);
+}
+uint32_t omega_native_qgworkspace(uint64_t *result, volatile uint64_t p0, volatile uint64_t p1, volatile uint64_t p2, volatile uint64_t p3, volatile uint64_t p4){
+if(!o_buf(result,1,1,5))return 32;
+if(!o_valid(5, p0))return 32;
+if(!o_valid(5, p1))return 32;
+if(!o_valid(5, p2))return 32;
+if(!o_valid(5, p3))return 32;
+if(!o_valid(5, p4))return 32;
+if(o_busy)return 33;
+o_busy=1;o_depth=0;int code=setjmp(o_jmp);
+if(!code)*result=f0(p0, p1, p2, p3, p4);
+o_busy=0;o_depth=0;return (uint32_t)code;
+}
+#if defined(__GNUC__)
+#pragma GCC diagnostic pop
+#endif
diff --git a/src/cudapp_om_prefill_workspace.ident b/src/cudapp_om_prefill_workspace.ident
new file mode 100644
index 00000000..b0f9d8b8
--- /dev/null
+++ b/src/cudapp_om_prefill_workspace.ident
@@ -0,0 +1 @@
+omega-ident 2 unit=prefill_workspace abi=bridge-seeded src=953bdaf7352e2e8b7c54f2b55996dffb612790f22468340d034d93c9223e9689 c=893d9ede96e003d763d8022e2fa60b9619b92399d186460043125c4c974fe7fb omc=2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f converter=3a416aea14770bd3fab4880337e89020c10476214d7a3c139d8cd1a8ba1423e6 frontend=23ff7a2356bb5d980060a4685a27ac46587013069b7d24b37c2873d7ee659b37 path=prefill_workspace=om/prefill-shape/workspace.om
diff --git a/src/cudapp_om_units.ident b/src/cudapp_om_units.ident
index 4b8ce9a5..a3885e30 100644
--- a/src/cudapp_om_units.ident
+++ b/src/cudapp_om_units.ident
@@ -37,6 +37,8 @@ omega-ident 2 unit=closure_dir abi=bridge-seeded src=744abff597179e71cbfc63b9f23
 omega-ident 2 unit=closure_alloc abi=bridge-seeded src=03d54ba1cd85fe2745e53dd8b8f2698db633c2e40d6bd3cffaa282111d04be47 c=b93849c3f0791273b3f150294a8ea95c82d747dbf9369a639b41a0aadd04238b omc=2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f converter=3a416aea14770bd3fab4880337e89020c10476214d7a3c139d8cd1a8ba1423e6 frontend=23ff7a2356bb5d980060a4685a27ac46587013069b7d24b37c2873d7ee659b37 path=closure_alloc=om/quant/quant.om,om/components/realize.om,om/cache/digest.om,om/moe/moe_windows.om,om/moe/moe_group.om,native/learn53/moe-closure.om,om/moe/closure_alloc.om
 omega-ident 2 unit=closure_series abi=bridge-seeded src=f58f14e2050dff8ccee6dedc11dfc92fe16d113988f2ee4d8e3d52480345ddae c=abd1ffe24fa67b2266790b07034c4691b4fbb8dacc2dd9bc4f8c8ef78a191832 omc=2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f converter=3a416aea14770bd3fab4880337e89020c10476214d7a3c139d8cd1a8ba1423e6 frontend=23ff7a2356bb5d980060a4685a27ac46587013069b7d24b37c2873d7ee659b37 path=closure_series=om/quant/quant.om,om/components/realize.om,om/cache/digest.om,om/moe/moe_windows.om,om/moe/moe_group.om,native/learn53/moe-closure.om,om/moe/closure_series.om
 omega-ident 2 unit=prefill_shape abi=bridge-seeded src=0a64dc98f47711c6e75af62b6afe43b0f4ffbc3181c2f3a34ac1f2788d2ac23b c=4dca73ff1821f73bdc6d13050a1a1be4762354ee9c6d082145adf057c49530b6 omc=2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f converter=3a416aea14770bd3fab4880337e89020c10476214d7a3c139d8cd1a8ba1423e6 frontend=23ff7a2356bb5d980060a4685a27ac46587013069b7d24b37c2873d7ee659b37 path=prefill_shape=om/prefill-shape/admit.om
+omega-ident 2 unit=prefill_reading abi=bridge-seeded src=e799870ac7fefc245695f040773b365209b960f9da336abad592b2fb812fb1d3 c=82ba2d9c34ffd2e006f7b3028f509068d80c5c6f6cc27bdfea81ee972323108d omc=2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f converter=3a416aea14770bd3fab4880337e89020c10476214d7a3c139d8cd1a8ba1423e6 frontend=23ff7a2356bb5d980060a4685a27ac46587013069b7d24b37c2873d7ee659b37 path=prefill_reading=om/prefill-shape/reading.om
+omega-ident 2 unit=prefill_workspace abi=bridge-seeded src=953bdaf7352e2e8b7c54f2b55996dffb612790f22468340d034d93c9223e9689 c=893d9ede96e003d763d8022e2fa60b9619b92399d186460043125c4c974fe7fb omc=2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f converter=3a416aea14770bd3fab4880337e89020c10476214d7a3c139d8cd1a8ba1423e6 frontend=23ff7a2356bb5d980060a4685a27ac46587013069b7d24b37c2873d7ee659b37 path=prefill_workspace=om/prefill-shape/workspace.om
 omega-ident 2 unit=prefill_order abi=bridge-seeded src=72bd9cd03401012a45c9ea4e0f4e583bfda23fe1e58e628e773cc856344eaf3e c=43c835999dd230d3b953ad5b002a63d116638d93b4cb6893525676db6432ae77 omc=2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f converter=3a416aea14770bd3fab4880337e89020c10476214d7a3c139d8cd1a8ba1423e6 frontend=23ff7a2356bb5d980060a4685a27ac46587013069b7d24b37c2873d7ee659b37 path=prefill_order=om/prefill-shape/order.om
 omega-ident 2 unit=q38_runtime abi=bridge-seeded src=9b688d301a7dfa239268b23487bd653243625a785bb33f941c2f94d9f40a38ff c=df1efe6702506d0ce9a62fe47115af7a3bc68d098ad28a9973884be7943cebec omc=2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f converter=3a416aea14770bd3fab4880337e89020c10476214d7a3c139d8cd1a8ba1423e6 frontend=23ff7a2356bb5d980060a4685a27ac46587013069b7d24b37c2873d7ee659b37 path=q38_runtime=om/q38-head/envelope.om,om/q38-head/plan.om
 omega-ident 2 unit=q38_emit abi=bridge-seeded src=f929bdf0f5198c5e4f0b3ff369f2755985b5e9e19303df895ca8e7d49e744b21 c=113b5c9e6ffefe0adfe6fb3e2f06da6dd276a8b3ff350a9509694b03cc4cbba0 omc=2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f converter=3a416aea14770bd3fab4880337e89020c10476214d7a3c139d8cd1a8ba1423e6 frontend=23ff7a2356bb5d980060a4685a27ac46587013069b7d24b37c2873d7ee659b37 path=q38_emit=om/components/bw_alloc.om,om/components/bw_effect.om,om/components/bw_check.om,om/components/bw_project.om,om/encoder/bw_enc_sm121.om,om/encoder/bw_spec_sm121.om,om/components/encode.om,om/q38-head/bounds.om,om/q38-head/emit.om
diff --git a/src/omega_gpu_pfgemm.c b/src/omega_gpu_pfgemm.c
index 2733418a..871d0200 100644
--- a/src/omega_gpu_pfgemm.c
+++ b/src/omega_gpu_pfgemm.c
@@ -190,14 +190,16 @@ uint32_t omega_gpu_pf_qgemm_tiles(const OmegaGpuFp8Tensor *t, const uint32_t *co
 
 static int gen_qg(const OmegaPfKey *key, void *prog) { OmegaQgSpec s; memcpy(&s, key->words, sizeof s); return omega_blackwell_codegen_qgemm_prog(&s, prog); }
 
-static int qg_core(OmegaGpuCmdList *cl, uint32_t n, uint32_t k, uint32_t layout, uint64_t tiles_va, uint32_t ntiles, uint64_t rowidx_va, uint64_t xq_va,
+static int qg_core(OmegaGpuCmdList *cl, const OmegaQgSpec *scoped, uint32_t n, uint32_t k, uint32_t layout, uint64_t tiles_va, uint32_t ntiles, uint64_t rowidx_va, uint64_t xq_va,
                    uint64_t xs_va, uint64_t y_va, uint64_t *ns) {
     if (!tiles_va || !xq_va || !xs_va || !y_va) return OMEGA_GPU_PF_BAD_ARGS;
     if (layout != OMEGA_GPU_PF_PLAIN && layout != OMEGA_GPU_PF_SWIGLU_NAT) return OMEGA_GPU_PF_BAD_ARGS;
     if (ntiles == 0) return OMEGA_GPU_PF_OK;
     if (ntiles > 65535u) return OMEGA_GPU_PF_TOO_LARGE;
     OmegaQgSpec s; memset(&s, 0, sizeof s);
-    s.k = k; s.rt = QRT(); s.warps = QWARPS(); s.wait = QWAIT(); s.n = n; s.mutant = q.mutant; s.group = q.group;
+    if (scoped) s = *scoped;
+    else { s.rt = QRT(); s.warps = QWARPS(); s.wait = QWAIT(); s.mutant = q.mutant; s.group = q.group; }
+    s.k = k; s.n = n;
     s.epi = layout == OMEGA_GPU_PF_SWIGLU_NAT ? OMEGA_QG_EPI_SWIGLU : OMEGA_QG_EPI_F32; s.direct = rowidx_va == 0;
     if (!omega_qg_spec_ok(&s)) return OMEGA_GPU_PF_BAD_ARGS;
     const uint32_t span = omega_qg_span(&s);
@@ -221,10 +223,42 @@ static int qg_core(OmegaGpuCmdList *cl, uint32_t n, uint32_t k, uint32_t layout,
     return rc;
 }
 int omega_gpu_pf_qgemm(uint32_t n, uint32_t k, uint32_t layout, uint64_t tiles_va, uint32_t ntiles, uint64_t rowidx_va, uint64_t xq_va, uint64_t xs_va, uint64_t y_va, uint64_t *ns) {
-    return qg_core(NULL, n, k, layout, tiles_va, ntiles, rowidx_va, xq_va, xs_va, y_va, ns);
+    return qg_core(NULL, NULL, n, k, layout, tiles_va, ntiles, rowidx_va, xq_va, xs_va, y_va, ns);
 }
 int omega_gpu_pf_qgemm_record(OmegaGpuCmdList *cl, uint32_t n, uint32_t k, uint32_t layout, uint64_t tiles_va, uint32_t ntiles,
                               uint64_t rowidx_va, uint64_t xq_va, uint64_t xs_va, uint64_t y_va) {
     if (!cl) return OMEGA_GPU_PF_BAD_ARGS;
-    return qg_core(cl, n, k, layout, tiles_va, ntiles, rowidx_va, xq_va, xs_va, y_va, NULL);
+    return qg_core(cl, NULL, n, k, layout, tiles_va, ntiles, rowidx_va, xq_va, xs_va, y_va, NULL);
+}
+
+/* Per-call options: no reads or writes of the experimental process-global knobs.
+ * Shape and work-order admission remain in the checked Omega units. */
+static OmegaQgSpec qg_scoped_spec(uint32_t rt, uint32_t warps, uint32_t wait, uint32_t group) {
+    OmegaQgSpec s; memset(&s, 0, sizeof s);
+    s.rt = rt; s.warps = warps; s.wait = wait; s.group = group;
+    return s;
+}
+uint32_t omega_gpu_pf_qgemm_scoped_bm(uint32_t rt, uint32_t warps, uint32_t wait, uint32_t group) {
+    OmegaQgSpec s = qg_scoped_spec(rt, warps, wait, group);
+    s.n = 256; s.k = 128; s.direct = 1;
+    return omega_qg_spec_ok(&s) ? 16u * s.rt : 0;
+}
+int omega_gpu_pf_qgemm_scoped(uint32_t rt, uint32_t warps, uint32_t wait, uint32_t group,
+                              uint32_t n, uint32_t k, uint32_t layout, uint64_t tiles_va, uint32_t ntiles,
+                              uint64_t rowidx_va, uint64_t xq_va, uint64_t xs_va, uint64_t y_va, uint64_t *ns) {
+    const OmegaQgSpec s = qg_scoped_spec(rt, warps, wait, group);
+    return qg_core(NULL, &s, n, k, layout, tiles_va, ntiles, rowidx_va, xq_va, xs_va, y_va, ns);
+}
+
+/* Scalar transport for the checked Omega reading profile. */
+uint32_t omega_gpu_pf_qgemm_reading_option(uint32_t rows, uint32_t index) {
+    uint64_t option = UINT32_MAX;
+    if (omega_native_qgreading(&option, rows, index) != OMEGA_OK || option > UINT32_MAX) return UINT32_MAX;
+    return (uint32_t)option;
+}
+
+/* Existing allocation capacities are admitted by Omega before reusing another profile. */
+int omega_gpu_pf_qgemm_workspace_fits(uint64_t capacity, uint64_t padded, uint64_t tiles, uint64_t rows, uint64_t bm) {
+    uint64_t fits = 0;
+    return omega_native_qgworkspace(&fits, capacity, padded, tiles, rows, bm) == OMEGA_OK && fits == 1;
 }
diff --git a/src/omega_gpu_prefill.h b/src/omega_gpu_prefill.h
index 0dc62b5f..0ba34118 100644
--- a/src/omega_gpu_prefill.h
+++ b/src/omega_gpu_prefill.h
@@ -105,6 +105,13 @@ struct OmegaGpuCmdList;
 int omega_gpu_pf_quant_record(struct OmegaGpuCmdList *cl, uint32_t k, uint32_t in_type, uint32_t rows, uint64_t x_va, uint64_t q_va, uint64_t s_va);
 int omega_gpu_pf_qgemm_record(struct OmegaGpuCmdList *cl, uint32_t n, uint32_t k, uint32_t layout, uint64_t tiles_va, uint32_t ntiles,
                               uint64_t rowidx_va, uint64_t xq_va, uint64_t xs_va, uint64_t y_va);
+/* Explicit options belong to this call only. bm returns 0 for refused options;
+ * a real call also validates its projection shape. Tile buffers must use this bm. */
+/* Omega-owned reading options (rt, warps, wait, group), UINT32_MAX on refusal. */
+int omega_gpu_pf_qgemm_workspace_fits(uint64_t capacity, uint64_t padded, uint64_t tiles, uint64_t rows, uint64_t bm);
+uint32_t omega_gpu_pf_qgemm_reading_option(uint32_t rows, uint32_t index);
+uint32_t omega_gpu_pf_qgemm_scoped_bm(uint32_t rt, uint32_t warps, uint32_t wait, uint32_t group);
+int omega_gpu_pf_qgemm_scoped(uint32_t rt, uint32_t warps, uint32_t wait, uint32_t group, uint32_t n, uint32_t k, uint32_t layout, uint64_t tiles_va, uint32_t ntiles, uint64_t rowidx_va, uint64_t xq_va, uint64_t xs_va, uint64_t y_va, uint64_t *ns);
 void omega_gpu_pf_qgemm_set_group(uint32_t group); /* 0 restores original order; 1..5 candidate reuse groups. Set before model use. */
 void omega_gpu_pf_qgemm_set_shape(uint32_t rt, uint32_t warps, uint32_t wait); /* knobs (all 0 restores rt 4, warps 8, wait 45) */
 void omega_gpu_pf_qgemm_test_set_mutant(int m);
diff --git a/src/omega_runtime_api.h b/src/omega_runtime_api.h
index 7558d535..b0362a7b 100644
--- a/src/omega_runtime_api.h
+++ b/src/omega_runtime_api.h
@@ -14,7 +14,7 @@
  * tools/runtime_api_semver.sh fails when the manifest changed without the bump the rule asks for.
  */
 #define OMEGA_RUNTIME_API_VERSION_MAJOR 0
-#define OMEGA_RUNTIME_API_VERSION_MINOR 10
+#define OMEGA_RUNTIME_API_VERSION_MINOR 12
 #define OMEGA_RUNTIME_API_VERSION_PATCH 0
 /* One number for #if comparisons: (MAJOR << 16) | MINOR. PATCH is left out: it never changes the surface. */
 #define OMEGA_RUNTIME_API_VERSION ((OMEGA_RUNTIME_API_VERSION_MAJOR << 16) | OMEGA_RUNTIME_API_VERSION_MINOR)