From df910e4336b7fabfda746f1421bb51ae7fc835b2 Mon Sep 17 00:00:00 2001 From: Mathias Date: Tue, 23 Jun 2026 16:43:01 +0200 Subject: [PATCH] =?UTF-8?q?chore(phase0):=20reproducible=20compute=20gate?= =?UTF-8?q?=20=E2=80=94=20torch=20cu130=20+=20GPU=20smoke=20test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit scripts/check_gpu.py verifies PyTorch cu130 sees the koala Blackwell GPU (sm_120) and computes — the Phase-0 prerequisite before any autoresearch experiment. Verified green: torch 2.12.1+cu130, RTX 5070, GPU matmul OK. Note: koala GPU is shared with the llama-swap LLM stack — run the autoresearch agent on iguana/berget so the card stays free for train.py. Co-Authored-By: Claude Opus 4.8 (1M context) --- .gitignore | 3 +++ requirements.txt | 6 ++++++ scripts/check_gpu.py | 21 +++++++++++++++++++++ 3 files changed, 30 insertions(+) create mode 100644 requirements.txt create mode 100644 scripts/check_gpu.py diff --git a/.gitignore b/.gitignore index 902b7e7..255061a 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,6 @@ go.work.sum # Project-specific bin/ *.templ.go + +# python venv (autoresearch loop) +.venv/ diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..6d2b8ef --- /dev/null +++ b/requirements.txt @@ -0,0 +1,6 @@ +# Python deps for the autoresearch loop (train.py + scripts). The Go side +# (data pipeline, eval harness) is separate. Install torch from the cu130 index: +# pip install torch --index-url https://download.pytorch.org/whl/cu130 +# pip install -r requirements.txt +# koala = Blackwell sm_120, driver R610; torch 2.12.1+cu130 verified 2026-06-23. +numpy>=2.0 diff --git a/scripts/check_gpu.py b/scripts/check_gpu.py new file mode 100644 index 0000000..bd3202c --- /dev/null +++ b/scripts/check_gpu.py @@ -0,0 +1,21 @@ +"""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")