Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
691586c
fix(runtime): recognize GB10 raw SM identity with PCI and class checks
aien-spark Nov 1, 2026
1d5afce
feat(q38): generate conservative score bounds in Omega for GPU screening
aien-spark Nov 1, 2026
f8e7dc0
test(q38): reject uselessly wide screening bounds
aien-spark Nov 1, 2026
7667c09
test(q38): run bounds verification in the host suite
aien-spark Nov 1, 2026
e561f29
test(q38): record exact two-pass GPU head replay and failure control
aien-spark Nov 1, 2026
80c5005
test(q38): keep replay patch free of whitespace-only context
aien-spark Nov 1, 2026
200c059
feat(q38): add Omega exact-head schedule and fixed envelope
aien-spark Nov 1, 2026
3916065
perf: reuse exact Omega command seals after byte comparison
aien-spark Nov 1, 2026
009ada7
test(q38): record combined exact-head serving qualification
aien-spark Nov 1, 2026
6d51834
perf: optimize the generated integer command seal unit
aien-spark Nov 1, 2026
6a93cb5
chore: refresh pipeline crumb for seal validation receipt
aien-spark Nov 1, 2026
0cc2579
perf: admit a checked Omega 32-row prefill kernel shape
aien-spark Nov 1, 2026
2d7a41c
test: record short serving parity for the 32-row prompt kernel
aien-spark Nov 1, 2026
370c9b0
perf: experiment with bounded 128-row prompt matrices
aien-spark Nov 1, 2026
ecb672c
test: record full host validation for 128-row candidate
aien-spark Nov 1, 2026
0b7c147
perf(qgemm): add checked Omega work ordering
aien-spark Nov 1, 2026
572a73b
fix(prefill): honor explicit kernel register budget
aien-spark Nov 1, 2026
28b533c
Merge checked prefill cache budget correction
aien-spark Nov 1, 2026
6d339a0
docs(prefill): record combined reading speed screen
aien-spark Nov 1, 2026
f50be1f
feat(prefill): scope reading options to each qgemm call
aien-spark Nov 1, 2026
fa70990
docs(prefill): record scoped call isolation proof
aien-spark Nov 1, 2026
2089a92
docs(prefill): record completed full host rerun
aien-spark Nov 1, 2026
3751e1a
docs(prefill): record completed full host rerun
aien-spark Nov 1, 2026
a73ab65
docs(prefill): carry parent host proof into work-order review
aien-spark Nov 1, 2026
667da74
docs(prefill): carry completed parent host evidence
aien-spark Nov 1, 2026
0ed6c06
docs(prefill): record all scoped host gates passing
aien-spark Nov 1, 2026
6068d94
docs(prefill): record scoped full-model parity and timing tradeoff
aien-spark Nov 1, 2026
decf025
perf(prefill): propose Omega profiles for short and long reading
aien-spark Nov 1, 2026
8837939
perf(prefill): admit compatible reading workspace reuse in Omega
aien-spark Nov 1, 2026
6820ff0
test(prefill): record adaptive full-suite and model parity
aien-spark Nov 1, 2026
ede9c14
perf(attention): add scoped Omega-controlled cached history
aien-spark Nov 1, 2026
878c2cd
docs(runtime): register scoped attention header in portability inventory
aien-spark Nov 1, 2026
bb6306a
docs(attention): record integrated parity and first-response evidence
aien-spark Nov 1, 2026
9ade9f5
fix(test): preserve host targets registered by earlier fragments
aien-spark Nov 1, 2026
245122b
docs(attention): record full host suite and 64K serving proof
aien-spark Nov 1, 2026
4fdc157
docs(attention): record completed 128K serving validation
aien-spark Nov 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions docs/runtime/API.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Omega Runtime API v0

Omega Runtime API version: 0.9.0
Omega Runtime API version: 0.13.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
Expand Down Expand Up @@ -36,8 +36,12 @@ signature against the headers on every run.

## 2. Version and compatibility rule

