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
GitHub aien-dev/CUDApp#163 (code only)
Apply it
git checkout -b patch-42d5c8b87885b294 5789a4326ed8df98fc997eebc91d35dba6af529e curl -fsSL https://interplane.io/drakestapleton/CUDApp/patches/42d5c8b87885b294.patch | git am
Provenance
github-import 1
aien-dev/CUDApp
163
e2fafb11f8e843a9d6cdbe8f0886beaec7445310
{"kind":"github-import","owner":"aien-dev","repo":"CUDApp","number":163,"url":"https://github.com/aien-dev/CUDApp/pull/163","export_sha256":"967c79e26a893657b5cdaa45efd442be5dbd2ecfe68e25f9a8c1b5da4d60d452","imported_utc":"2026-11-18T16:38:50Z","metadata":"unavailable","state_derived":true}
Changes
diff --git a/docs/pipeline/.crumb b/docs/pipeline/.crumb index f28960db..6eaaa703 100644 --- a/docs/pipeline/.crumb +++ b/docs/pipeline/.crumb @@ -3,14 +3,14 @@ "generated": { "children": [], "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-28T12:10:24Z", + "compiled_at": "2026-10-28T14:58:15Z", "compiler": "crumb-compile/1", - "digest": "sha256:bab98d64a74ae2178cc078a12da6cda0760d8d45f851f79b500becab3e83006f", + "digest": "sha256:8ea24eca697950083060f50cdb30d616e53e529faa4e8e3ca05a4c8cf13405d3", "evidence_files": 0, "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "files": 1, - "generated_at_commit": "cee9a54d16ebe981a879d06bad6c988fc2417bc7", - "source_tree": "sha256:a0ca2902c3ab2641c6b9273d96c43027ecbcbf95b0bbaac10c00452764c42be6" + "generated_at_commit": "31fbb1bb2aa79c5cb63e5b947b97335442563c8a", + "source_tree": "sha256:19c8be20ff6b8aae3b4dbf46eadbd1256def848534f89792c436127e7b48646d" }, "owner_lane": "PipelineSelect", "seed": { diff --git a/docs/pipeline/CONTRACT.md b/docs/pipeline/CONTRACT.md index f1b86999..5755ad02 100644 --- a/docs/pipeline/CONTRACT.md +++ b/docs/pipeline/CONTRACT.md @@ -132,12 +132,14 @@ owner resolves `selected_real` from the exact chosen artifact, not a shape lookup. It must also check `compose_launch` and actual code/templates through the existing artifact loader; matching stored digests alone does not check blobs. -Current Composer v1 admits native direct1 and row-pipelined2 only. The policy's -family3 staged GEMM is exercised with clearly synthetic records, but canonical -staged consumption explicitly refuses. This is an unsupported native composition -gate, not a measured performance result. Unknown families/features remain refused. - -Main confirmed there is currently no graph-owned qualification resolver or +The frozen Composer schema `2e93f998b70852abcd425f8865d842a05dad76ea` +used by these host receipts admits native direct1 and row-pipelined2 only. +These receipts exercise family3 policy with synthetic records and explicit +canonical staged refusal. Newer Composer #166 adds structural family3 support; +it does not confer candidate qualification or device/full-model evidence. +Unknown families/features remain refused. + +At the baseline, Main confirmed no graph-owned qualification resolver or selected-artifact recording ABI. Required integration seams are `src/omega_gpu_q36_graph.c:rec_fp8` (existing grouped GEMV recording), `rec_gemm` (existing FP8 GEMM recording), and `pf_record_experts` (routed/shared @@ -208,3 +210,32 @@ Independent symbolic synthetic cost oracle, through the mounted parent proxy: These costs are explicit synthetic policy controls, not observed nanoseconds, speedups, GB10 measurements or serving evidence. +## Private graph context lookup + +`om/pipeline/context.om` exports +`native_context(keys view ulong128, count ulong, actual view ulong4) -> long` +for the existing ABI1 bridge. Up to thirty-two active private graph-owned tuples +have stride4: `{operation kind, layer index, window start, window rows}`. +Return is the unique 1-based ordinal,0 absent,-1 for count above32 or multiple +matches. Count0 is a normal absent binding. Unused cells are ignored; no portable +serialization, padding convention or artifact schema is introduced. + +Each selected ordinal identifies its own immutable existing query, rows, wanted +canonical record, candidates and prepared artifacts under the existing session +lock. This lookup must never derive a new wanted/query from the selected code. +The graph actual execution tuple supplies the lookup key; candidate/tensor +lifetimes remain owned by the graph. Unknown operation kinds may match raw +registered tuples here; support and exact MNK/launch are independently refused +by the existing binding validator. Matching a tuple never authenticates a +qualification, joint MoE closure, router/permutation/combine semantics, or a +production registration. With no accepted receipt-authority construction path, +production context count remains0. + +`tests/pipeline/context.om` exercises count32/33, every ordinal including31/32, +empty/invalid counts, every tuple field, late excluded entries, a duplicate at +the final active slot and unrelated duplicate isolation. Current focused +controls and compiled old-cap/tuple/duplicate/count-guard mutants are recorded +in `tests/pipeline/context32-evidence.json`. The original sixteen-context +`context-evidence.json` remains historical, unchanged. Compile the test after +only the exact context unit; it has no Quant/Composer/Cache dependency. This +bounded private arena does not promise a model-wide context organization. diff --git a/om/pipeline/.crumb b/om/pipeline/.crumb index 1c963b4a..5438ade6 100644 --- a/om/pipeline/.crumb +++ b/om/pipeline/.crumb @@ -3,14 +3,14 @@ "generated": { "children": [], "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-28T12:02:22Z", + "compiled_at": "2026-10-28T14:58:15Z", "compiler": "crumb-compile/1", - "digest": "sha256:dd9ee8e9912709fa6d3e2bf49d41b072a07e73f0554d1e7122703fce9bd7aa16", + "digest": "sha256:5c5054381987f2fcdc3689e72fd690103a95e9e81b61a448d3fb1fe216e55441", "evidence_files": 0, "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 4, - "generated_at_commit": "b759afc3f5e46f152ffb06b39882ffa28cacaf96", - "source_tree": "sha256:634aeb5867ecf16001d0146341f7a4a07268b554d256aa6c765460357ccc44e4" + "files": 5, + "generated_at_commit": "31fbb1bb2aa79c5cb63e5b947b97335442563c8a", + "source_tree": "sha256:381267db3539c59f68be1ec9db1433cdc8219b45f93b33e6d6b17b09cae727fd" }, "owner_lane": "PipelineSelect", "seed": { diff --git a/om/pipeline/context.om b/om/pipeline/context.om new file mode 100644 index 00000000..b272d8be --- /dev/null +++ b/om/pipeline/context.om @@ -0,0 +1,28 @@ +note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +note Private graph-owned context tuple lookup, not a qualification or artifact schema. +note Tuple4 is operation kind, layer index, window start, window rows. +note keys capacity128; up to32 active tuples stride4. Unused cells ignored. +fn pc_same keys view ulong 128 off ulong actual view ulong 4 to bool +for j ulong 4 +if ne get keys add off j get actual j +ret false +end +end +ret true +end +note Return unique 1-based context ordinal,0 absent,-1 invalid count/duplicate match. +fn native_context keys view ulong 128 count ulong actual view ulong 4 to long +if gt count 32 +ret -1 +end +hit = long 0 +for i ulong count +if pc_same keys mul i 4 actual +if ne hit 0 +ret -1 +end +hit = long add i 1 +end +end +ret hit +end diff --git a/tests/pipeline/.crumb b/tests/pipeline/.crumb index fc1b698d..ab6616ac 100644 --- a/tests/pipeline/.crumb +++ b/tests/pipeline/.crumb @@ -3,14 +3,14 @@ "generated": { "children": [], "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-28T12:10:24Z", + "compiled_at": "2026-10-28T14:58:15Z", "compiler": "crumb-compile/1", - "digest": "sha256:5d175622e059a9a4fff942dc1fb5c95f4b3ae547be42752c258bda690ce99b5b", + "digest": "sha256:197e9444ad4ac910b050d5da31a99b37c8fd6dab3b23a5474e765331433adfaa", "evidence_files": 0, "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 7, - "generated_at_commit": "cee9a54d16ebe981a879d06bad6c988fc2417bc7", - "source_tree": "sha256:b40e06e8b649c5f79276ab8ac80eb6770d6d1297e091d3c055f8b47a56e2618e" + "files": 10, + "generated_at_commit": "31fbb1bb2aa79c5cb63e5b947b97335442563c8a", + "source_tree": "sha256:7162d331237d47dea14c66134b27b33d5aa895fd341e776ed629bd11b8111ba2" }, "owner_lane": "PipelineSelect", "seed": { diff --git a/tests/pipeline/context-evidence.json b/tests/pipeline/context-evidence.json new file mode 100644 index 00000000..99f3f9c5 --- /dev/null +++ b/tests/pipeline/context-evidence.json @@ -0,0 +1,118 @@ +{ + "schema": "pipeline57-private-context-controls/1", + "recorded_at": "2026-10-28T13:25:15.304876+00:00", + "status": "EXERCISED_HOST_ONLY", + "contract": "native_context(keys view ulong128,count ulong,actual view ulong4)->long; exact opaque4word tuples; unique1based ordinal,0absent,-1invalidcount or duplicate match; count<=16; unusedcellsignored", + "source_sha256": "9e214860e456b03ea87780b8eeb5589eb28ab6764b0fa6e9d70edf4d8e3b0bae", + "test_sha256": "3c177e6add02233138097ad514e5739cab690e1ed93ffbc211743896f7840f5d", + "compiler_input_sha256": "16975b2744176478c3a83d485f104760e028850aa522ea8aac5f763a11b3e8cf", + "compile_tool": "mcp__omega_compile", + "compile": { + "ok": true, + "binary_bytes": 2068, + "sha256": "e8fe3158381f6a9a6413bfd3e2604b4aa83bc6c68dd9b2345ce63a88d18bd20d", + "compiler_sha256": "2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f", + "isolation": "bwrap+prlimit: no network, no host files, cleared environment, cpu/as/fsize/nproc limits, server wall clock" + }, + "run_tool": "mcp__omega_run", + "run": { + "compile": { + "ok": true, + "binary_bytes": 2068, + "sha256": "e8fe3158381f6a9a6413bfd3e2604b4aa83bc6c68dd9b2345ce63a88d18bd20d", + "compiler_sha256": "2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f" + }, + "exit": { + "kind": "normal", + "code": 0 + }, + "stdout": "", + "stdout_bytes": 0, + "stdout_truncated": false, + "stderr": "", + "stderr_bytes": 0, + "stderr_truncated": false, + "limits": { + "timeout_ms": 5000, + "cpu_seconds": 10, + "address_space_bytes": 268435456, + "file_size_bytes": 1048576, + "processes": 5 + }, + "isolation": "bwrap+prlimit: no network, no host files, cleared environment, cpu/as/fsize/nproc limits, server wall clock" + }, + "guard_mutants": [ + { + "name": "ignore-window-rows", + "replace": "for j ulong 4\n", + "with_source": "for j ulong 3\n", + "source_sha256": "1e4e207ab1009f4c74840f31e775f3e64c6cbfb5da14b9a04f1eac1b6b89d64e", + "result": { + "compile": { + "ok": true, + "binary_bytes": 2068, + "sha256": "0fa2465ce7ec2799de41b5e1688f604a69d98bed8aae35c92226265d6bf72bab", + "compiler_sha256": "2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f" + }, + "exit": { + "kind": "normal", + "code": 7 + }, + "stdout": "", + "stdout_bytes": 0, + "stdout_truncated": false, + "stderr": "", + "stderr_bytes": 0, + "stderr_truncated": false, + "limits": { + "timeout_ms": 5000, + "cpu_seconds": 10, + "address_space_bytes": 268435456, + "file_size_bytes": 1048576, + "processes": 5 + }, + "isolation": "bwrap+prlimit: no network, no host files, cleared environment, cpu/as/fsize/nproc limits, server wall clock" + } + }, + { + "name": "ignore-duplicate-match", + "replace": "if ne hit 0\n", + "with_source": "if eq ulong 0 1\n", + "source_sha256": "e502b54ad07d84d275daca2c68436654a80367155e095397f37e16e4d24f269d", + "result": { + "compile": { + "ok": true, + "binary_bytes": 2072, + "sha256": "1806f5e3293f3de510c4e81f2b812a89dd3f447b24d2023ab881dbde8d9d8e3c", + "compiler_sha256": "2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f" + }, + "exit": { + "kind": "normal", + "code": 8 + }, + "stdout": "", + "stdout_bytes": 0, + "stdout_truncated": false, + "stderr": "", + "stderr_bytes": 0, + "stderr_truncated": false, + "limits": { + "timeout_ms": 5000, + "cpu_seconds": 10, + "address_space_bytes": 268435456, + "file_size_bytes": 1048576, + "processes": 5 + }, + "isolation": "bwrap+prlimit: no network, no host files, cleared environment, cpu/as/fsize/nproc limits, server wall clock" + } + } + ], + "golden_controls": "Literal integer bookkeeping expectations in independent native caller:16 unique registered ordinals; empty/absent0; count17/maxulong invalid; duplicate selected tuple-1; otherfield changes absent; unrelated duplicate does not affect distinct exact hit. No statistical or performance computation.", + "not_run": [ + "graph registration/bridge binding (shared integration owner)", + "joint MoE semantic closure qualification", + "physical GPU execution", + "whole-model correctness/quality/performance", + "production registration" + ] +} diff --git a/tests/pipeline/context.om b/tests/pipeline/context.om new file mode 100644 index 00000000..308e43d9 --- /dev/null +++ b/tests/pipeline/context.om @@ -0,0 +1,77 @@ +note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +note Synthetic private graph contexts; no evaluator or hardware qualification. +fn main to int +keys = new ulong 128 0 +actual = new ulong 4 0 +if ne native_context keys 0 actual 0 +ret 1 +end +put actual 0 99 +if ne native_context keys 33 actual -1 +ret 2 +end +if ne native_context keys 18446744073709551615 actual -1 +ret 3 +end +put actual 0 1 +put actual 1 3 +put actual 3 8 +for i ulong 32 +put keys mul i 4 1 +put keys add mul i 4 1 3 +put keys add mul i 4 2 i +put keys add mul i 4 3 8 +end +for i ulong 32 +put actual 2 i +if ne native_context keys 32 actual long add i 1 +ret 4 +end +end +note No active context, or an excluded late context, is not a default binding. +put actual 2 31 +if ne native_context keys 0 actual 0 +ret 5 +end +if ne native_context keys 31 actual 0 +ret 6 +end +note Every tuple field participates: operation,layer,window start,window rows. +put actual 2 0 +for j ulong 4 +old = get actual j +put actual j 123 +if ne native_context keys 32 actual 0 +ret 7 +end +put actual j old +end +note Duplicate matches refuse rather than silently choosing first or last. +for j ulong 4 +put keys add 124 j get keys j +end +if ne native_context keys 32 actual -1 +ret 8 +end +note Unrelated duplicate registrations cannot change a different exact context. +put actual 2 2 +if ne native_context keys 32 actual 3 +ret 9 +end +put actual 2 123 +if ne native_context keys 32 actual 0 +ret 10 +end +note Context ordinals intentionally track immutable registry order, not a tuner. +put actual 2 0 +if ne native_context keys 1 actual 1 +ret 11 +end +note Raw tuple lookup does not claim an operation kind is supported or qualified. +put keys 0 0 +put actual 0 0 +if ne native_context keys 1 actual 1 +ret 12 +end +ret 0 +end diff --git a/tests/pipeline/context32-evidence.json b/tests/pipeline/context32-evidence.json new file mode 100644 index 00000000..99ef89be --- /dev/null +++ b/tests/pipeline/context32-evidence.json @@ -0,0 +1,185 @@ +{ + "schema": "pipeline-context32-host-v1", + "recorded_at": "2026-10-28T14:58:07.285579+00:00", + "status": "EXERCISED_HOST_ONLY", + "contract": "native_context(keys view ulong128,count ulong,actual view ulong4)->long; exact opaque4word tuples; unique1based ordinal1..32;0absent;-1count>32 or duplicate match; count0normal absent; unusedcellsignored", + "reason": "Actual graph caller needs more than16 private tuples; use the full preexisting keys128 stride4 capacity without a new wire schema.", + "source_identities": { + "om/pipeline/context.om": "fd1e4c192a21f9a2c54aa90c3d4f4831d2cdf31ad7d9bbb2d2d70b849c559535", + "tests/pipeline/context.om": "162cc2eac6af3a6434a2ea88e22b7cd9d46b79368f722496c2c77a7864c58113", + "docs/pipeline/CONTRACT.md": "ff65c7e5250679b015d9cdae81ec4da568b19cb0b964a2951a093e05c9639003" + }, + "compiler_input_sha256": "4b33d83d1d3f998ae9167ddaf80881795805368e07eed7f501099025f6bbdfe8", + "oracle": "Independent explicit registry-index expectations in the focused Omega fixture, not performance or qualification. All32 tuple lookups, including ordinals31/32, are checked against their inserted identities; count33 refuses before access. No numeric model or hardware assertion.", + "controls": [ + "count0 absent", + "count32 returns all32 unique ordinals", + "count33 and maximum unsigned count refuse", + "count31 excludes final tuple", + "all4tuple fields participate", + "finalslot duplicate refuses", + "unrelated duplicate and absent context do not select", + "registry order is opaque identity, not tuning", + "raw operationkind matching is not qualification" + ], + "tools_used": [ + "mcp__omega_run (compile plus sandbox execute)" + ], + "runs": { + "control": { + "compile": { + "ok": true, + "binary_bytes": 2080, + "sha256": "e39544096927c285a291cb2e04725608da35a5457af1128a2fbec15c26a03e42", + "compiler_sha256": "2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f" + }, + "exit": { + "kind": "normal", + "code": 0 + }, + "stdout": "", + "stdout_bytes": 0, + "stdout_truncated": false, + "stderr": "", + "stderr_bytes": 0, + "stderr_truncated": false, + "limits": { + "timeout_ms": 5000, + "cpu_seconds": 10, + "address_space_bytes": 268435456, + "file_size_bytes": 1048576, + "processes": 5 + }, + "isolation": "bwrap+prlimit: no network, no host files, cleared environment, cpu/as/fsize/nproc limits, server wall clock" + }, + "old_cap16": { + "compile": { + "ok": true, + "binary_bytes": 2080, + "sha256": "be7d497ea90f71bfef456880706d03b4044ea2c5c8935ce80b150376d9d05bc8", + "compiler_sha256": "2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f" + }, + "exit": { + "kind": "normal", + "code": 4 + }, + "stdout": "", + "stdout_bytes": 0, + "stdout_truncated": false, + "stderr": "", + "stderr_bytes": 0, + "stderr_truncated": false, + "limits": { + "timeout_ms": 5000, + "cpu_seconds": 10, + "address_space_bytes": 268435456, + "file_size_bytes": 1048576, + "processes": 5 + }, + "isolation": "bwrap+prlimit: no network, no host files, cleared environment, cpu/as/fsize/nproc limits, server wall clock" + }, + "ignore_window_rows": { + "compile": { + "ok": true, + "binary_bytes": 2080, + "sha256": "b0bb3bfe65bab8a9076631b9506c90ac0ad54047551960bec1f9df921ed329c1", + "compiler_sha256": "2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f" + }, + "exit": { + "kind": "normal", + "code": 7 + }, + "stdout": "", + "stdout_bytes": 0, + "stdout_truncated": false, + "stderr": "", + "stderr_bytes": 0, + "stderr_truncated": false, + "limits": { + "timeout_ms": 5000, + "cpu_seconds": 10, + "address_space_bytes": 268435456, + "file_size_bytes": 1048576, + "processes": 5 + }, + "isolation": "bwrap+prlimit: no network, no host files, cleared environment, cpu/as/fsize/nproc limits, server wall clock" + }, + "ignore_duplicate_match": { + "compile": { + "ok": true, + "binary_bytes": 2064, + "sha256": "e6962759572d9f3e64eb4a5ed03c971f43829dc1f0f8dcba33e64b152d3eee18", + "compiler_sha256": "2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f" + }, + "exit": { + "kind": "normal", + "code": 8 + }, + "stdout": "", + "stdout_bytes": 0, + "stdout_truncated": false, + "stderr": "", + "stderr_bytes": 0, + "stderr_truncated": false, + "limits": { + "timeout_ms": 5000, + "cpu_seconds": 10, + "address_space_bytes": 268435456, + "file_size_bytes": 1048576, + "processes": 5 + }, + "isolation": "bwrap+prlimit: no network, no host files, cleared environment, cpu/as/fsize/nproc limits, server wall clock" + }, + "remove_count_guard": { + "compile": { + "ok": true, + "binary_bytes": 2064, + "sha256": "2f2151c2aeb358a1bff72aefc0fb936e2c51ed9a7ff4241f9e71eea84cabb111", + "compiler_sha256": "2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f" + }, + "exit": { + "kind": "trap", + "trap": 3, + "exit_code": 103, + "meaning": "index or slice out of bounds", + "note": "an explicit exit status 101..114 looks the same as this trap" + }, + "stdout": "", + "stdout_bytes": 0, + "stdout_truncated": false, + "stderr": "", + "stderr_bytes": 0, + "stderr_truncated": false, + "limits": { + "timeout_ms": 5000, + "cpu_seconds": 10, + "address_space_bytes": 268435456, + "file_size_bytes": 1048576, + "processes": 5 + }, + "isolation": "bwrap+prlimit: no network, no host files, cleared environment, cpu/as/fsize/nproc limits, server wall clock" + } + }, + "mutant_input_sha256": { + "old_cap16": "82d3e16105e03ee6a8666ab4b6442ae7e1f995d7245a1415e9d7e196c3c710c4", + "ignore_window_rows": "67c432baf4607d90cf67bd9bcf56444cdaf2724204bd3fcee14a4b1e727a4fad", + "ignore_duplicate_match": "bbed42ea199b695a17bf4c8a99b65d48f1ddee498515e1d5ec7a9b6eb0506b51", + "remove_count_guard": "6f6a50db0de761cbc6b7c75a34073770f96408e102915a4a6110c7690c3d25cb" + }, + "expected": { + "control": "normal exit0", + "old_cap16": "normal exit4", + "ignore_window_rows": "normal exit7", + "ignore_duplicate_match": "normal exit8", + "remove_count_guard": "bounds trap3, exit103" + }, + "historical_receipt": "tests/pipeline/context-evidence.json unchanged; it qualifies only its recorded16-context source.", + "not_run": [ + "shared bridge regeneration and actual Q36 graph caller integration (NativeIntegrate/Q36Graph-owned)", + "accepted evaluator receipt-authority construction", + "GB10 execution", + "whole-model numerical/quality/performance qualification", + "activation" + ], + "scope": "Private bounded lookup only; no artifact schema, evaluator, trust grant, arena allocation implementation or model-wide context organization." +}