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 / evidence / C6-DISASM-OM / sr-sweep.sh
| 1 | #!/bin/sh |
| 2 | # t_81083ab1: sweep the S2R special-register field 0..255 through the nvdisasm ORACLE (offline, nothing shipped) |
| 3 | set -u |
| 4 | cd "$HOME/work/hive/t_81083ab1/scratch" || exit 1 |
| 5 | out=sr-sweep.bin |
| 6 | : > "$out" |
| 7 | i=0 |
| 8 | while [ $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)) |
| 12 | done |
| 13 | wc -c < "$out" |
| 14 | /usr/local/cuda/bin/nvdisasm -b SM121 -hex "$out" > sr-sweep.nv 2> sr-sweep.err; echo "nvdisasm exit $?" |
| 15 | sh ../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 |
| 17 | diff sr-sweep.want sr-sweep.got | grep -c '^<' |