"""Phase-0 compute gate (brain wiki/jepa-fx/facts/autoresearch-integration-phase1): PyTorch cu130 must see the koala Blackwell GPU and compute before any experiment. python scripts/check_gpu.py # exits 0 if the GPU is usable, 1 otherwise Note: koala shares this 12GB card with the llama-swap LLM stack. The autoresearch agent should run on iguana/berget models so koala's GPU stays free for train.py. """ import sys import torch print("torch", torch.__version__) if not torch.cuda.is_available(): print("CUDA NOT AVAILABLE — gate BLOCKED") sys.exit(1) print("device:", torch.cuda.get_device_name(0)) print("capability: sm_%d%d" % torch.cuda.get_device_capability(0)) x = torch.randn(2000, 2000, device="cuda") (x @ x).sum().item() torch.cuda.synchronize() print("GPU matmul OK — Phase-0 compute gate GREEN")