1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-01-31 10:11:17 +00:00

spec2000: fix cpumask for generic

spec2000 expects binaries to be optimised for particular cores and uses
Device's core_names to figure out which cores the benchmark should run
on.

There is one special case, which is "generic", which is not optimised
for a particular uarch. cpumask for this was resolved the same way,
failing the lookup, resulting in the invalid mask 0x0.

To fix this, "generic" is now handled by specifying the mask for all
available CPUs.
This commit is contained in:
Sergei Trofimov 2017-08-22 11:53:48 +01:00
parent 2f683e59d2
commit cdc7c96cdf

View File

@ -15,6 +15,7 @@
#pylint: disable=E1101,W0201
import operator
import os
import re
import string
@ -278,6 +279,10 @@ class Spec2000(Workload):
commandspec = CommandSpec()
commandspec.command = bench.command_template.substitute({'binary': binary})
commandspec.datadir = datadir
if cpu == 'generic':
all_cpus = reduce(operator.add, cpumap.values())
commandspec.cpumask = get_cpu_mask(all_cpus)
else:
commandspec.cpumask = get_cpu_mask(cpumap[cpu])
cmdspecs.append(commandspec)
return cmdspecs