summaryrefslogtreecommitdiffstats
path: root/tools/cuda-ab/ab.sh
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-03 14:05:38 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-03 14:05:38 -0400
commitcc79b478843f0230fe6aa8ecd822de7ba71c891e (patch)
tree5de760ddec4e45cc23d39ce7502635f5c0711217 /tools/cuda-ab/ab.sh
parent40351167dd209012ab485e6164ce94f0b8965422 (diff)
downloadopen-iov-cc79b478843f0230fe6aa8ecd822de7ba71c891e.tar.gz
open-iov-cc79b478843f0230fe6aa8ecd822de7ba71c891e.zip
vgsp: host CUDA bridge + sema release recovery; greeneye simulator wave
- kernel: gsp_cuda_bridge (QMD launch capture, debugfs job/out/done, param+output resolution cached from inline writes), sema drain fixes (never hold/starve a channel), GR ring autopin + counter autoreg, per-page push reads, counter-derive gate; module builds clean - tools/cuda-bridge: CUDA driver-API daemon executing mail/vadd kernels on the physical GPU, CUBB2/CBD2 v2 protocol, layout check + self-tests - tools/guest-diag + tools/cuda-ab: scanner/pin fixes, victory push-only mode - debug/risc-v-gsp-rm-vm: Phase S simulator wave (GSP device model, boot ladder, triage/re-demo harnesses, docs 30-41), GPGPU-sim scaffolding - STATE-CURRENT/docs updates
Diffstat (limited to 'tools/cuda-ab/ab.sh')
-rwxr-xr-xtools/cuda-ab/ab.sh21
1 files changed, 14 insertions, 7 deletions
diff --git a/tools/cuda-ab/ab.sh b/tools/cuda-ab/ab.sh
index 07f6b24..8ae05ee 100755
--- a/tools/cuda-ab/ab.sh
+++ b/tools/cuda-ab/ab.sh
@@ -11,6 +11,7 @@
# tools/cuda-ab/ab.sh guest # push the binary + run in the running VM
# tools/cuda-ab/ab.sh compare # diff the stable result lines
# tools/cuda-ab/ab.sh all # host + guest + compare
+# tools/cuda-ab/ab.sh victory # push victory_mail to the VM (runner executes it)
#
# The binary links the CUDA runtime statically, so the guest needs no CUDA
# toolkit - only the guest driver's libcuda.so.
@@ -20,8 +21,9 @@ HERE="$(cd "$(dirname "$0")" && pwd)"
REPO="$(cd "$HERE/../.." && pwd)"
VMEXEC="$REPO/scripts/vgpu_vm.py"
RUN="$HERE/run"
-SRC="$HERE/vector_add.cu"
-BIN="$RUN/vector_add"
+WORKLOAD="${WORKLOAD:-vector_add}"
+SRC="$HERE/$WORKLOAD.cu"
+BIN="$RUN/$WORKLOAD"
mkdir -p "$RUN"
@@ -44,19 +46,19 @@ push_bin() {
off=0
size=70000
echo "[*] pushing $(stat -c%s "$BIN") bytes to guest"
- "$VMEXEC" exec "rm -f /tmp/vadd.b64" >/dev/null 2>&1
+ "$VMEXEC" exec "rm -f /tmp/$WORKLOAD.b64" >/dev/null 2>&1
while [ $off -lt $total ]; do
chunk=${b64:$off:$size}
- "$VMEXEC" exec "echo -n '$chunk' >> /tmp/vadd.b64" >/dev/null 2>&1
+ "$VMEXEC" exec "echo -n '$chunk' >> /tmp/$WORKLOAD.b64" >/dev/null 2>&1
off=$((off + size))
done
- "$VMEXEC" exec "base64 -d /tmp/vadd.b64 > /tmp/vector_add && chmod +x /tmp/vector_add && rm -f /tmp/vadd.b64 && echo PUSH_OK"
+ "$VMEXEC" exec "base64 -d /tmp/$WORKLOAD.b64 > /tmp/$WORKLOAD && chmod +x /tmp/$WORKLOAD && rm -f /tmp/$WORKLOAD.b64 && echo PUSH_OK"
}
run_guest() {
push_bin
echo "[*] guest run (emulated vGPU)"
- "$VMEXEC" exec "/tmp/vector_add" 2>&1 | tee "$RUN/guest.txt"
+ "$VMEXEC" exec "/tmp/$WORKLOAD" 2>&1 | tee "$RUN/guest.txt"
}
compare() {
@@ -84,5 +86,10 @@ host) run_host ;;
guest) run_guest ;;
compare) compare ;;
all) run_host; run_guest; compare ;;
-*) echo "usage: $0 [host|guest|compare|all]"; exit 1 ;;
+victory)
+ WORKLOAD=victory_mail
+ SRC="$HERE/$WORKLOAD.cu"
+ BIN="$RUN/$WORKLOAD"
+ push_bin ;;
+*) echo "usage: $0 [host|guest|compare|all|victory]"; exit 1 ;;
esac