Initial RPS CUDA implementation

This commit is contained in:
Skeleton bootstrap 2026-11-26 09:07:21 +03:00
commit 8d583036d0
33 changed files with 2968 additions and 0 deletions

18
scripts/benchmark.py Normal file
View file

@ -0,0 +1,18 @@
"""Measure all six configurations specified in §8.5 on the GPU host."""
import json
import subprocess
import sys
import tempfile
from pathlib import Path
root = Path(__file__).resolve().parent.parent
config = json.loads((root / "config.example.json").read_bytes())
binary = Path(sys.argv[1]).resolve() if len(sys.argv) > 1 else root / "build/rps-server"
for width, height in ((1024, 48), (4096, 3072), (8192, 6144)):
for n in (4, 8):
config["simulation"].update(width=width, height=height, neighbors=n)
config["view"]["roi"].update(width=width, height=height)
with tempfile.NamedTemporaryFile(mode="w", suffix=".json") as f:
json.dump(config, f)
f.flush()
subprocess.run([binary, "--benchmark", f.name], check=True)