"""Guarded, alternating comparisons against the preceding CUDA implementation.""" import subprocess import sys from pathlib import Path workspace = next(p for p in Path(__file__).resolve().parents if (p/'pyproject.toml').is_file()) sys.path.insert(0,str(workspace)) from tools import benchmark_adaptive_plane_search as b revision = subprocess.check_output(['git','rev-parse','HEAD'],text=True).strip() sources = {p:b._digest(Path(p)) for p in (*b.SOURCES,__file__)} inputs = b._verified_inputs(b.REPLAY) for label,stem in [('dense','compiled_dense_capture'),('full','compiled_full_capture'), ('default','compiled_queries')]: config=Path(f'examples/public_datasets/glim_versatile/online_continuous_time_{stem}_config.yaml') digest=b._digest(config) subprocess.run([sys.executable,'tools/benchmark_adaptive_plane_search.py', '--baseline-scope','cuda','--baseline-commit','a1ff874ab0dbc39c2dacc9607f40841c610997d7', '--candidate-query-backend','cuda','--baseline-query-backend','cuda', '--config',config.as_posix(),'--repetitions','5', '--output-dir',f'outputs/public-glim-cuda-associations-{label}-v3'],check=True) assert revision == subprocess.check_output(['git','rev-parse','HEAD'],text=True).strip() assert sources == {p:b._digest(Path(p)) for p in sources} assert inputs == b._verified_inputs(b.REPLAY) assert digest == b._digest(config) print('All three guarded association/replay cohorts complete.',flush=True)