Skip to content

Commit

Permalink
Record number of copies ran in Spec17 and adjust behavior of spec17_c…
Browse files Browse the repository at this point in the history
…opies to align with flag documentation.

PiperOrigin-RevId: 562060920
  • Loading branch information
yuyantingzero authored and copybara-github committed Sep 7, 2023
1 parent 68bf4ae commit 0dc29c0
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions perfkitbenchmarker/linux_benchmarks/speccpu2017_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,13 +272,8 @@ def _Run(vm):
cmd += '--rebuild '

version_specific_parameters = []
# rate runs require 2 GB minimum system main memory per copy,
# not including os overhead. Refer to:
# https://www.spec.org/cpu2017/Docs/system-requirements.html#memory
copies = min(vm.NumCpusForBenchmark(),
vm.total_free_memory_kb // (2 * KB_TO_GB_MULTIPLIER))
version_specific_parameters.append(' --copies=%s ' %
(FLAGS.spec17_copies or copies))
copies = FLAGS.spec17_copies or vm.NumCpusForBenchmark()
version_specific_parameters.append(f' --copies={copies} ')
version_specific_parameters.append(
' --threads=%s ' % (FLAGS.spec17_threads or vm.NumCpusForBenchmark()))
version_specific_parameters.append(
Expand Down Expand Up @@ -336,6 +331,7 @@ def _Run(vm):
item.metadata['vm_name'] = vm.name
item.metadata['spec17_gcc_flags'] = FLAGS.spec17_gcc_flags
item.metadata['spec17_numa_bind_config'] = FLAGS.spec17_numa_bind_config
item.metadata['spec17_copies'] = copies

return samples

Expand Down

0 comments on commit 0dc29c0

Please sign in to comment.