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
| 1 | #!/bin/sh |
| 2 | # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 3 | # Host only. No GPU library or device node is opened. |
| 4 | set -eu |
| 5 | ROOT=$(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}" |
| 12 | T=$(mktemp -d) |
| 13 | trap 'rm -rf "$T"' EXIT HUP INT TERM |
| 14 | OMEGA_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" |
| 19 | cat "$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" |
| 22 | echo "MOE-ADMIT HOST PASS: actual selector/cache, metadata pin/acquire/retire/unpin, missing/stale/wrong-family refusals" |
| 23 | sha256sum "$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" |
| 24 | sha256sum "$OMEGA_OMC" "$ROOT"/om/moe/*.om "$ROOT/tests/moe/moe_verify.om" "$T/moe-test" |