The version is MAJOR.MINOR.PATCH (semantic versioning), currently **0.9.0**. It is a property of the list of entries and
The version is MAJOR.MINOR.PATCH (semantic versioning), currently **0.13.0**. It is a property of the list of entries and
their behaviour, not of the library build. Changes so far:
- 0.13.0: adds experimental `omega_gpu_prefill_attn256_scoped` in `omega_gpu_attention_mirror.h`. Mode 0 preserves ordinary attention; mode 1 copies the complete original 27B K/V into one GPU-private reusable buffer before attention; mode 2 uses the provisional Omega-selected 1024-row threshold. Omega checks geometry, bounds, allocation capacity and completed PREP/copy/ATTEND ordering. Other modes and unsupported mirrored shapes are refused. `copy_ns` reports copy chip time separately from the unchanged attention info layout; total call time includes allocation and copying. Existing host/device/recorded entries and defaults are unchanged. See `om/attention-mirror/README.md` for qualification status.
- 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
`omega_gpu_session_target_sm`. Zero-initialized legacy launches still mean sm_121, not auto-detect.
Expand Down Expand Up @@ -593,7 +597,7 @@ values, poison patterns) are in the INTERNAL list.
| `src/omega_gpu_prefill_attn_api.h` | `OmegaGpuPrefillAttnInfo`, `OmegaGpuPrefillAttnMirrorView`, `omega_gpu_prefill_attn`, `omega_gpu_prefill_attn_release`, `omega_gpu_prefill_attn_dev`, `omega_gpu_prefill_attn_set_warps`, `omega_gpu_prefill_attn_set_fused`, `omega_gpu_prefill_attn_set_kv_mirror`, `omega_gpu_prefill_attn_kv_mirror_view`, `omega_gpu_prefill_attn_kv_mirror_invalidate`, `omega_gpu_prefill_attn_kv_mirror_forget`, `omega_gpu_prefill_attn_kv_mirror_available` | Causal prefill attention for Qwen3-30B-A3B, with an optional KV mirror; one model. |
| `src/omega_gpu_moe_api.h` | `omega_gpu_moe_tensor_upload_bf16`, `omega_gpu_moe_tensor_upload_f32`, `omega_gpu_moe_tensor_free`, `omega_gpu_moe_tensor_shape`, `omega_gpu_matmul_resident_window_f32`, `omega_gpu_matmul_resident_window_bf16`, `omega_gpu_matmul_resident_windows_f32`, `omega_gpu_moe_reserve`, `omega_gpu_moe_prepare`, `omega_gpu_moe_seal`, `omega_gpu_moe_unreserve`, `omega_gpu_moe_cache_clear`, `omega_gpu_moe_set_cta_budget`, `omega_gpu_moe_cta_budget`, `omega_gpu_moe_window_byte_offset` | Column windows over a resident bf16 expert tensor (OWN-30B); tied to the serving pool. |
| `src/omega_gpu_decode_graph.h` | `OmegaGpuDecodeGraphConfig`, `OmegaGpuDecodeGraphStats`, `OmegaGpuDecodeGraphVas`, `omega_gpu_decode_graph_create`, `omega_gpu_decode_graph_free`, `omega_gpu_decode_graph_set_layer`, `omega_gpu_decode_graph_set_final_norm`, `omega_gpu_decode_graph_token`, `omega_gpu_decode_graph_begin_token`, `omega_gpu_decode_graph_record_layer`, `omega_gpu_decode_graph_record_final`, `omega_gpu_decode_graph_end_token`, `omega_gpu_decode_graph_abort_token`, `omega_gpu_decode_graph_record_res`, `omega_gpu_decode_graph_record_swiglu`, `omega_gpu_decode_graph_list`, `omega_gpu_decode_graph_vas`, `omega_gpu_decode_graph_read`, `omega_gpu_decode_graph_set_stamps`, `omega_gpu_decode_graph_set_barrier`, `omega_gpu_decode_graph_barrier`, `omega_gpu_decode_graph_stamps`, `omega_gpu_decode_graph_kind_name`, `omega_gpu_decode_graph_set_flush_each`, `omega_gpu_decode_graph_set_prefetch`, `omega_gpu_decode_graph_prefetch` | One Qwen3-30B-A3B decode token as one command list; scheduling, barrier and prefetch modes are still measured. |
| `src/omega_gpu_prefill.h` | `OmegaPfWeights`, `omega_gpu_pf_rc_name`, `omega_gpu_pf_alloc_dev`, `omega_gpu_pf_alloc_host`, `omega_gpu_pf_free`, `omega_gpu_pf_upload`, `omega_gpu_pf_download`, `omega_gpu_pf_copy_va`, `omega_gpu_pf_stats`, `omega_gpu_pf_stats_reset`, `omega_gpu_pf_weights_upload`, `omega_gpu_pf_weights_free`, `omega_gpu_pf_weights_host_form`, `omega_gpu_pf_gemm_bm`, `omega_gpu_pf_gemm_tiles`, `omega_gpu_pf_gemm`, `omega_gpu_pf_gemm_set_shape`, `omega_gpu_pf_quant`, `omega_gpu_pf_qgemm_bm`, `omega_gpu_pf_qgemm_tiles`, `omega_gpu_pf_qgemm_tiles_va`, `omega_gpu_pf_qgemm`, `omega_gpu_pf_qgemm_set_shape`, `omega_gpu_pf_quant_record`, `omega_gpu_pf_qgemm_record` | Device-resident one-pass prefill for OWN-30B; arguments carry raw device addresses. |
| `src/omega_gpu_prefill.h` | `OmegaPfWeights`, `omega_gpu_pf_rc_name`, `omega_gpu_pf_alloc_dev`, `omega_gpu_pf_alloc_host`, `omega_gpu_pf_free`, `omega_gpu_pf_upload`, `omega_gpu_pf_download`, `omega_gpu_pf_copy_va`, `omega_gpu_pf_stats`, `omega_gpu_pf_stats_reset`, `omega_gpu_pf_weights_upload`, `omega_gpu_pf_weights_free`, `omega_gpu_pf_weights_host_form`, `omega_gpu_pf_gemm_bm`, `omega_gpu_pf_gemm_tiles`, `omega_gpu_pf_gemm`, `omega_gpu_pf_gemm_set_shape`, `omega_gpu_pf_quant`, `omega_gpu_pf_qgemm_bm`, `omega_gpu_pf_qgemm_tiles`, `omega_gpu_pf_qgemm_tiles_va`, `omega_gpu_pf_qgemm`, `omega_gpu_pf_qgemm_set_shape`, `omega_gpu_pf_qgemm_set_group`, `omega_gpu_pf_quant_record`, `omega_gpu_pf_qgemm_record` | Device-resident one-pass prefill for OWN-30B; arguments carry raw device addresses. |
| `src/omega_gpu_pfhost.h` | `omega_gpu_pf_router_rows`, `omega_gpu_pf_router_packed_bytes`, `omega_gpu_pf_router_pack`, `omega_gpu_pf_router_logits`, `omega_gpu_pf_moe_combine`, `omega_gpu_pf_router_set_rows` | Whole-prompt prefill router logits and MoE combine for OWN-30B; arguments carry raw device addresses. |

