aboutsummaryrefslogtreecommitdiff
path: root/tests/framework
diff options
context:
space:
mode:
authorAnthony Barbier <anthony.barbier@arm.com>2017-11-23 16:58:52 +0000
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:41:17 +0000
commite8895f8ba61c8f2a00e1207a51a9c991f3291d24 (patch)
tree94a2ef152fe9845a97dcbd926871c29d33c383b1 /tests/framework
parent857e32cbd355cade89cde6cdd78455b6c76bff3e (diff)
downloadComputeLibrary-e8895f8ba61c8f2a00e1207a51a9c991f3291d24.tar.gz
COMPMID-694: merge opencl_timer flag with the opencl flag
Is there any reason why we might have OpenCL enabled but wouldn't want to make the opencl_timer instrument available ? Change-Id: I946d643028fc394a607478415e4f84c4e8fa5bc4 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/110466 Tested-by: BSG Visual Compute Jenkins server to access repositories on http://mpd-gerrit.cambridge.arm.com <bsgcomp@arm.com> Reviewed-by: Kevin Petit <kevin.petit@arm.com> Reviewed-by: Ioan-Cristian Szabo <ioan-cristian.szabo@arm.com> Reviewed-by: Michalis Spyrou <michalis.spyrou@arm.com> Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com> Reviewed-by: Giorgio Arena <giorgio.arena@arm.com>
Diffstat (limited to 'tests/framework')
-rw-r--r--tests/framework/Framework.cpp4
-rw-r--r--tests/framework/SConscript8
2 files changed, 3 insertions, 9 deletions
diff --git a/tests/framework/Framework.cpp b/tests/framework/Framework.cpp
index 94afc87f00..d1fb28d501 100644
--- a/tests/framework/Framework.cpp
+++ b/tests/framework/Framework.cpp
@@ -61,12 +61,12 @@ Framework::Framework()
_available_instruments.emplace(std::pair<InstrumentType, ScaleFactor>(InstrumentType::MALI, ScaleFactor::SCALE_1K), Instrument::make_instrument<MaliCounter, ScaleFactor::SCALE_1K>);
_available_instruments.emplace(std::pair<InstrumentType, ScaleFactor>(InstrumentType::MALI, ScaleFactor::SCALE_1M), Instrument::make_instrument<MaliCounter, ScaleFactor::SCALE_1M>);
#endif /* MALI_ENABLED */
-#ifdef OPENCL_TIMER_ENABLED
+#ifdef ARM_COMPUTE_CL
_available_instruments.emplace(std::pair<InstrumentType, ScaleFactor>(InstrumentType::OPENCL_TIMER, ScaleFactor::NONE), Instrument::make_instrument<OpenCLTimer, ScaleFactor::NONE>);
_available_instruments.emplace(std::pair<InstrumentType, ScaleFactor>(InstrumentType::OPENCL_TIMER, ScaleFactor::TIME_US), Instrument::make_instrument<OpenCLTimer, ScaleFactor::TIME_US>);
_available_instruments.emplace(std::pair<InstrumentType, ScaleFactor>(InstrumentType::OPENCL_TIMER, ScaleFactor::TIME_MS), Instrument::make_instrument<OpenCLTimer, ScaleFactor::TIME_MS>);
_available_instruments.emplace(std::pair<InstrumentType, ScaleFactor>(InstrumentType::OPENCL_TIMER, ScaleFactor::TIME_S), Instrument::make_instrument<OpenCLTimer, ScaleFactor::TIME_S>);
-#endif /* OPENCL_TIMER_ENABLED */
+#endif /* ARM_COMPUTE_CL */
}
std::set<InstrumentsDescription> Framework::available_instruments() const
diff --git a/tests/framework/SConscript b/tests/framework/SConscript
index f4beaf85ce..e740828396 100644
--- a/tests/framework/SConscript
+++ b/tests/framework/SConscript
@@ -29,7 +29,6 @@ Import('vars')
variables = [
BoolVariable("pmu", "Enable PMU counters", False),
BoolVariable("mali", "Enable Mali hardware counters", False),
- BoolVariable("opencl_timer", "Enable OpenCL timers", False)
]
# We need a separate set of Variables for the Help message (Otherwise the global variables will get displayed twice)
@@ -68,14 +67,9 @@ if not framework_env['pmu']:
else:
framework_env.Append(CPPDEFINES = ['PMU_ENABLED'])
-if not framework_env['opencl_timer']:
+if not env['opencl']:
# Remove OpenCLTimer files
files = [f for f in files if "OpenCLTimer" not in os.path.basename(str(f))]
-else:
- if not framework_env["opencl"]:
- print("ERROR: You need opencl=1 to be able to use opencl_timer=1")
- Exit(1)
- framework_env.Append(CPPDEFINES = ['OPENCL_TIMER_ENABLED'])
if not framework_env['mali']:
# Remove MALI files