1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-03-22 02:29:10 +00:00

Merge pull request #57 from ep1cman/freqsweep

Freqsweep: Added the ability to specify workload/runtime parameters
This commit is contained in:
setrofim 2015-11-18 11:29:39 +00:00
commit 1d12e6a8b0

View File

@ -14,8 +14,10 @@
# pylint: disable=access-member-before-definition,attribute-defined-outside-init # pylint: disable=access-member-before-definition,attribute-defined-outside-init
import os import os
from collections import OrderedDict
from wlauto import Instrument, Parameter from wlauto import Instrument, Parameter
from wlauto.exceptions import ConfigError, InstrumentError from wlauto.exceptions import ConfigError, InstrumentError
from wlauto.utils.misc import merge_dicts
from wlauto.utils.types import caseless_string from wlauto.utils.types import caseless_string
@ -129,6 +131,14 @@ class FreqSweep(Instrument):
for old_spec in old_specs: for old_spec in old_specs:
for freq in sweep_spec['frequencies']: for freq in sweep_spec['frequencies']:
spec = old_spec.copy() spec = old_spec.copy()
if 'runtime_params' in sweep_spec:
spec.runtime_parameters = merge_dicts(spec.runtime_parameters,
sweep_spec['runtime_params'],
dict_type=OrderedDict)
if 'workload_params' in sweep_spec:
spec.workload_parameters = merge_dicts(spec.runtime_parameters,
sweep_spec['workload_params'],
dict_type=OrderedDict)
spec.runtime_parameters['{}_governor'.format(sweep_spec['cluster'])] = "userspace" spec.runtime_parameters['{}_governor'.format(sweep_spec['cluster'])] = "userspace"
spec.runtime_parameters['{}_frequency'.format(sweep_spec['cluster'])] = freq spec.runtime_parameters['{}_frequency'.format(sweep_spec['cluster'])] = freq
spec.id = '{}_{}_{}'.format(spec.id, sweep_spec['label'], freq) spec.id = '{}_{}_{}'.format(spec.id, sweep_spec['label'], freq)