From db8485ac24135f17e9882c76196924435abc064f Mon Sep 17 00:00:00 2001 From: Pablo Tello Date: Tue, 24 Sep 2019 11:03:47 +0100 Subject: COMPMID-2205: CL runtime context. CL Interfaces implemented. Concrete classes implemented. One test (ActivationLayer) ported to the new interface. Change-Id: I283808bec36ccfc2f13fe048c45cbbee698ce525 Signed-off-by: Pablo Tello Reviewed-on: https://review.mlplatform.org/c/1998 Tested-by: Arm Jenkins Reviewed-by: Georgios Pinitas Comments-Addressed: Arm Jenkins --- tests/validation/fixtures/ActivationLayerFixture.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'tests/validation/fixtures/ActivationLayerFixture.h') diff --git a/tests/validation/fixtures/ActivationLayerFixture.h b/tests/validation/fixtures/ActivationLayerFixture.h index 8fa74979a8..f6d43ddd89 100644 --- a/tests/validation/fixtures/ActivationLayerFixture.h +++ b/tests/validation/fixtures/ActivationLayerFixture.h @@ -29,9 +29,9 @@ #include "tests/AssetsLibrary.h" #include "tests/Globals.h" #include "tests/IAccessor.h" -#include "tests/ParametersLibrary.h" #include "tests/framework/Asserts.h" #include "tests/framework/Fixture.h" +#include "tests/framework/ParametersLibrary.h" #include "tests/validation/Helpers.h" #include "tests/validation/reference/ActivationLayer.h" @@ -47,6 +47,11 @@ template get_ctx()) + { + } + template void setup(TensorShape shape, bool in_place, ActivationLayerInfo::ActivationFunction function, float alpha_beta, DataType data_type, QuantizationInfo quantization_info) { @@ -90,12 +95,13 @@ protected: TensorType compute_target(const TensorShape &shape, ActivationLayerInfo info) { + auto ctx = parameters->get_ctx(); // Create tensors - TensorType src = create_tensor(shape, _data_type, 1, _input_quantization_info); - TensorType dst = create_tensor(shape, _data_type, 1, _output_quantization_info); + TensorType src = create_tensor(shape, _data_type, 1, _input_quantization_info, DataLayout::NCHW, ctx); + TensorType dst = create_tensor(shape, _data_type, 1, _output_quantization_info, DataLayout::NCHW, ctx); // Create and configure function - FunctionType act_layer(parameters->get_ctx()); + FunctionType act_layer(ctx); TensorType *dst_ptr = _in_place ? nullptr : &dst; -- cgit v1.2.1