From c8ccdd772c7650f19d14f143f34b700813575746 Mon Sep 17 00:00:00 2001 From: Arthur Hanson Rasmusson Date: Thu, 8 Oct 2026 04:15:24 -0400 Subject: vgsp+guest-diag: kcore-truth pin resolver (pool/pushbuffer/channel ring+userd) + GR ring userd-derived candidates guest_pin_stream.py now resolves translations entirely from guest truth via /proc/kcore + a manual page-table walk (no QMP races): the CE semaphore pool and pushbuffer memory from the UVM rm_mem structures, and each channel's GPFIFO ring + GPPUT from the tracking semaphore's embedding uvm_channel_t (channel_info located by its gpFifoGpuVa value). This removes the watcher pipeline's flakiness on the cudaMalloc stall class (missing pool/pushbuffer pins). gsp_sema_service.c: svc_gr_ring_autopin tries the guest-registered USERD memdesc base as a ring candidate (the fixed FB convention only matches when the guest's VRAM allocator happens to reproduce the old layout), plus an optional (gsp_sema_dbg) one-shot FB scan + raw-word diagnostics when every candidate fails. tools/cuda-ab/p2: self-checking arbitrary-kernel acceptance suite (10 programs: sequential launches, shapes, params, smem/GEMM, streams, malloc churn, printf+error, FMA benchmark, mixed, managed probe) with host oracle expectations and a guest runner. --- tools/cuda-ab/p2/expected/SOURCE.txt | 5 +++++ tools/cuda-ab/p2/expected/p2_bench.full.txt | 3 +++ tools/cuda-ab/p2/expected/p2_bench.txt | 2 ++ tools/cuda-ab/p2/expected/p2_churn.full.txt | 9 +++++++++ tools/cuda-ab/p2/expected/p2_churn.txt | 9 +++++++++ tools/cuda-ab/p2/expected/p2_managed_probe.full.txt | 2 ++ tools/cuda-ab/p2/expected/p2_managed_probe.txt | 2 ++ tools/cuda-ab/p2/expected/p2_mixed.full.txt | 8 ++++++++ tools/cuda-ab/p2/expected/p2_mixed.txt | 8 ++++++++ tools/cuda-ab/p2/expected/p2_params.full.txt | 2 ++ tools/cuda-ab/p2/expected/p2_params.txt | 2 ++ tools/cuda-ab/p2/expected/p2_printf_err.full.txt | 10 ++++++++++ tools/cuda-ab/p2/expected/p2_printf_err.txt | 10 ++++++++++ tools/cuda-ab/p2/expected/p2_seq5.full.txt | 7 +++++++ tools/cuda-ab/p2/expected/p2_seq5.txt | 7 +++++++ tools/cuda-ab/p2/expected/p2_shapes.full.txt | 7 +++++++ tools/cuda-ab/p2/expected/p2_shapes.txt | 7 +++++++ tools/cuda-ab/p2/expected/p2_smem.full.txt | 3 +++ tools/cuda-ab/p2/expected/p2_smem.txt | 3 +++ tools/cuda-ab/p2/expected/p2_streams.full.txt | 3 +++ tools/cuda-ab/p2/expected/p2_streams.txt | 3 +++ 21 files changed, 112 insertions(+) create mode 100644 tools/cuda-ab/p2/expected/SOURCE.txt create mode 100644 tools/cuda-ab/p2/expected/p2_bench.full.txt create mode 100644 tools/cuda-ab/p2/expected/p2_bench.txt create mode 100644 tools/cuda-ab/p2/expected/p2_churn.full.txt create mode 100644 tools/cuda-ab/p2/expected/p2_churn.txt create mode 100644 tools/cuda-ab/p2/expected/p2_managed_probe.full.txt create mode 100644 tools/cuda-ab/p2/expected/p2_managed_probe.txt create mode 100644 tools/cuda-ab/p2/expected/p2_mixed.full.txt create mode 100644 tools/cuda-ab/p2/expected/p2_mixed.txt create mode 100644 tools/cuda-ab/p2/expected/p2_params.full.txt create mode 100644 tools/cuda-ab/p2/expected/p2_params.txt create mode 100644 tools/cuda-ab/p2/expected/p2_printf_err.full.txt create mode 100644 tools/cuda-ab/p2/expected/p2_printf_err.txt create mode 100644 tools/cuda-ab/p2/expected/p2_seq5.full.txt create mode 100644 tools/cuda-ab/p2/expected/p2_seq5.txt create mode 100644 tools/cuda-ab/p2/expected/p2_shapes.full.txt create mode 100644 tools/cuda-ab/p2/expected/p2_shapes.txt create mode 100644 tools/cuda-ab/p2/expected/p2_smem.full.txt create mode 100644 tools/cuda-ab/p2/expected/p2_smem.txt create mode 100644 tools/cuda-ab/p2/expected/p2_streams.full.txt create mode 100644 tools/cuda-ab/p2/expected/p2_streams.txt (limited to 'tools/cuda-ab/p2/expected') diff --git a/tools/cuda-ab/p2/expected/SOURCE.txt b/tools/cuda-ab/p2/expected/SOURCE.txt new file mode 100644 index 0000000..a138e80 --- /dev/null +++ b/tools/cuda-ab/p2/expected/SOURCE.txt @@ -0,0 +1,5 @@ +mode=emit +date=2026-10-08T07:01:11Z +host=majik-envy +deterministic CPU computation via --emit-expected +(no usable host GPU; rerun ./oracle.sh when one is available) diff --git a/tools/cuda-ab/p2/expected/p2_bench.full.txt b/tools/cuda-ab/p2/expected/p2_bench.full.txt new file mode 100644 index 0000000..47a9851 --- /dev/null +++ b/tools/cuda-ab/p2/expected/p2_bench.full.txt @@ -0,0 +1,3 @@ +RESULT bench threads=8192 iters=250000 bad=0 value=0.00999368541 +TIMING bench ms=0.000 gflops=0.00 (emit mode: no GPU) +STATUS OK diff --git a/tools/cuda-ab/p2/expected/p2_bench.txt b/tools/cuda-ab/p2/expected/p2_bench.txt new file mode 100644 index 0000000..525eb2a --- /dev/null +++ b/tools/cuda-ab/p2/expected/p2_bench.txt @@ -0,0 +1,2 @@ +RESULT bench threads=8192 iters=250000 bad=0 value=0.00999368541 +STATUS OK diff --git a/tools/cuda-ab/p2/expected/p2_churn.full.txt b/tools/cuda-ab/p2/expected/p2_churn.full.txt new file mode 100644 index 0000000..a9bd20d --- /dev/null +++ b/tools/cuda-ab/p2/expected/p2_churn.full.txt @@ -0,0 +1,9 @@ +RESULT churn iter=0 nbuf=1 n=2048 bad=0 +RESULT churn iter=1 nbuf=2 n=2048 bad=0 +RESULT churn iter=2 nbuf=3 n=2048 bad=0 +RESULT churn iter=3 nbuf=4 n=2048 bad=0 +RESULT churn iter=4 nbuf=1 n=2048 bad=0 +RESULT churn iter=5 nbuf=2 n=2048 bad=0 +RESULT churn final_buf=1 n=2048 bad=0 +RESULT churn iters=6 allocs=14 bad=0 +STATUS OK diff --git a/tools/cuda-ab/p2/expected/p2_churn.txt b/tools/cuda-ab/p2/expected/p2_churn.txt new file mode 100644 index 0000000..a9bd20d --- /dev/null +++ b/tools/cuda-ab/p2/expected/p2_churn.txt @@ -0,0 +1,9 @@ +RESULT churn iter=0 nbuf=1 n=2048 bad=0 +RESULT churn iter=1 nbuf=2 n=2048 bad=0 +RESULT churn iter=2 nbuf=3 n=2048 bad=0 +RESULT churn iter=3 nbuf=4 n=2048 bad=0 +RESULT churn iter=4 nbuf=1 n=2048 bad=0 +RESULT churn iter=5 nbuf=2 n=2048 bad=0 +RESULT churn final_buf=1 n=2048 bad=0 +RESULT churn iters=6 allocs=14 bad=0 +STATUS OK diff --git a/tools/cuda-ab/p2/expected/p2_managed_probe.full.txt b/tools/cuda-ab/p2/expected/p2_managed_probe.full.txt new file mode 100644 index 0000000..b5d6afc --- /dev/null +++ b/tools/cuda-ab/p2/expected/p2_managed_probe.full.txt @@ -0,0 +1,2 @@ +PROBE managed state=no-oracle-gpu note=emit-mode +STATUS OK diff --git a/tools/cuda-ab/p2/expected/p2_managed_probe.txt b/tools/cuda-ab/p2/expected/p2_managed_probe.txt new file mode 100644 index 0000000..b5d6afc --- /dev/null +++ b/tools/cuda-ab/p2/expected/p2_managed_probe.txt @@ -0,0 +1,2 @@ +PROBE managed state=no-oracle-gpu note=emit-mode +STATUS OK diff --git a/tools/cuda-ab/p2/expected/p2_mixed.full.txt b/tools/cuda-ab/p2/expected/p2_mixed.full.txt new file mode 100644 index 0000000..483d2db --- /dev/null +++ b/tools/cuda-ab/p2/expected/p2_mixed.full.txt @@ -0,0 +1,8 @@ +MAIL the little gpu man says p2 mixed +RESULT mixed mail bad=0 +RESULT mixed vadd n=8192 bad=0 +RESULT mixed red n=4096 sum=8386560 bad=0 +RESULT mixed grid2d nx=40 ny=20 bad=0 +RESULT mixed stream nstreams=2 n=1024 bad=0 +RESULT mixed total bad=0 +STATUS OK diff --git a/tools/cuda-ab/p2/expected/p2_mixed.txt b/tools/cuda-ab/p2/expected/p2_mixed.txt new file mode 100644 index 0000000..483d2db --- /dev/null +++ b/tools/cuda-ab/p2/expected/p2_mixed.txt @@ -0,0 +1,8 @@ +MAIL the little gpu man says p2 mixed +RESULT mixed mail bad=0 +RESULT mixed vadd n=8192 bad=0 +RESULT mixed red n=4096 sum=8386560 bad=0 +RESULT mixed grid2d nx=40 ny=20 bad=0 +RESULT mixed stream nstreams=2 n=1024 bad=0 +RESULT mixed total bad=0 +STATUS OK diff --git a/tools/cuda-ab/p2/expected/p2_params.full.txt b/tools/cuda-ab/p2/expected/p2_params.full.txt new file mode 100644 index 0000000..7833c07 --- /dev/null +++ b/tools/cuda-ab/p2/expected/p2_params.full.txt @@ -0,0 +1,2 @@ +RESULT params kernels=13 nparam_max=12 bad=0 checksum=395 +STATUS OK diff --git a/tools/cuda-ab/p2/expected/p2_params.txt b/tools/cuda-ab/p2/expected/p2_params.txt new file mode 100644 index 0000000..7833c07 --- /dev/null +++ b/tools/cuda-ab/p2/expected/p2_params.txt @@ -0,0 +1,2 @@ +RESULT params kernels=13 nparam_max=12 bad=0 checksum=395 +STATUS OK diff --git a/tools/cuda-ab/p2/expected/p2_printf_err.full.txt b/tools/cuda-ab/p2/expected/p2_printf_err.full.txt new file mode 100644 index 0000000..e2bf8a4 --- /dev/null +++ b/tools/cuda-ab/p2/expected/p2_printf_err.full.txt @@ -0,0 +1,10 @@ +P2PRINT hello i=0 +P2PRINT hello i=1 +P2PRINT hello i=2 +P2PRINT hello i=3 +P2PRINT second c=Z v=7 +ERR launch grid0 rc=9 name=invalid configuration argument +ERR launch block0 rejected=1 +ERR cleared rc=0 +RESULT errmode grid0_bad=0 block0_bad=0 clear_bad=0 recovered=1 +STATUS OK diff --git a/tools/cuda-ab/p2/expected/p2_printf_err.txt b/tools/cuda-ab/p2/expected/p2_printf_err.txt new file mode 100644 index 0000000..e2bf8a4 --- /dev/null +++ b/tools/cuda-ab/p2/expected/p2_printf_err.txt @@ -0,0 +1,10 @@ +P2PRINT hello i=0 +P2PRINT hello i=1 +P2PRINT hello i=2 +P2PRINT hello i=3 +P2PRINT second c=Z v=7 +ERR launch grid0 rc=9 name=invalid configuration argument +ERR launch block0 rejected=1 +ERR cleared rc=0 +RESULT errmode grid0_bad=0 block0_bad=0 clear_bad=0 recovered=1 +STATUS OK diff --git a/tools/cuda-ab/p2/expected/p2_seq5.full.txt b/tools/cuda-ab/p2/expected/p2_seq5.full.txt new file mode 100644 index 0000000..0823ab1 --- /dev/null +++ b/tools/cuda-ab/p2/expected/p2_seq5.full.txt @@ -0,0 +1,7 @@ +RESULT seq step=1 n=1024 bad=0 +RESULT seq step=2 n=1024 bad=0 +RESULT seq step=3 n=1024 bad=0 +RESULT seq step=4 n=1024 bad=0 +RESULT seq step=5 n=1024 bad=0 +RESULT seq launches=5 n=1024 bad=0 +STATUS OK diff --git a/tools/cuda-ab/p2/expected/p2_seq5.txt b/tools/cuda-ab/p2/expected/p2_seq5.txt new file mode 100644 index 0000000..0823ab1 --- /dev/null +++ b/tools/cuda-ab/p2/expected/p2_seq5.txt @@ -0,0 +1,7 @@ +RESULT seq step=1 n=1024 bad=0 +RESULT seq step=2 n=1024 bad=0 +RESULT seq step=3 n=1024 bad=0 +RESULT seq step=4 n=1024 bad=0 +RESULT seq step=5 n=1024 bad=0 +RESULT seq launches=5 n=1024 bad=0 +STATUS OK diff --git a/tools/cuda-ab/p2/expected/p2_shapes.full.txt b/tools/cuda-ab/p2/expected/p2_shapes.full.txt new file mode 100644 index 0000000..36e4e3d --- /dev/null +++ b/tools/cuda-ab/p2/expected/p2_shapes.full.txt @@ -0,0 +1,7 @@ +RESULT shapes case=1 n=1 bad=0 +RESULT shapes case=2 n=1013 bad=0 +RESULT shapes case=3 n=1000 bad=0 +RESULT shapes case=4 n=800 bad=0 +RESULT shapes case=5 n=1536 bad=0 +RESULT shapes cases=5 bad=0 +STATUS OK diff --git a/tools/cuda-ab/p2/expected/p2_shapes.txt b/tools/cuda-ab/p2/expected/p2_shapes.txt new file mode 100644 index 0000000..36e4e3d --- /dev/null +++ b/tools/cuda-ab/p2/expected/p2_shapes.txt @@ -0,0 +1,7 @@ +RESULT shapes case=1 n=1 bad=0 +RESULT shapes case=2 n=1013 bad=0 +RESULT shapes case=3 n=1000 bad=0 +RESULT shapes case=4 n=800 bad=0 +RESULT shapes case=5 n=1536 bad=0 +RESULT shapes cases=5 bad=0 +STATUS OK diff --git a/tools/cuda-ab/p2/expected/p2_smem.full.txt b/tools/cuda-ab/p2/expected/p2_smem.full.txt new file mode 100644 index 0000000..48c8f60 --- /dev/null +++ b/tools/cuda-ab/p2/expected/p2_smem.full.txt @@ -0,0 +1,3 @@ +RESULT smem reduce n=4096 sum=8386560 bad=0 +RESULT smem gemm m=32 n=32 k=32 checksum=65410 bad=0 +STATUS OK diff --git a/tools/cuda-ab/p2/expected/p2_smem.txt b/tools/cuda-ab/p2/expected/p2_smem.txt new file mode 100644 index 0000000..48c8f60 --- /dev/null +++ b/tools/cuda-ab/p2/expected/p2_smem.txt @@ -0,0 +1,3 @@ +RESULT smem reduce n=4096 sum=8386560 bad=0 +RESULT smem gemm m=32 n=32 k=32 checksum=65410 bad=0 +STATUS OK diff --git a/tools/cuda-ab/p2/expected/p2_streams.full.txt b/tools/cuda-ab/p2/expected/p2_streams.full.txt new file mode 100644 index 0000000..6c60041 --- /dev/null +++ b/tools/cuda-ab/p2/expected/p2_streams.full.txt @@ -0,0 +1,3 @@ +RESULT streams nstreams=3 launches=6 n=1024 bad=0 +RESULT streams events=3 bad=0 +STATUS OK diff --git a/tools/cuda-ab/p2/expected/p2_streams.txt b/tools/cuda-ab/p2/expected/p2_streams.txt new file mode 100644 index 0000000..6c60041 --- /dev/null +++ b/tools/cuda-ab/p2/expected/p2_streams.txt @@ -0,0 +1,3 @@ +RESULT streams nstreams=3 launches=6 n=1024 bad=0 +RESULT streams events=3 bad=0 +STATUS OK -- cgit v1.2.3