From a88ec56097beeec72c44c05e2caf142bb53e1ab8 Mon Sep 17 00:00:00 2001 From: Yingjie Wang Date: Mon, 14 Sep 2026 19:15:56 -0400 Subject: [PATCH] Fix: Honor OMP_DYNAMIC and env binary hash in replay runner Pin OMP_DYNAMIC=FALSE so thread counts stay deterministic, record it in the command line, and locate the binary hash correctly when the command is wrapped in env with inline assignments. --- benchmarks/hip_psf_replay_2026-09-07/run.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/benchmarks/hip_psf_replay_2026-09-07/run.py b/benchmarks/hip_psf_replay_2026-09-07/run.py index 773dcd4..0e5e90b 100644 --- a/benchmarks/hip_psf_replay_2026-09-07/run.py +++ b/benchmarks/hip_psf_replay_2026-09-07/run.py @@ -21,12 +21,18 @@ def run(name, command, seconds=45): logfile = Path(__file__).parent / (name + '.log') if logfile.exists(): raise RuntimeError(f'refusing to overwrite {logfile}') - env = dict(os.environ, OMP_NUM_THREADS='16') + env = dict(os.environ, OMP_NUM_THREADS='16', OMP_DYNAMIC='FALSE') with logfile.open('x') as out: - out.write('COMMAND OMP_NUM_THREADS=16 ' + shlex.join(command) + '\n') + out.write('COMMAND OMP_NUM_THREADS=16 OMP_DYNAMIC=FALSE ' + + shlex.join(command) + '\n') out.write(f'TIMEOUT {seconds}s\n') out.write('GIT ' + subprocess.check_output(['git','rev-parse','HEAD'],cwd=root,text=True)) - binary = Path(command[0]) + binary_index = 0 + if command[0] == 'env': + binary_index = 1 + while binary_index < len(command) and '=' in command[binary_index]: + binary_index += 1 + binary = Path(command[binary_index]) if binary_index < len(command) else Path() if binary.is_file(): out.write('BINARY_SHA256 ' + hashlib.sha256(binary.read_bytes()).hexdigest() + '\n') out.flush()