### 9.8 General matrix multiply (`src/omega_gpu_gemm_ex.h`, added in 0.8.0)
Expand Down
4 changes: 2 additions & 2 deletions docs/runtime/PORTABILITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Porting Omega means answering two questions that are easy to mix up:
2. **Operating system and driver.** Does this file need Linux, the NVIDIA open driver, or a C library?

The table `docs/runtime/portability_table.tsv` answers both, one row per `src/omega_gpu_*`, `src/omega_blackwell_*`,
`src/omega_bw_*` and `src/omega_ampere_*` file (136 rows; the M17/M18 gate suite `omega_blackwell_gates.{c,h}` stays in Omega, which runs it against this library):
`src/omega_bw_*` and `src/omega_ampere_*` file. The table is the current inventory; the M17/M18 gate suite `omega_blackwell_gates.{c,h}` stays in Omega, which runs it against this library:

| Column | Values | Meaning |
|---|---|---|
Expand All @@ -38,7 +38,7 @@ carries (#120, #121) brought (15 `NO_HOSTED_INCLUDE`, 6 `HOSTED_LIBC`). The sync
r2 #972) adds 5 `CHIP_SPECIFIC` rows (`src/omega_bw_hazard.{c,h}`, omega-mv#554; `src/omega_gpu_fp8_slots.{c,h}` and
`src/omega_gpu_fp8_internal.h`, #961) and carries omega's review of the public headers (#954): `omega_gpu_matmul_api.h`,
`omega_gpu_moe_api.h`, `omega_gpu_platform.h`, `omega_gpu_serving.{c,h}` and `omega_gpu_session.h` become `CHIP_SPECIFIC`,
`omega_gpu_scan_ref.c` becomes `PORTABLE` (section 3). Totals now: 120 `CHIP_SPECIFIC`, 11 `PORTABLE`; 13
`omega_gpu_scan_ref.c` becomes `PORTABLE` (section 3). At that sync, the totals were 120 `CHIP_SPECIFIC`, 11 `PORTABLE`; 13
`FREESTANDING_PROVEN`, 98 `NO_HOSTED_INCLUDE`, 17 `HOSTED_LIBC`, 3 `LINUX_DRIVER`. Command to recount: section 7.

`make test-runtime-portability` (host only, no compiler, no GPU) checks the table against the tree: every file has a row,
Expand Down
3 changes: 3 additions & 0 deletions docs/runtime/omega_runtime_api.internal
Original file line number Diff line number Diff line change
Expand Up @@ -199,3 +199,6 @@ const OMEGA_GPU_ATTN_GMUT_TAIL_DIMS # TEST ONLY: general attention mutant ids fo
const OMEGA_GPU_ATTN_GMUT_CAUSAL # TEST ONLY: general attention mutant ids for the sweep
const OMEGA_GPU_ATTN_GMUT_SCALE # TEST ONLY: general attention mutant ids for the sweep
const OMEGA_GPU_ATTN_GMUT_COUNT # TEST ONLY: general attention mutant ids for the sweep

fn omega_gpu_pf_alloc_dev_locked # internal device-private allocation transport; caller already holds session lock
fn omega_gpu_pf_copy_va_locked # internal copy transport and chip-time result; caller already holds session lock
14 changes: 11 additions & 3 deletions docs/runtime/omega_runtime_api.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -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.9.0
abi omega_runtime 0.13.0
header src/omega_runtime_api.h
header src/omega_gpu_platform.h
header src/omega_gpu_session.h
Expand All @@ -31,16 +31,17 @@ header src/omega_gpu_router_api.h
header src/omega_gpu_tern_api.h
header src/omega_gpu_tcgemm_api.h
header src/omega_gpu_prefill_attn_api.h
header src/omega_gpu_attention_mirror.h
header src/omega_gpu_moe_api.h
header src/omega_gpu_decode_graph.h
header src/omega_gpu_prefill.h
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 9
const OMEGA_RUNTIME_API_VERSION_MINOR 13
const OMEGA_RUNTIME_API_VERSION_PATCH 0
const OMEGA_RUNTIME_API_VERSION 9
const OMEGA_RUNTIME_API_VERSION 13
# ---- platform contract (src/omega_gpu_platform.h, ABI 1.2) ----
struct OmegaGpuDeviceHandle 8 4 # STABLE
field OmegaGpuDeviceHandle index 0 4 u32 1
Expand Down Expand Up @@ -953,7 +954,10 @@ 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
fn omega_gpu_pf_qgemm_record fn(*mut OmegaGpuCmdList, u32, u32, u32, u64, u32, u64, u64, u64, u64) -> i32 # EXPERIMENTAL
fn omega_gpu_pf_router_rows fn() -> u32 # EXPERIMENTAL
Expand Down Expand Up @@ -1091,3 +1095,7 @@ 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

fn omega_gpu_prefill_attn256_scoped fn(*mut OmegaGpuDecodeAttn256Cache, u32, u32, u32, *const f32, f32, f32, *mut f32, *mut OmegaGpuPrefillAttn256Info, u32, *mut u64) -> i32 # EXPERIMENTAL
1 change: 1 addition & 0 deletions docs/runtime/portability_table.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ src/omega_bw_em_q.h CHIP_SPECIFIC Private emitters for the FP8 QMMA placeholders
src/omega_bw_hazard.c CHIP_SPECIFIC Static scoreboard hazard checker over encoded sm_121 kernel bytes (RAW, WAR, WAW against the Blackwell write and read barriers); decodes the operand positions the encoder writes. Includes stdlib.h. HOSTED_LIBC
src/omega_bw_hazard.h CHIP_SPECIFIC Interface of the sm_121 scoreboard hazard checker; includes only stddef.h and stdint.h. NO_HOSTED_INCLUDE
src/omega_bw_reconv.h CHIP_SPECIFIC Warp reconvergence regions (BSSY, BSYNC) for the Blackwell IR emitters. NO_HOSTED_INCLUDE
src/omega_gpu_attention_mirror.h CHIP_SPECIFIC Scoped native attention history placement; declares GPU-private cached-copy behavior and includes omega_gpu_prefill_attn256_api.h. NO_HOSTED_INCLUDE
src/omega_gpu_attention_api.c CHIP_SPECIFIC Builds and launches its own sm_121 attention kernels (stall counts as nvcc writes them for sm_121) through the session: the tuned head_dim 64/128 kernels and, since runtime API 0.6.0, the general fallback kernel (head_dim 1..256, any GQA ratio). In the freestanding closure. FREESTANDING_PROVEN
src/omega_gpu_attention_api.h CHIP_SPECIFIC Attention API; its kernel type OmegaBlackwellKernel comes from omega_blackwell_matmul.h. NO_HOSTED_INCLUDE
src/omega_gpu_bf16_gemv_api.c CHIP_SPECIFIC Launches the bf16 GEMV through a command list; uses the Blackwell bf16 generator. NO_HOSTED_INCLUDE
Expand Down
20 changes: 20 additions & 0 deletions mk/attention-mirror.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
CARRIED_HOST_TESTS += test-attention-mirror-policy
.PHONY: test-attention-mirror-policy
$(OUT_DIR)/attention-mirror-policy.so: src/cudapp_om_attn_mirror_plan.c src/cudapp_om_attn_mirror_step.c
@mkdir -p $(OUT_DIR)
$(CC) $(filter-out -MMD -MP,$(CFLAGS)) -shared -fPIC $^ -o $@
test-attention-mirror-policy: $(OUT_DIR)/attention-mirror-policy.so
python3 om/attention-mirror/check.py $(abspath $(OUT_DIR))/attention-mirror-policy.so
ifeq ($(CUDAPP_OMC_HOST),1)
OMEGA_OMC="$(OMEGA_OMC)" OMEGA_BRIDGE="$(OMEGA_BRIDGE)" CC="$(CC)" python3 om/attention-mirror/mutants.py
endif

CARRIED_HOST_TESTS += test-attention-mirror-dispatch
.PHONY: test-attention-mirror-dispatch
ATTN_MIRROR_WRAP = omega_gpu_session_lock omega_gpu_session_unlock omega_gpu_session_open omega_gpu_session_on_close omega_gpu_decode_attn256_cache_view omega_gpu_session_sync_to_gpu omega_gpu_session_sync_to_cpu omega_gpu_session_free omega_gpu_pf_alloc_dev_locked omega_gpu_pf_copy_va_locked omega_gpu_session_launch
$(OUT_DIR)/attention-mirror-dispatch: om/attention-mirror/dispatch-check.c src/omega_gpu_prefill_attn256_api.c $(OUT_DIR)/libomega_gpu.a
$(CC) $(CFLAGS) -o $@ $< $(OUT_DIR)/libomega_gpu.a $(foreach f,$(ATTN_MIRROR_WRAP),-Wl,--wrap=$(f)) -lpthread -lm
test-attention-mirror-dispatch: $(OUT_DIR)/attention-mirror-dispatch
$(abspath $(OUT_DIR))/attention-mirror-dispatch
CC="$(CC)" python3 om/attention-mirror/dispatch-mutants.py $(abspath $(OUT_DIR))/libomega_gpu.a
3 changes: 2 additions & 1 deletion mk/carried-tests.mk
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,6 @@ test-gpu-isolation: $(GPU_ISOLATION_TEST)
# Chip-only binaries: built here so the host suite at least compiles them.
test-carried-bins: $(GPU_DATTN256_MULTI_TEST) $(GPU_GDN_MULTI_TEST) $(GPU_PATTN256_TEST) $(GPU_EXACT_HEAD_TEST)

CARRIED_HOST_TESTS = test-bw-encode-control test-gpu-decode-attn256 test-gpu-gdn test-gpu-q38-graph-host \
# Other fragments may register tests before this file in the wildcard include order.
CARRIED_HOST_TESTS += test-bw-encode-control test-gpu-decode-attn256 test-gpu-gdn test-gpu-q38-graph-host \
test-gpu-streams test-gpu-isolation test-carried-bins
57 changes: 57 additions & 0 deletions mk/prefill-shape.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
CARRIED_HOST_TESTS += test-prefill-shape
.PHONY: test-prefill-shape
$(OUT_DIR)/prefill-shape.so: src/cudapp_om_prefill_shape.c
@mkdir -p $(OUT_DIR)
$(CC) $(filter-out -MMD -MP,$(CFLAGS)) -shared -fPIC $< -o $@
$(OUT_DIR)/prefill-cache-check: om/prefill-shape/cache-check.c $(OUT_DIR)/libomega_gpu.a
$(CC) $(CFLAGS) -o $@ $< $(OUT_DIR)/libomega_gpu.a -Wl,--wrap=omega_gpu_session_alloc_code -lpthread -lm
test-prefill-shape: $(OUT_DIR)/prefill-shape.so $(OUT_DIR)/gpu_qgemm_test $(OUT_DIR)/prefill-cache-check
$(abspath $(OUT_DIR))/prefill-cache-check
python3 om/prefill-shape/check.py $(abspath $(OUT_DIR))/prefill-shape.so
$(abspath $(OUT_DIR))/gpu_qgemm_test --host-only
$(abspath $(OUT_DIR))/gpu_qgemm_test --sim
ifeq ($(CUDAPP_OMC_HOST),1)
OMEGA_OMC="$(OMEGA_OMC)" OMEGA_BRIDGE="$(OMEGA_BRIDGE)" CC="$(CC)" python3 om/prefill-shape/mutants.py
endif

CARRIED_HOST_TESTS += test-prefill-order
.PHONY: test-prefill-order
$(OUT_DIR)/prefill-order.so: src/cudapp_om_prefill_order.c
@mkdir -p $(OUT_DIR)
$(CC) $(filter-out -MMD -MP,$(CFLAGS)) -shared -fPIC $< -o $@
test-prefill-order: $(OUT_DIR)/prefill-order.so $(OUT_DIR)/gpu_qgemm_test
python3 om/prefill-shape/order-check.py $(abspath $(OUT_DIR))/prefill-order.so
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
13 changes: 13 additions & 0 deletions mk/q38-head.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# Host-only verification. The --chip switch is never passed by make test.
.PHONY: test-q38-head-bounds
ifeq ($(CUDAPP_OMC_HOST),1)
CARRIED_HOST_TESTS += test-q38-head-bounds
test-q38-head-bounds: $(OUT_DIR)/libomega_gpu.a
OMEGA_OMC="$(OMEGA_OMC)" Q38_GPU_OUT="$(abspath $(OUT_DIR))/q38-head" \
Q38_GPU_LIB="$(OUT_DIR)/libomega_gpu.a" CC="$(CC)" sh om/q38-head/run.sh
else
test-q38-head-bounds:
@echo "test-q38-head-bounds: NOT_RUN (requires a runnable pinned AArch64 omc)"
@exit 2
endif
14 changes: 14 additions & 0 deletions mk/seal-reuse.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
CARRIED_HOST_TESTS += test-seal-reuse
# Integer-only generated Omega unit. Use distinct OUT_DIRs when comparing settings.
CUDAPP_SEAL_OPT ?= -O3
$(OUT_DIR)/cudapp_om_closure_reseal.o: private CFLAGS += $(CUDAPP_SEAL_OPT)
.PHONY: test-seal-reuse
$(OUT_DIR)/seal-reuse.so: src/cudapp_om_closure_reseal.c
@mkdir -p $(OUT_DIR)
$(CC) $(filter-out -MMD -MP,$(CFLAGS)) $(CUDAPP_SEAL_OPT) -shared -fPIC $< -o $@
test-seal-reuse: $(OUT_DIR)/seal-reuse.so
python3 om/pipeline/seal-reuse-check.py $(abspath $(OUT_DIR))/seal-reuse.so
ifeq ($(CUDAPP_OMC_HOST),1)
OMEGA_OMC="$(OMEGA_OMC)" OMEGA_BRIDGE="$(OMEGA_BRIDGE)" CC="$(CC)" CUDAPP_SEAL_OPT="$(CUDAPP_SEAL_OPT)" python3 om/pipeline/seal-reuse-mutants.py
endif
Loading
Loading