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

branch main Branches Tags History

CUDApp / evidence / api-views-rest-2026-11-06 / REPORT.md

147 lines · 9677 bytes Raw Blame History Rendered
1# API views rest — WIP receipt, 2026-11-06
2
3This is an implementation checkpoint, not a completed migration or behavior qualification. Pending omega-bridge#71/#73. The source pin is omega-mv e5b32567 and omc SHA-256 2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f. The private bridge checkout is #73 at 79e8c3613a6f.
4
5## Exercised checks
6
7All compilation checks below used the assigned device-isolation prefix:
8`bwrap --dev-bind / / --dev /dev --proc /proc -- taskset -c 10-14 nice -n 10`.
9
10| Command | rc | Final line / observation |
11|---|---:|---|
12| `env OMEGA_OMC=~/work/cudastack/omega-mv/seed/out/omc OMEGA_SEED=~/work/cudastack/omega-bridge/build/bootstrap/omc OMEGA_BRIDGE=~/work/cudastack/lanes/ApiViewsRestBridge sh om/units.sh` | 0 | wrote checked portable Omega units to the worktree src directory |
13| Same environment, isolated `sh om/units.sh --check` | 0 | `PASS portable Omega units regenerate byte for byte` |
14| Isolated `gcc -std=gnu11 -Wall -Wextra -Werror -D_GNU_SOURCE -O2 -ffp-contract=off -Isrc -fsyntax-only` followed by all ten assigned C paths | 0 | no output |
15| Same syntax command with `-DCUDAPP_MIGRATION_PENDING_API_VIEWS_REST=1` | 0 after repair | no output; initial run found unused `x_rows`, then the oracle-only explicit unused cast repaired it |
16
17The exact ten paths are listed in RESUME.md. Syntax success is not link success or behavior evidence.
18
19## Separate `part` rename
20
21Commit f138336 renames the forbidden local `part` to `pp` in `om/api/apish_shp.om`. The generated C bytes did not change. At that commit, isolated serial API-shell checks returned:
22
23| Command | rc | Final line |
24|---|---:|---|
25| `make test-api-shells-diff` | 0 | `PASS api-shells checks=753157` |
26| `make test-api-shells-mutants` | 0 | `PASS mutants killed=8` |
27
28An initial parallel invocation raced on the shared output filename and failed the differential. The mutant runner now gives each invocation a private temporary OUT path. The serial checks above were run after that repair. These checks have NOT been rerun against the final host-shell edits; do not treat them as final-branch behavior evidence.
29
30## Tier verdicts
31
32- IMPLEMENTED: registered runtime-extent transport, packing, reduction, cache, slot, tensor-core and FP8 host units; substantial default-Omega C cutovers.
33- EXERCISED: source compilation and generated-unit reproducibility only, plus the isolated rename checks above.
34- Final host differential, source partitions, red check, coverage and this slice's mutant suite: NOT_RUN.
35- Host/simulator family targets on final branch: NOT_RUN.
36- Chip, live-RM, VFIO: NOT_RUN.
37- QUALIFIED, MERGED, DEPLOYED: no.
38
39## Required benchmark table
40
41No benchmark samples were collected. Do not infer a speedup from the implementation.
42
43| Moved loop group | C samples | Omega samples | Wolfram median of three | Ratio |
44|---|---|---|---|---|
45| FP8 oracle row accumulator and magnitude | NOT_RUN | NOT_RUN | NOT_RUN | NOT_RUN |
46| FP8/Tensor-core permutation and row gather | NOT_RUN | NOT_RUN | NOT_RUN | NOT_RUN |
47| Tern packing, prefill copy/ratios, slot transitions, descriptor/argument fills | NOT_RUN | NOT_RUN | NOT_RUN | NOT_RUN |
48
49The FP8 host reference uses two passes: accumulator and magnitude are each f64, so both cannot be packed into a uint64 result. Main approved two passes and prohibited a seven-slot extension. Measure the duplicated product work under the required isolation and compute all medians and ratios through Wolfram before completing this PR.
50
51## Completed continuation — ApiViewsRest2, 2026-11-06
52
53This section supersedes the WIP verdicts above; their historical receipts are
54unchanged. Implementation base: `c1d68bb9854c3bc995a111f2cd7a366eb15da265`.
55Source/compiler pin: omega-mv `e5b32567a7aff3ce594e3254a622a846a6cd190b`;
56compiler SHA-256 as above. Converter: `/tmp/bridge-73-apiviews` at
57`79e8c3613a6f6f9e8eaaa9c013fc25bcb39e0538`.
58Canonical providers were adopted unchanged from CheckersRest2 `343a061`:
59`cg_pack_len/cg_pklen`, `cg_pack_h/cg_pkh`, `cg_mrow/mrow`.
60No duplicate provider implementation was introduced.
61
62### Implemented
63
64- MoE cache scans, pinned-victim selection, upload chunk/window/row iteration,
65 canonical fragment packing, row compaction and launch/reservation arithmetic.
66- Remaining prefill GEMM and host descriptor/allocation/launch arithmetic.
67- Standalone linkage includes every API-rest unit and the three providers;
68 the original API-shell standalone runner now links slot, idle and pad.
69- Fixed checked narrowing of packed pointer/statistic halves, SWIGLU source
70 argument order, four-segment endpoint/scale view sizes and slot pin wrap.
71 The slot boundary mutant reproduces the missing-wrap failure.
72- The retained C configuration now builds with strict unused-function warnings;
73 its unused default-only FP8 GEMM argument writer is correctly guarded.
74
75### Final exercised commands
76
77Every command below used
78`bwrap --dev-bind / / --dev /dev --proc /proc -- taskset -c 10-14 nice -n 10`.
79Builds used at most `-j3`; no full `make test` or GPU path was run.
80Environment: `OMEGA_OMC=~/work/cudastack/omega-mv/seed/out/omc`,
81`OMEGA_SEED=~/work/cudastack/omega-bridge/build/bootstrap/omc`,
82`OMEGA_BRIDGE=/tmp/bridge-73-apiviews`; family runner additionally uses
83`OMEGA_ROOT=~/work/cudastack/omega-mv`.
84Receipts are in `continuation/`; absolute home paths in those new receipts
85were normalized to `~`. Earlier failed/intermediate receipts are retained;
86the filenames below identify the final results.
87
88| Command | rc | Final result | Receipt |
89|---|---:|---|---|
90| `make -j3 build/libomega_gpu.a` and family runner relink | 0 | default library and family executables linked | `default-link.txt`, `families-final.txt` |
91| `make -j3 OUT_DIR=build/api-rest-c-oracle CUDAPP_ENCODER=c 'CC=cc -DCUDAPP_MIGRATION_PENDING_API_VIEWS_REST=1' build/api-rest-c-oracle/libomega_gpu.a` | 0 | C-oracle configuration archive created | `c-oracle-link.txt` |
92| `python3 tests/api_rest_mutants.py` | 0 | baseline `PASS api-rest checks=1204450 red=low-half-corruption`; `PASS api-rest mutants killed=7` | `mutants-final.txt` |
93| `sh tests/api_rest_families.sh` | 0 | `PASS api-rest family host/sim; chip NOT_RUN` | `families-final.txt` |
94| `OUT=build/api-rest-coverage-complete REST_CFLAGS='--coverage -O0' sh tests/api_rest_run.sh` | 0 | `PASS api-rest checks=1204450 red=low-half-corruption` | `oracle-coverage-run.txt` |
95| `gcov -b -c -n build/api-rest-coverage-complete/api_rest_diff.gcno` | 0 | `Lines executed:99.06% of 320` | `oracle-coverage-final.txt` |
96| `bash tests/api_shells_run.sh` | 0 | `PASS api-shells checks=753157` | `standalone-link.txt` |
97| `sh om/units.sh --check` | 0 | `PASS portable Omega units regenerate byte for byte` | `units-check.txt` |
98| `cc -std=gnu11 -O2 -ffp-contract=off -Wall -Wextra -Werror -Isrc tests/api_rest_bench.c build/libomega_gpu.a -lm -lpthread -o build/api-rest-bench` | 0 | linked, no diagnostics | `benchmark-build.txt` |
99| `build/api-rest-bench` | 0 | final eight-group samples recorded | `benchmark-final.txt`, `benchmark-samples.csv` |
100
101Own partitions cover the migrated functions independently of the old shell
102suite: source-loop expected values, view refusals, pointer-half and byte-offset
103boundaries, tile/chunk thresholds at v-1/v/v+1, 0 and UINT32_MAX.
104The seven killed source mutants are pointer low-half truncation, invalid cache
105admission, pinned-victim selection, upload byte count, both SWIGLU argument
106orders and slot pin wrap. Both own test translation units have 100% executed
107source lines and branches; branch outcomes taken are 66.33% and 67.21%.
108The retained scalar-oracle header has 96.84% executed lines and 93.24% executed
109branches; this is not a claim of exhaustive branch-outcome coverage.
110
111Family host/sim PASS: tensor-core GEMM, FP8 GEMM, prefill GEMM, prefill host,
112tgemm, tern and FP8 API. Tern host/sim: 56/34 checks; FP8 API: 4997/214
113checks; slots host: 24 checks; MoE window host: 23 checks. The MoE-window
114test has no simulator mode; its changed iteration/arithmetic paths are
115exercised by the own differential, not claimed as device execution.
116The external tern algebra test must use CUDApp's current simulator, as the
117family runner does; its stale quoted simulator otherwise gives false
118row-major failures, independently reproduced with the retained C oracle.
119
120### Measured host benchmark
121
122Each value is the median elapsed ns for 1000 iterations, from three samples.
123Wolfram query and exact result: `continuation/benchmark-final-wolfram.txt`.
124These checked portable Omega bindings are slower, not a speedup.
125
126| Moved work | C median ns | Omega median ns | Omega/C |
127|---|---:|---:|---:|
128| A fragment packing | 1073351 | 147642147 | 137.55253128 |
129| Row compaction | 17920 | 2617584 | 146.07053571 |
130| Launch descriptor | 3728 | 179121 | 48.04747854 |
131| FP8 sum and magnitude | 327474 | 18127103 | 55.35432737 |
132| FP8/TC permutation and gather | 947302 | 56150134 | 59.27374164 |
133| Tern packing | 206081 | 12183818 | 59.12150077 |
134| Slot pin transition | 4416 | 239298 | 54.18885870 |
135| Prefill copy and ratios | 1073111 | 905787055 | 844.07582720 |
136
137FP8 Omega sum and magnitude retain the mandated separate f64 passes.
138There is no chip timing or hardware-performance inference.
139
140### Final tiers
141
142- IMPLEMENTED: API-rest completion and the repairs above.
143- EXERCISED: host linking, source differential/red controls, seven killed
144 mutants, available family host/simulator gates, coverage and regeneration PASS.
145- QUALIFIED: host behavior only as scoped above; hardware qualification NOT_RUN.
146- Chip, live-RM, VFIO: NOT_RUN. No service, GPU, driver or boot state changed.
147- MERGED, DEPLOYED: no. PR remains draft.