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 | |
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')
-rw-r--r-- | tests/framework/Framework.cpp | 13 | ||||
-rw-r--r-- | tests/validation/CL/FixedPoint/FixedPointTarget.h | 4 |
2 files changed, 10 insertions, 7 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); diff --git a/tests/validation/CL/FixedPoint/FixedPointTarget.h b/tests/validation/CL/FixedPoint/FixedPointTarget.h index 38473545d9..920bd374d3 100644 --- a/tests/validation/CL/FixedPoint/FixedPointTarget.h +++ b/tests/validation/CL/FixedPoint/FixedPointTarget.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -110,7 +110,7 @@ void compute_target_impl(const TensorShape &shape, DataType dt, FixedPointOp op, sources.push_back(fixed_point_operation_kernel); // Create program - ::cl::Program program(sources); + ::cl::Program program(CLScheduler::get().context(), sources); // Build program program.build(build_opts.c_str()); |