aien-sovereign-core-mv
AienOS host runtime: inference scheduling, paged KV state, the aien CLI and Spark verification tooling. Its inference engine is in alpha testing (DGX Spark GB10); Omega is the implementation destination.
Brought by drakestapleton
aien-sovereign-core-mv / benchmarks / data / headstart / patched-20261015-4c83e38 / toolchain / 03-sanity.sh
| 1 | #!/usr/bin/env bash |
| 2 | # SPDX-License-Identifier: Apache-2.0 |
| 3 | # Copyright 2026 Drake Stapleton (AIEN / aien-dev) |
| 4 | # |
| 5 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | # you may not use this file except in compliance with the License. |
| 7 | # You may obtain a copy of the License at |
| 8 | # |
| 9 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | # |
| 11 | # Unless required by applicable law or agreed to in writing, software |
| 12 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | # See the License for the specific language governing permissions and |
| 15 | # limitations under the License. |
| 16 | |
| 17 | # Stage 3: digests, smoke test, upstream correctness checks. Output to logs/. |
| 18 | set -uo pipefail |
| 19 | E=~/workspace/headstart-exp |
| 20 | H=$E/headstart |
| 21 | L=$E/logs |
| 22 | R=$H/rustc/build/host/stage1/bin/rustc |
| 23 | C=$H/cargo/target/release/cargo |
| 24 | { |
| 25 | echo "## digests" |
| 26 | sha256sum "$R" "$H"/rustc/build/host/stage1/lib/librustc_driver-*.so "$C" |
| 27 | echo "## versions" |
| 28 | "$R" -vV; "$C" -V |
| 29 | echo "## upstream pin" |
| 30 | (cd "$H" && git rev-parse HEAD && git ls-tree HEAD rustc cargo) |
| 31 | (cd "$H/rustc" && echo "rustc submodule $(git rev-parse HEAD)") |
| 32 | (cd "$H/cargo" && echo "cargo submodule $(git rev-parse HEAD)") |
| 33 | sha256sum "$H"/patches/rustc/*.patch "$H"/patches/cargo/*.patch "$H/config/bootstrap.toml" |
| 34 | } > "$L/03-digests.txt" 2>&1 |
| 35 | |
| 36 | run() { # run <name> <cmd...> |
| 37 | local name=$1; shift |
| 38 | local t0=$(date +%s) |
| 39 | ( "$@" ) > "$L/03-$name.log" 2>&1 |
| 40 | local rc=$? |
| 41 | echo "$name rc=$rc wall_s=$(( $(date +%s) - t0 ))" | tee -a "$L/03-results.txt" |
| 42 | } |
| 43 | : > "$L/03-results.txt" |
| 44 | smoke() { |
| 45 | local t; t=$(mktemp -d) |
| 46 | cp -r "$H/tests/smoke/." "$t/" |
| 47 | cd "$t" |
| 48 | for m in false true; do |
| 49 | rm -rf target |
| 50 | echo "### headstart=$m" |
| 51 | /usr/bin/time -f 'wall=%e maxrss_kb=%M' env RUSTC="$R" CARGO_UNSTABLE_HEADSTART=$m "$C" check --color never 2>&1 |
| 52 | echo "exit=$?" |
| 53 | done |
| 54 | rm -rf "$t" |
| 55 | } |
| 56 | cd "$H" |
| 57 | run smoke smoke |
| 58 | run check-swap env RUSTC="$R" scripts/check-swap.sh |
| 59 | run check-errors scripts/check-errors.sh |
| 60 | run check-incremental-check scripts/check-incremental.sh check |
| 61 | run check-incremental-build scripts/check-incremental.sh build |
| 62 | echo SANITY_DONE |