diff options
author | Vidhya Sudhan Loganathan <vidhyasudhan.loganathan@arm.com> | 2019-02-07 11:14:42 +0000 |
---|---|---|
committer | VidhyaSudhan Loganathan <vidhyasudhan.loganathan@arm.com> | 2019-02-12 14:02:47 +0000 |
commit | ca65af3542134841b79b94060195fd9a65224d6a (patch) | |
tree | b8fce60e6bbd7d4dca300fe90650ea3280186984 /tests | |
parent | 581c898aa5612e60392e3b785d1ac216ce7a4650 (diff) | |
download | ComputeLibrary-ca65af3542134841b79b94060195fd9a65224d6a.tar.gz |
COMPMID-1919: Opencl - Tuning with Instrumentation does not work
Change-Id: Iee6a07d5bf6a35af04071865682bcc4a615c14f9
Signed-off-by: Vidhya Sudhan Loganathan <vidhyasudhan.loganathan@arm.com>
Reviewed-on: https://review.mlplatform.org/638
Reviewed-by: Giuseppe Rossini <giuseppe.rossini@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Pablo Marquez <pablo.tello@arm.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/framework/instruments/OpenCLTimer.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/framework/instruments/OpenCLTimer.cpp b/tests/framework/instruments/OpenCLTimer.cpp index 2fd5714f65..ca859b6fd9 100644 --- a/tests/framework/instruments/OpenCLTimer.cpp +++ b/tests/framework/instruments/OpenCLTimer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 ARM Limited. + * Copyright (c) 2017-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -107,9 +107,6 @@ void OpenCLClock<output_timestamps>::test_start() { if(this->_timer_enabled) { - ARM_COMPUTE_ERROR_ON_MSG(event != nullptr, "Not supported"); - ARM_COMPUTE_UNUSED(event); - kernel_info info; cl::Kernel cpp_kernel(kernel, true); std::stringstream ss; @@ -127,6 +124,13 @@ void OpenCLClock<output_timestamps>::test_start() cl_int retval = this->_real_function(command_queue, kernel, work_dim, gwo, gws, lws, num_events_in_wait_list, event_wait_list, &tmp); info.event = tmp; this->_kernels.push_back(std::move(info)); + + if(event != nullptr) + { + //return cl_event from the intercepted call + clRetainEvent(tmp); + *event = tmp; + } return retval; } else |