Files
GR-raytracing/benchmarks/hip_psf_replay_2026-09-07/metadata.py
T
wyj 11e703e33d Doc: record bounded HIP PSF replay results and provenance
Archive fixed catalog subsets and captured events, manifests, reproducible commands, raw timing and regression logs, and device resource evidence. Document distribution-dependent tile reduction gains and independent indexed producer throughput.

Update the GPU plan and renderer design while retaining the production atomic path. Preserve historical measurement metadata and exclude generated Python bytecode.
2026-09-11 16:45:48 -04:00

19 lines
1.5 KiB
Python

#!/usr/bin/env python3
from pathlib import Path
import hashlib,json,subprocess
base=Path(__file__).resolve().parent
repo=base.parents[1]
with (base/'metadata.log').open('w') as out:
for cmd in [['git','rev-parse','HEAD'],['git','status','--short'],['uname','-a'],['lscpu'],['hipcc','--version']]:
out.write('COMMAND '+repr(cmd)+'\n');out.flush()
subprocess.run(cmd,cwd=repo,stdout=out,stderr=subprocess.STDOUT,check=True)
out.write('Benchmark OMP_NUM_THREADS=16; CPU replay reference serial; production mixed test OMP_NUM_THREADS=4.\n')
out.write('One HIP device, device 0; selected gfx1201. GPU identity logged per replay.\n')
out.write('Cache rebuilt each process, immutable weights, 64 phase intervals, radius 47, FWHM 2.7 beta 4.5 tail 1e-8.\n')
out.write('No page-cache dropping; repeated warm filesystem inputs; no runtime profiler run.\n')
paths=[repo/'Makefile']+list((repo/'src').glob('*'))+[repo/'tests'/name for name in ['capture_psf.c','replay_psf.hip','make_psf_fixture.c','test_psf_capture.py','test_hip_renderer.py']]
paths += [repo/'build/Release'/name for name in ['replay_psf','capture_psf','make_psf_fixture','test_hip_psf','minkowski_sky','minkowski_sky_hip','schwarzschild_sky','schwarzschild_sky_hip']]
paths += [repo/'output/lens/schwarzschild_galactic_center_R100_45deg_16_4_4k_.grlens']
manifest={str(p.relative_to(repo)):{'bytes':p.stat().st_size,'sha256':hashlib.sha256(p.read_bytes()).hexdigest()} for p in paths if p.is_file()}
(base/'source_binary_manifest.json').write_text(json.dumps(manifest,indent=2)+'\n')