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
CUDApp / tests / flash_expert / run.sh
| 1 | #!/bin/sh |
| 2 | # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 3 | # Host only. One routed expert of one layer of the Qwen3.8-Flash-Next FP8 checkpoint on disk, read by an independent Python float64 |
| 4 | # reference and run through the FP8 GEMV builders on the host warp simulator (tests/flash_expert_real_test.c). No device is opened. |
| 5 | # sh tests/flash_expert/run.sh [MODEL_DIR] [LAYER] [EXPERT] NOT_RUN (exit 3) when the checkpoint shards are not there |
| 6 | # Run from the repository root after `make build/flash_expert_real_test` (through the device-free wrapper, see AGENTS.md). |
| 7 | set -eu |
| 8 | ROOT=$(CDPATH= cd -- "$(dirname "$0")/../.." && pwd) |
| 9 | MODEL=${1:-${FLASH_NEXT_MODEL_DIR:-$HOME/models/qwen3.8-flash-next-fp8-7fb48d70}} |
| 10 | LAYER=${2:-0} |
| 11 | EXPERT=${3:-3} |
| 12 | BIN=${FLASH_EXPERT_BIN:-$ROOT/build/flash_expert_real_test} |
| 13 | OUT=${FLASH_EXPERT_OUT:-$(mktemp -d)} |
| 14 | [ -f "$MODEL/config.json" ] || { echo "NOT_RUN: no checkpoint at $MODEL"; exit 3; } |
| 15 | [ -x "$BIN" ] || { echo "NOT_RUN: build build/flash_expert_real_test first"; exit 3; } |
| 16 | python3 "$ROOT/tests/flash_expert/reference.py" "$MODEL" "$OUT" "$LAYER" "$EXPERT" |
| 17 | "$BIN" "$OUT" |