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 / evidence / C6-DISASM-OM / sr-sweep.sh

17 lines · 721 bytes Raw Blame History
1#!/bin/sh
2# t_81083ab1: sweep the S2R special-register field 0..255 through the nvdisasm ORACLE (offline, nothing shipped)
3set -u
4cd "$HOME/work/hive/t_81083ab1/scratch" || exit 1
5out=sr-sweep.bin
6: > "$out"
7i=0
8while [ $i -lt 256 ]; do
9 printf '\031\171\002\000\000\000\000\000' >> "$out"
10 printf "\\000\\$(printf '%03o' $i)\\000\\000\\000\\000\\000\\000" >> "$out"
11 i=$((i + 1))
12done
13wc -c < "$out"
14/usr/local/cuda/bin/nvdisasm -b SM121 -hex "$out" > sr-sweep.nv 2> sr-sweep.err; echo "nvdisasm exit $?"
15sh ../CUDApp/tools/sm121dis/oracle_pairs.sh sr-sweep.nv > sr-sweep.want
16../CUDApp/build/sm121dis --pairs "$out" | sed 's/[[:space:]]\{1,\}/ /g' > sr-sweep.got
17diff sr-sweep.want sr-sweep.got | grep -c '^<'