interplane.Get Omega
Read in your language

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

branch main Branches Tags History

CUDApp / tests / moe / run.sh

24 lines · 2145 bytes Raw Blame History
1#!/bin/sh
2# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3# Host only. No GPU library or device node is opened.
4set -eu
5ROOT=$(CDPATH= cd -- "$(dirname "$0")/../.." && pwd)
6: "${OMEGA_OMC:?Set the om/units.sh pinned compiler}"
7: "${OMEGA_BRIDGE:?Set the om/units.sh pinned bridge checkout}"
8: "${QUANT_ROOT:?Set canonical QuantSchema checkout}"
9: "${CACHE_ROOT:?Set canonical KernelCache checkout}"
10: "${COMPOSE_ROOT:?Set canonical KernelCompose checkout}"
11: "${PIPELINE_ROOT:?Set canonical PipelineSelect checkout}"
12T=$(mktemp -d)
13trap 'rm -rf "$T"' EXIT HUP INT TERM
14OMEGA_UNITS="om/moe/moe_plan.om om/moe/moe_group.om om/moe/moe_ids32.om om/moe/moe_maps32.om om/moe/moe_segs32.om om/moe/moe_windows.om model_graph_group=om/graph/group.om tests/moe/moe_verify.om" OMEGA_UNITS_DEST="$T" sh "$ROOT/om/units.sh"
15# The included canonical graph uses the same GNU/POSIX interfaces as the main build.
16${CC:-cc} -std=gnu11 -O2 -Wall -Wextra -Werror -ffunction-sections -fdata-sections -I"$ROOT/src" -c "$ROOT/tests/moe/incumbent.c" -o "$T/incumbent.o"
17${CC:-cc} -std=c11 -O2 -Wall -Wextra -Werror -I"$T" "$ROOT/tests/moe/caller.c" "$T"/cudapp_om_*.c "$T/incumbent.o" -Wl,--gc-sections -o "$T/moe-test"
18"$T/moe-test"
19cat "$QUANT_ROOT/om/quant/quant.om" "$COMPOSE_ROOT/om/components/realize.om" "$CACHE_ROOT/om/cache/digest.om" "$CACHE_ROOT/om/cache/residency.om" "$PIPELINE_ROOT/om/pipeline/select.om" "$PIPELINE_ROOT/om/pipeline/graph.om" "$ROOT/om/moe/moe_group.om" "$ROOT/om/moe/moe_admit.om" "$PIPELINE_ROOT/tests/pipeline/fixture.om" "$ROOT/tests/moe/admit-caller.om" > "$T/admit.om"
20"$OMEGA_OMC" < "$T/admit.om" > "$T/admit"; chmod +x "$T/admit"
21"$T/admit"
22echo "MOE-ADMIT HOST PASS: actual selector/cache, metadata pin/acquire/retire/unpin, missing/stale/wrong-family refusals"
23sha256sum "$QUANT_ROOT/om/quant/quant.om" "$COMPOSE_ROOT/om/components/realize.om" "$CACHE_ROOT/om/cache/digest.om" "$CACHE_ROOT/om/cache/residency.om" "$PIPELINE_ROOT/om/pipeline/select.om" "$PIPELINE_ROOT/om/pipeline/graph.om" "$ROOT/om/moe/moe_admit.om" "$T/admit"
24sha256sum "$OMEGA_OMC" "$ROOT"/om/moe/*.om "$ROOT/tests/moe/moe_verify.om" "$T/moe-test"