#!/usr/bin/env bash # Compile and seal one sm120-decode asset with the project tooling (WSL; the tree is patched in place). # scripts/decode-sm120/seal.sh sm120_attn_daily (run from Git Bash in the worktree) # The asset must be in scripts/gpu-bringup/extra-seal-plan.json (group sm120-decode); its PTX in the tree must be the unsealed placeholder # (seal_pins.py refuses to overwrite a pinned PTX: run `scripts/decode-sm120/seal.sh NAME --reset` first when re-sealing). set -euo pipefail name=${1:?asset name, e.g. sm120_attn_daily} reset=${2:-} root=$(git rev-parse --show-toplevel) wsl -d Ubuntu -e bash -lc " set -e cd \$(wslpath -a '$root') TK=\$HOME/cuda-toolkits/13.2.2 OUT=\$HOME/sm120-seal/$name rm -rf \$OUT && mkdir -p \$OUT if [ '$reset' = --reset ]; then python3 scripts/decode-sm120/reset_pin.py $name; fi python3 scripts/gpu-bringup/compile_assets.py --toolkit \$TK --only $name --no-rope --out \$OUT 2>&1 | tail -4 python3 scripts/gpu-bringup/seal_pins.py --ptx-dir \$OUT --only $name --write --manifest-out \$OUT/SEALED-MANIFEST.json 2>&1 | grep -E 'REFUSED|touched|sm120|written|Error|error' | head "