From 5d9d019b2c7ca3dc59bfbb44b3169ee5cd71dc79 Mon Sep 17 00:00:00 2001 From: Anthony Barbier Date: Fri, 26 Jan 2018 16:38:07 +0000 Subject: COMPMID-863: Only output (end-start) for OpenCL timers Currently we output an array of timestamps: queued, submitted, start, end This patch instead only output end-start (i.e the time it took to execute the kernel on the GPU) Change-Id: Ic3c2b68128f6acd6bb018b7b3ead0b69dd5aca59 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/117865 Reviewed-by: Pablo Tello Tested-by: Jenkins Reviewed-by: Kevin Petit --- tests/framework/instruments/OpenCLTimer.cpp | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'tests/framework/instruments/OpenCLTimer.cpp') diff --git a/tests/framework/instruments/OpenCLTimer.cpp b/tests/framework/instruments/OpenCLTimer.cpp index 3de953fbe7..9743015cec 100644 --- a/tests/framework/instruments/OpenCLTimer.cpp +++ b/tests/framework/instruments/OpenCLTimer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -142,20 +142,10 @@ Instrument::MeasurementsMap OpenCLTimer::measurements() const unsigned int kernel_number = 0; for(auto kernel : kernels) { - //cl_int status = kernel.event.getInfo((); - cl_ulong queued = kernel.event.getProfilingInfo(); - cl_ulong submit = kernel.event.getProfilingInfo(); - cl_ulong start = kernel.event.getProfilingInfo(); - cl_ulong end = kernel.event.getProfilingInfo(); + cl_ulong start = kernel.event.getProfilingInfo(); + cl_ulong end = kernel.event.getProfilingInfo(); - std::list raw_data = - { - "queued", support::cpp11::to_string(queued), - "submit", support::cpp11::to_string(submit), - "start", support::cpp11::to_string(start), - "end", support::cpp11::to_string(end), - }; - measurements.emplace(kernel.name + " #" + support::cpp11::to_string(kernel_number++), Measurement((end - start) / _scale_factor, _unit, raw_data)); + measurements.emplace(kernel.name + " #" + support::cpp11::to_string(kernel_number++), Measurement((end - start) / _scale_factor, _unit)); } return measurements; -- cgit v1.2.1