Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions benchkit/benches/speccpu2017/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,14 @@ def fetch(
fuseiso_umount(ctx, mnt_dir)

# cp config
# TODO: support ARM
arch = ctx.platform.architecture
if arch != "x86_64":
raise NotImplementedError(f"SPEC CPU 2017 is only supported on x86_64 (got {arch})")
if arch not in ["x86_64", "aarch64", "riscv64"]:
raise NotImplementedError(
f"SPEC CPU 2017 is only supported on x86_64 and aarch64 (got {arch})"
)

ctx.exec(
argv=["cp", "config/Example-gcc-linux-x86.cfg", "config/config-gcc-linux-x86.cfg"],
argv=["cp", f"config/Example-gcc-linux-{arch}.cfg", "config/config-benchkit.cfg"],
cwd=spec_dir,
)

Expand All @@ -172,7 +173,7 @@ def fetch(
edits=[
(
's#"/opt/rh/devtoolset-9/root/usr"#"/usr"#',
Path("config/config-gcc-linux-x86.cfg"),
Path("config/config-benchkit.cfg"),
),
],
)
Expand Down Expand Up @@ -222,7 +223,7 @@ def build(
(
"source shrc && "
f"runcpu --fake --loose --size {size} "
f"--tune base --config config-gcc-linux-x86.cfg {bench_name}"
f"--tune base --config config-benchkit.cfg {bench_name}"
),
],
cwd=src_dir,
Expand Down Expand Up @@ -252,7 +253,7 @@ def build(
(
"source shrc && "
f"runcpu --loose --size {size} "
f"--tune base --config config-gcc-linux-x86.cfg {bench_name}"
f"--tune base --config config-benchkit.cfg {bench_name}"
),
],
cwd=src_dir,
Expand Down
15 changes: 8 additions & 7 deletions benchkit/benches/speccpu2026/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,14 @@ def fetch(
fuseiso_umount(ctx, mnt_dir)

# cp config
# TODO: support ARM
arch = ctx.platform.architecture
if arch != "x86_64":
raise NotImplementedError(f"SPEC CPU 2026 is only supported on x86_64 (got {arch})")
if arch not in ["x86_64", "aarch64", "riscv64"]:
raise NotImplementedError(
f"SPEC CPU 2017 is only supported on x86_64 and aarch64 (got {arch})"
)

ctx.exec(
argv=["cp", "config/Example-gcc-linux-x86.cfg", "config/config-gcc-linux-x86.cfg"],
argv=["cp", f"config/Example-gcc-linux-{arch}.cfg", "config/config-benchkit.cfg"],
cwd=spec_dir,
)

Expand All @@ -172,7 +173,7 @@ def fetch(
edits=[
(
's#"/opt/rh/gcc-toolset-15/root/usr"#"/usr"#',
Path("config/config-gcc-linux-x86.cfg"),
Path("config/config-benchkit.cfg"),
),
],
)
Expand Down Expand Up @@ -222,7 +223,7 @@ def build(
(
"source shrc && "
f"runcpu --fake --loose --size {size} "
f"--tune base --config config-gcc-linux-x86.cfg {bench_name}"
f"--tune base --config config-benchkit.cfg {bench_name}"
),
],
cwd=src_dir,
Expand Down Expand Up @@ -252,7 +253,7 @@ def build(
(
"source shrc && "
f"runcpu --loose --size {size} "
f"--tune base --config config-gcc-linux-x86.cfg {bench_name}"
f"--tune base --config config-benchkit.cfg {bench_name}"
),
],
cwd=src_dir,
Expand Down