aboutsummaryrefslogtreecommitdiff
path: root/tests/framework
diff options
context:
space:
mode:
authorAnthony Barbier <anthony.barbier@arm.com>2018-11-20 16:54:42 +0000
committerAnthony Barbier <Anthony.barbier@arm.com>2018-11-20 17:44:06 +0000
commit1e1bef12cc6b616290290ac715c59cb38234b9bf (patch)
treeec2db93de204795d24118b838d56b0fce9300304 /tests/framework
parent38d93bdda73f9b1024c6b4b834b382f7f25aae19 (diff)
downloadComputeLibrary-1e1bef12cc6b616290290ac715c59cb38234b9bf.tar.gz
COMPMID-1777: Output queued and flushed timestamps too
Change-Id: I376d29aa6ec1b52d978c4d49de63c6713d6036e3
Diffstat (limited to 'tests/framework')
-rw-r--r--tests/framework/instruments/OpenCLTimer.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/framework/instruments/OpenCLTimer.cpp b/tests/framework/instruments/OpenCLTimer.cpp
index fefc891d91..2fd5714f65 100644
--- a/tests/framework/instruments/OpenCLTimer.cpp
+++ b/tests/framework/instruments/OpenCLTimer.cpp
@@ -183,7 +183,9 @@ Instrument::MeasurementsMap OpenCLClock<output_timestamps>::measurements() const
unsigned int kernel_number = 0;
for(auto kernel : _kernels)
{
- cl_ulong start, end;
+ cl_ulong queued, flushed, start, end;
+ kernel.event.getProfilingInfo(CL_PROFILING_COMMAND_QUEUED, &queued);
+ kernel.event.getProfilingInfo(CL_PROFILING_COMMAND_SUBMIT, &flushed);
kernel.event.getProfilingInfo(CL_PROFILING_COMMAND_START, &start);
kernel.event.getProfilingInfo(CL_PROFILING_COMMAND_END, &end);
std::string name = kernel.name + " #" + support::cpp11::to_string(kernel_number++);
@@ -191,6 +193,8 @@ Instrument::MeasurementsMap OpenCLClock<output_timestamps>::measurements() const
if(output_timestamps)
{
measurements.emplace("[start]" + name, Measurement(start / static_cast<cl_ulong>(_scale_factor), _unit));
+ measurements.emplace("[queued]" + name, Measurement(queued / static_cast<cl_ulong>(_scale_factor), _unit));
+ measurements.emplace("[flushed]" + name, Measurement(flushed / static_cast<cl_ulong>(_scale_factor), _unit));
measurements.emplace("[end]" + name, Measurement(end / static_cast<cl_ulong>(_scale_factor), _unit));
}
else