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_wide.sh

27 lines · 2453 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.
4# The _wide MoE units (Qwen3.8-Flash-Next: 512 experts, 10 picks + shared, hidden 2560,
5# intermediate 640) against the unchanged legacy units, a C reference and moe_verify_wide.
6# MOE_WIDE_OM / MOE_WIDE_VERIFY override the source locations (tests/moe/wide_mutants.py).
7set -eu
8ROOT=$(CDPATH= cd -- "$(dirname "$0")/../.." && pwd)
9# Same contract as om/units.sh: without the pinned toolchain this is NOT_RUN (exit 3), never PASS.
10[ -n "${OMEGA_OMC:-}" ] && [ -n "${OMEGA_BRIDGE:-}" ] || { echo "MOE-WIDE NOT_RUN: set OMEGA_OMC and OMEGA_BRIDGE to the om/units.sh pins" >&2; exit 3; }
11: "${QUANT_ROOT:?Set canonical QuantSchema checkout}"
12: "${CACHE_ROOT:?Set canonical KernelCache checkout}"
13: "${COMPOSE_ROOT:?Set canonical KernelCompose checkout}"
14: "${PIPELINE_ROOT:?Set canonical PipelineSelect checkout}"
15W=${MOE_WIDE_OM:-$ROOT/om/moe}
16V=${MOE_WIDE_VERIFY:-$ROOT/tests/moe/moe_verify_wide.om}
17T=$(mktemp -d)
18trap 'rm -rf "$T"' EXIT HUP INT TERM
19OMEGA_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 moe_plan_wide=$W/moe_plan_wide.om moe_group_wide=$W/moe_group_wide.om moe_ids32_wide=$W/moe_ids32_wide.om moe_maps32_wide=$W/moe_maps32_wide.om moe_segs32_wide=$W/moe_segs32_wide.om moe_windows_wide=$W/moe_windows_wide.om moe_verify_wide=$V" OMEGA_UNITS_DEST="$T" sh "$ROOT/om/units.sh"
20${CC:-cc} -std=c11 -O2 -Wall -Wextra -Werror -I"$T" "$ROOT/tests/moe/caller_wide.c" "$T"/cudapp_om_*.c -Wl,--gc-sections -o "$T/moe-wide-test"
21"$T/moe-wide-test"
22cat "$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" "$W/moe_group_wide.om" "$W/moe_admit_wide.om" "$PIPELINE_ROOT/tests/pipeline/fixture.om" "$ROOT/tests/moe/admit-caller-wide.om" > "$T/admit.om"
23"$OMEGA_OMC" < "$T/admit.om" > "$T/admit"; chmod +x "$T/admit"
24"$T/admit"
25echo "MOE-WIDE-ADMIT HOST PASS: actual selector/cache at 9 and 11 contributions, pin/acquire/retire/unpin, cross-profile/short-table/stride/stale/wrong-family refusals"
26sha256sum "$OMEGA_OMC" "$W"/moe_*_wide.om "$V" "$ROOT/tests/moe/caller_wide.c" "$ROOT/tests/moe/admit-caller-wide.om" "$T/moe-wide-test" "$T/admit"
27sha256sum "$T"/cudapp_om_moe_*_wide.c