diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2018-05-31 18:53:52 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:52:54 +0000 |
commit | df473eab0ab8a52e6b58e0f6442b39ba4c1d68ea (patch) | |
tree | 5c96fcc41cf079849b6f392bc266b82c43a4766b /tests/framework/Framework.cpp | |
parent | 087eaf67dc4be4234a7fcfc3b109c1e4f5e7dd5e (diff) | |
download | ComputeLibrary-df473eab0ab8a52e6b58e0f6442b39ba4c1d68ea.tar.gz |
COMPMID-1182: printf doesn't work
Change-Id: I013d57f6e2becbd6d2d7700ce5fbbeca670443c4
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/133735
Tested-by: Jenkins <bsgcomp@arm.com>
Reviewed-by: Pablo Tello <pablo.tello@arm.com>
Diffstat (limited to 'tests/framework/Framework.cpp')
-rw-r--r-- | tests/framework/Framework.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/tests/framework/Framework.cpp b/tests/framework/Framework.cpp index fd0afe9d7f..7e1f2934ff 100644 --- a/tests/framework/Framework.cpp +++ b/tests/framework/Framework.cpp @@ -534,12 +534,15 @@ bool Framework::run() // Every 5000 tests, reset the OpenCL context to release the allocated memory if((id_run_test % 5000) == 0) { - cl::Context::setDefault(cl::Context()); - CLScheduler::get().set_context(cl::Context()); - CLKernelLibrary::get().clear_programs_cache(); + auto ctx_properties = CLScheduler::get().context().getInfo<CL_CONTEXT_PROPERTIES>(nullptr); + auto queue_properties = CLScheduler::get().queue().getInfo<CL_QUEUE_PROPERTIES>(nullptr); + + cl::Context new_ctx = cl::Context(CL_DEVICE_TYPE_DEFAULT, ctx_properties.data()); + cl::CommandQueue new_queue = cl::CommandQueue(new_ctx, cl::Device::getDefault(), queue_properties); - cl::Context::setDefault(cl::Context(CL_DEVICE_TYPE_DEFAULT)); - CLScheduler::get().set_context(cl::Context::getDefault()); + CLKernelLibrary::get().clear_programs_cache(); + CLScheduler::get().set_context(new_ctx); + CLScheduler::get().set_queue(new_queue); } #endif // ARM_COMPUTE_CL run_test(test_info, *test_factory); |