From 2957d63e2f97b795f197bba41d3c3290a0d6b4a2 Mon Sep 17 00:00:00 2001 From: Sebastian Goscik Date: Wed, 18 Nov 2015 11:15:36 +0000 Subject: [PATCH] Freqsweep: Added the ability to specify workload/runtime parameters E.g: sweeps: - cluster: a15 runtime_params: a15_cores: 1 --- wlauto/instrumentation/freqsweep/__init__.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/wlauto/instrumentation/freqsweep/__init__.py b/wlauto/instrumentation/freqsweep/__init__.py index a2c52655..43b2899c 100755 --- a/wlauto/instrumentation/freqsweep/__init__.py +++ b/wlauto/instrumentation/freqsweep/__init__.py @@ -14,8 +14,10 @@ # pylint: disable=access-member-before-definition,attribute-defined-outside-init import os +from collections import OrderedDict from wlauto import Instrument, Parameter from wlauto.exceptions import ConfigError, InstrumentError +from wlauto.utils.misc import merge_dicts from wlauto.utils.types import caseless_string @@ -129,6 +131,14 @@ class FreqSweep(Instrument): for old_spec in old_specs: for freq in sweep_spec['frequencies']: 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['{}_frequency'.format(sweep_spec['cluster'])] = freq spec.id = '{}_{}_{}'.format(spec.id, sweep_spec['label'], freq)