From 68e29dab4ada6e3457f066c3cf45acf51a204dd9 Mon Sep 17 00:00:00 2001 From: Giorgio Arena Date: Mon, 8 Feb 2021 16:31:10 +0000 Subject: Set up configure-only flag for validation. First trial with DepthwiseConvoltion This is needed in order to validate OpenCL kernel run-time compilation, without necessarily running or validating the kernels' execution - Add a run-time option for our validation suite to only configure one target function, without allocating, running or validating - Avoid to map/unmap tensors in CLAccessor if no allocation/validation is required - Create a new Fixture macro that accepts fixtures split into configure/allocate_and_run/reference, and do the last two only if required - Adjust fixture and validation files for the first trial function(s) (DepthwiseConvolutionLayer) Signed-off-by: Giorgio Arena Change-Id: I56fa1ce5ef4ac0c86bcabda686cc277ef5ec69c8 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5048 Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins Reviewed-by: Manuel Bottini Reviewed-by: Sang-Hoon Park --- tests/framework/Framework.h | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'tests/framework/Framework.h') diff --git a/tests/framework/Framework.h b/tests/framework/Framework.h index cf854f2351..4c2e86c6ea 100644 --- a/tests/framework/Framework.h +++ b/tests/framework/Framework.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2020 Arm Limited. + * Copyright (c) 2017-2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -63,6 +63,7 @@ struct FrameworkConfig int num_iterations{ 1 }; /**< Number of iterations per test. */ float cooldown_sec{ -1.f }; /**< Delay between tests in seconds. */ LogLevel log_level{ LogLevel::NONE }; /**< Verbosity of the output. */ + bool configure_only{ false }; /**< Only configure kernels */ }; /** Information about a test case. @@ -306,6 +307,21 @@ public: * @param[in] instr_info Instruments info to set */ void set_instruments_info(InstrumentsInfo instr_info); + /** Get the configure only flag + * + * @return The current configure only flag. + */ + bool configure_only() const; + /** Return whether the new fixture has been called + * + * @return The current new fixture call flag. + */ + bool new_fixture_call() const; + /** Set the new fixture call flag + * + * @param[in] val Value to set for the flag + */ + void set_new_fixture_call(bool val); private: Framework(); @@ -340,6 +356,8 @@ private: bool _stop_on_error{ false }; bool _error_on_missing_assets{ false }; std::vector _printers{}; + bool _configure_only{ false }; + bool _new_fixture_call{ false }; using create_function = std::unique_ptr(); std::map _available_instruments{}; -- cgit v1.2.1