interplane.Get Omega
Read in your language

omega-mv

Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.

Brought by drakestapleton

branch main Branches Tags History

omega-mv / seed / helix / ollm_factory / build-synth-gb10.sh

47 lines · 1467 bytes Raw Blame History
1#!/bin/sh
2# seed/helix/ollm_factory/build-synth-gb10.sh
3# Build zero-CUDA pure seeded OM-2 SM121 Observational-Equivalence Synthesizer (`om_synth_gb10`)
4# by composing train/omega-llm/native/gpu/{context,vector,launch}.om + om_synth_gb10.om.
5# Usage:
6# sh seed/helix/ollm_factory/build-synth-gb10.sh OMC_A [OMC_B] OUT_BIN
7set -eu
8OMC_A=${1:?usage: build-synth-gb10.sh OMC_A [OMC_B] OUT_BIN}
9if [ $# -ge 3 ]; then
10 OMC_B=$2
11 OUT_BIN=$3
12else
13 OMC_B=$1
14 OUT_BIN=$2
15fi
16
17OUT_DIR=$(dirname "$OUT_BIN")
18mkdir -p "$OUT_DIR"
19SRC="$OUT_DIR/om_synth_gb10_combined.om"
20
21cat si/directives/om2.om \
22 train/omega-llm/native/gpu/context.om \
23 train/omega-llm/native/gpu/vector.om \
24 train/omega-llm/native/gpu/launch.om \
25 seed/helix/ollm_factory/om_synth_gb10.om > "$SRC"
26
27"$OMC_A" < "$SRC" > "${OUT_BIN}.A"
28if [ "$OMC_A" != "$OMC_B" ]; then
29 "$OMC_B" < "$SRC" > "${OUT_BIN}.B"
30 cmp -s "${OUT_BIN}.A" "${OUT_BIN}.B" || { echo "FAIL: om_synth_gb10 diverged across strands" >&2; exit 1; }
31 rm -f "${OUT_BIN}.B"
32fi
33mv "${OUT_BIN}.A" "$OUT_BIN"
34chmod +x "$OUT_BIN"
35rm -f "$SRC"
36
37if command -v ldd >/dev/null 2>&1; then
38 out=$(ldd "$OUT_BIN" 2>&1 || true)
39 case "$out" in
40 *"not a dynamic executable"*|*"statically linked"*) ;;
41 *) echo "FAIL: $OUT_BIN is not a static zero-CUDA ELF: $out" >&2; exit 1 ;;
42 esac
43fi
44
45printf 'PASS om_synth_gb10 static ELF (%s, %s bytes)\n' \
46 "$(sha256sum "$OUT_BIN" | cut -d' ' -f1)" \
47 "$(wc -c < "$OUT_BIN" | tr -d ' ')"