tools/x264_perf_O3: init, for x264 O3 perf things

This commit is contained in:
2025-04-27 00:56:37 +08:00
parent cfedee84f9
commit dfabe0d12b

35
tools/x264_perf_O3.py Normal file
View File

@@ -0,0 +1,35 @@
from pathlib import Path
from subprocess import run
from speccpu import get_benchspec_dir, x264
from speccpu.flaglib.perf import record as recordflags
def main():
x264_run_id = "c56635a4-9f49-4d2b-be79-38d9e08097c5"
x264_outputroot = Path("/home/lyc/work-ts/local/specOutput") / x264_run_id
x264_dir = get_benchspec_dir(x264_outputroot) / "625.x264_s"
x264_run = x264_dir / "run" / "run_base_refspeed_mytest-m64.0000"
run(
[
"perf",
"record",
*recordflags(
[
str(x264_run / "x264_s_base.mytest-m64"),
*x264.specinvoke_args["ref"],
],
output=str(Path.cwd() / f"x264-{x264_run_id}perf"),
),
],
check=True,
cwd=x264_run,
)
if __name__ == "__main__":
main()