Files
leleka/scripts/decode-sm120/test_driver.sh
T
Pavlo RatushnyiandClaude Sonnet 5.5 75f166c9ba sm120 decode switch SIDE_MIXER (GDN part): gates and gate projection on side streams of the verify window graph (off by default until its gates pass)
Upstream STRATA_SIDE_MIXER=2, GDN half: each GDN layer's alpha/beta gates (gdn_alpha_beta) and gate projection (mmvq GdnGate) are issued on two side
streams that fork from the capture stream right after the q8_1 quantization (before the qkv projection) and join before the recurrence; no kernel changes,
only the dependency edges of the captured graph. OriginalCapture owns the side streams and their fork/join events (created before cuStreamBeginCapture
for a VerifierWindow capture when the switch is on, destroyed after the capture ended) and hands out the side stream from stream_handle() between
side_fork(i) and side_end(i). Not in a split (two-group) window, as upstream. The QSA half of upstream's switch (indexer chain, queries chain) is not ported.

Switch: policy.side_mixer, LELEKA_SM120_SIDE_MIXER=0|1, replay arm flags !side / !noside. Default OFF: no identity or timing result yet.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-29 01:52:15 +01:00

20 lines
1.0 KiB
Bash

#!/usr/bin/env bash
# Run cuda-driver unit tests of THIS worktree in WSL (no GPU needed for the window planner / seal tests).
# scripts/decode-sm120/test_driver.sh [cargo test filter...] run from Git Bash in the worktree
set -euo pipefail
root=$(git rev-parse --show-toplevel)
tar_win="$root/../wt-sm120-src.tar"
git -C "$root" -c core.autocrlf=false ls-files -co --exclude-standard -z | tar --force-local -C "$root" --null -T - -cf "$tar_win"
w=$(cygpath -m "$tar_win"); tar_wsl="/mnt/c${w#C:}"
wsl -d Ubuntu -e bash -lc "
set -e
source ~/.cargo/env
export PATH=\$HOME/cuda-toolkits/13.2.2/bin:\$HOME/.cargo/bin:/usr/local/bin:/usr/bin:/bin
rm -rf ~/sm120-src && mkdir -p ~/sm120-src && tar -xf '$tar_wsl' -C ~/sm120-src
cd ~/sm120-src
export CARGO_TARGET_DIR=\$HOME/sm120-target
nice -n 10 cargo test --locked --release -p leleka-cuda-driver --features 'cuda-driver ${SM120_FEATURES:-}' --lib -- $* > ~/sm120-test.log 2>&1 || true
"
rm -f "$tar_win"
wsl -d Ubuntu -e bash -lc "grep -E '^error|^test result|FAILED|panicked' -A8 ~/sm120-test.log | head -100"