Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/CUDApp/blob/main/om/core/README.md # 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 Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `CUDApp / om / core / README.md` 104 lines · 5825 bytes Raw Blame History Rendered 1 # Core utilities in seeded Omega 2 3 The default core algorithms are first-party `.om`. `CUDAPP_MIGRATION_PENDING_C_CORE` 4 selects the handwritten C differential oracle, not a platform fallback. The cubin 5 writer remains in CUDApp. Nothing is imported from another repository at build time. 6 7 | Public implementation | Computation | 8 | --- | --- | 9 | `sha256.c` | `sha256.om` | 10 | `omega_canonical.c` | `canonical.om`, `idparse.om` and their entry wrappers | 11 | `omega_core.c` | `object.om`, `graph.om`, `payload.om`, `param.om`, `effect.om`, `eval.om` | 12 | `omega_vector.c` | `vector.om`, `vecspec.om`, `vpay.om` | 13 | `omega_gpu_fmt.c` | `fmt.om`, `fmtnum.om`, `fmtclip.om` | 14 | `omega_gpu_hostmath.c` | `hostmath.om` | 15 | `omega_cubin.c` | Existing `../cubin/cubin_elf.om`; `cubinmsg.om` renders layout refusals; `cubadmit.om` decides target and null-parameter admission | 16 | `omega_ampere_codegen.c` | Existing `../encoder/ampere_enc_sm86.om`; `ampack.om` sign-extends and packs instruction fields | 17 | `cudapp_freest_f16.c`, `cudapp_freest_revision.c`, `cudapp_freest_epoch.c` | Existing generated bindings, already sourced from Omega | 18 19 The SHA implementation is a local, attributed copy of 20 `aien-dev/omega-mv@`acb3f15cdc691b1b046b48b0dad0f9255a12ba4b`:om/sha256/sha256.om`. 21 Its original Apache-2.0 attribution is preserved. The adapter also preserves the C 22 context's post-padding count and repeated-finalization behavior. Official NIST 23 byte-oriented CAVP short/long vectors and their provenance are in 24 `tests/vectors/core/`. 25 26 ## ABI and memory ownership 27 28 C retains allocation, release, bounded staging, pointer/span adaptation and C 29 variadic argument extraction. Sorting, validation, serialization, hashing, checked 30 arithmetic, vector operations, format parsing/rendering and floating-point 31 polynomials are in Omega. Cubin target admission, the null-parameter check and the 32 error-message decision tree are also Omega; Ampere field sign-extension and flag 33 packing are in `ampack.om`. 34 `tests/core_cubin_refusal_ref.inc` is an independent frozen C oracle, not a 35 production implementation. No new runtime public API or version is introduced. 36 37 Bootstrap object layouts have compile-time size/offset assertions. Short caller 38 buffers are staged into the fixed-size views accepted by the pinned compiler. 39 Canonical output retains partial writes on refusal. Overlapping vector inputs 40 retain the C sequential aliasing behavior. The formatter keeps truncation and 41 unsupported-token behavior. Host arithmetic is compared bit-for-bit against the C 42 oracle compiled with `-ffp-contract=off`; each Omega operation is non-contracting. 43 44 `native.sh` composes the same local sources into OM-2 native units, with 23 core 45 exports plus separate existing cubin/Ampere units. Native aggregate registration 46 and no-libc qualification belong to the integration lane. Composition is not 47 native execution evidence. There is no `NO_POSIX` C fallback. 48 49 ## Native realization identity composition 50 51 Compose `om/cache/digest.om`, `om/blackwell/identity.om` and 52 `om/blackwell/id_native.om` after an `om2` prefix. The adapter exposes 53 `bw_id_native` with the native public `long` result while retaining the 54 canonical `bw_identity` integer result and policy. The digest and identity 55 output parameters are named `dst`: `out` is reserved in OM-2. Their types, 56 function names and byte behavior do not change. 57 58 `tests/identity_native.om` emits the complete digest bytes for 4096 distinct 59 machine-wire and 4096 distinct realization-wire inputs. It also checks the 60 length refusal. Run its composition against both the pre-rename and renamed 61 units and compare stdout. Native root registration in the production aggregate 62 is separate from this compatibility prerequisite. These are host checks, not 63 physical identity or GPU qualification. 64 65 ## Host gates 66 67 Every test and compiler-driven mutant must run with device nodes hidden: 68 69 ```sh 70 run_host() { 71 bwrap --dev-bind / / --dev /dev --proc /proc -- \ 72 taskset -c 10-14 nice -n 10 "$@" 73 } 74 export OMEGA_OMC="$HOME/work/cudastack/omega-mv/seed/out/omc" 75 export OMEGA_BRIDGE="$HOME/work/cudastack/omega-bridge" 76 run_host sh om/units.sh 77 run_host make -j3 test-core-util test-core-cubin-message test-core-mutants 78 run_host make -j3 test-om-cubin test-ampere-cubin test-ampere-encoder test-ampere-plan 79 run_host sh om/core/native.sh 80 run_host sh om/core/native.sh --check 81 run_host sh om/units.sh --check 82 ``` 83 84 `test-core-util` covers FIPS/CAVP SHA, 10,000 random one-shot and streaming 85 comparisons, padding/context boundaries, canonical objects and all header pairs, 86 parser quirks, effects/evaluation, vector overlap/refusal boundaries, formatter 87 truncation, host math, constructors and all 65,536 binary16 encodings. 88 `test-core-cubin-message` compares 10,000 diagnostic cases and output-capacity 89 boundaries. Negative controls flip records. `test-core-mutants` recompiles six 90 independent semantic SHA mutants, requires the baseline to pass and treats a 91 compiler failure as a broken mutant rather than a kill. 92 93 The existing cubin gate compares image bytes, status and diagnostics against the 94 legacy writer and includes an image-bit negative control. `test-core-residue` 95 checks target and null-parameter admission against the C `snprintf` format, packs 96 one cubin per accepted target under `/tmp` and unlinks it, and compares Ampere 97 field packing with the inline sign-extend formula. Its red check flips one image 98 bit. `test-core-residue-mutants` recompiles eight semantic mutants. Ampere's plan 99 target uses the warp simulator, not hardware. Missing-device failures are never 100 grounds to rerun outside the namespace. Hardware authorization and qualification 101 are separate; see the lane receipt and `CHIP.md`. 102 103 Receipts: [core utilities](../../evidence/core-util/2026-11-06/README.md), 104 [core residue](../../evidence/core-residue/2026-11-06/README.md).