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 / tools / latmeas / selftest.sh

23 lines · 826 bytes Raw Blame History
1#!/bin/sh
2# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3# Host self-test: encode, disassemble, oracle, NAK diff, template dry run.
4# No device is opened. Synthetic template output stays in a temp file.
5set -eu
6bin=${1:?binary}
7root=$(CDPATH= cd -- "$(dirname -- "$0")/../.." && pwd)
8cd "$root"
9"$bin" --self-test
10"$bin" --print-plan >/dev/null
11python3 tools/latmeas/diff_nak.py --check >/dev/null
12python3 tools/latmeas/fill_template.py --self-test
13dir=$(mktemp -d)
14trap 'rm -rf "$dir"' EXIT
15"$bin" --emit "$dir/kernels" >/dev/null
16test -f "$dir/kernels/manifest.txt"
17test -f "$dir/kernels/alu_alu_4.bin"
18if grep -q '90 s' tools/latmeas/run_spark.sh; then
19 echo "FAIL: run_spark.sh still quotes a 90 s bound" >&2
20 exit 1
21fi
22sh tools/latmeas/run_spark.sh --receipt-self-test
23echo "latmeas host self-test PASS"