"""Serial pinned baseline/candidate helper diagnostic; existing CUDA environment only.""" import argparse from pathlib import Path import subprocess import sys from prepare import HERE, REPO, materialize, verify_candidate def main(): parser = argparse.ArgumentParser(description=__doc__) parser.add_argument("--repo", type=Path, default=REPO) parser.add_argument("--device", type=int, default=0) parser.add_argument("--run-gpu", action="store_true") parser.add_argument("--output-dir", type=Path, required=True) args = parser.parse_args() if not args.run_gpu: parser.error("Explicit --run-gpu required; authorized GPU executor only") output = args.output_dir.resolve() output.mkdir(parents=True, exist_ok=False) candidate = materialize(args.repo.resolve(), output / "candidate") verify_candidate(candidate) for mode in ("baseline", "patched"): subprocess.run( [ sys.executable, str(HERE / "gpu_probe.py"), "--root", str(candidate / mode), "--device", str(args.device), "--run-gpu", "--output", str(output / (mode + ".json")), ], check=True, ) print( "Both raw helper probes completed; this is not solver or turbulence acceptance." ) if __name__ == "__main__": main()