Initial RPS CUDA implementation
This commit is contained in:
commit
8d583036d0
33 changed files with 2968 additions and 0 deletions
18
scripts/benchmark.py
Normal file
18
scripts/benchmark.py
Normal 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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue