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 / tests / arboris / build-sparse-probe.sh

45 lines · 2455 bytes Raw Blame History
1#!/bin/sh
2# SPDX-License-Identifier: AGPL-3.0-only
3set -eu
4bin=${1:?supply output executable}
5: "${OMC:?set OMC to the seeded compiler}"
6# The seeded compiler takes one profile declaration per composed program.
7main=${2:-tests/arboris/sparse-silicon.om}
8# Compile an exact fixture into each probe so replay cannot change its shape.
9hops=1
10layout=0
11case "${3:-compound}" in
12 compound) dims="100000 2 1 8" ;;
13 wave) dims="100000 2 2 8" ;;
14 small) dims="4096 1 1 8" ;;
15 even) dims="12288 2 1 8"; hops=2; layout=4 ;;
16 persistent) dims="129 2 1 8"; hops=3; layout=1 ;;
17 hubs) dims="129 2 1 8"; layout=2 ;;
18 experimental) dims="129 2 1 264"; layout=3 ;;
19 wide) dims="100000 2 1 264" ;;
20 *) exit 2 ;;
21esac
22set -- $dims
23printf 'const probe_n ulong %s
24const probe_batch ulong %s
25const probe_planes ulong %s
26const probe_dim ulong %s
27const probe_hops ulong %s
28const probe_layout ulong %s
29' "$1" "$2" "$3" "$4" "$hops" "$layout" > "$bin.shape.om"
30common=tests/arboris/probe-common.om
31case "$main" in *packet.om) common=/dev/null ;; esac
32# Only the gated CPU oracle needs the numeric reference. Its public "shape"
33# classifier shares a name with a QMD parameter outside the numeric unit.
34sed '/^fn logpoly /,$d' gpu/nvidia/om/numeric/numeric.om > "$bin.numeric.om"
35cat om/arboris_arena.om om/arboris_ontology.om om/tls/sha2.om om/arboris_records.om \
36 om/arboris_spread.om om/runtime/rx_capq_core.om seed/authority/capq.om "$bin.numeric.om" om/arboris_gated.om om/arboris_gate_cubic.om om/arboris_q4.om seed/authority/caproot.om om/gpu/bw_qmd.om \
37 om/blackwell_arboris_qmd.om om/encoder/bw_enc_sm121.om om/blackwell_arboris_emit.om om/blackwell_arboris_gated_emit.om om/blackwell_arboris_persistent.om om/blackwell_arboris_hubs.om \
38 gpu/nvidia/native/nvrm/context.om gpu/nvidia/native/share/share.om \
39 gpu/nvidia/native/blackwell/vector.om gpu/nvidia/native/blackwell/launch.om \
40 gpu/nvidia/native/arboris/arena.om gpu/nvidia/native/arboris/compute-lock.om gpu/nvidia/native/arboris/step.om gpu/nvidia/native/arboris/query.om gpu/nvidia/native/arboris/gated-step.om gpu/nvidia/native/arboris/digest.om \
41 protocol/omnet/om/sha512/sha512.om protocol/omnet/om/ed25519/ed25519.om gpu/nvidia/native/arboris/commit.om \
42 "$bin.shape.om" "$common" "$main" > "$bin.sources"
43awk '/^om2$/{if(profile++) next} {sub(/^export fn /,"fn ");print}' "$bin.sources" > "$bin.om"
44"$OMC" < "$bin.om" > "$bin"
45chmod +x "$bin"