aboutsummaryrefslogtreecommitdiff
path: root/tests/validation/fixtures/ActivationLayerFixture.h
diff options
context:
space:
mode:
authorPablo Tello <pablo.tello@arm.com>2019-09-24 11:03:47 +0100
committerPablo Marquez <pablo.tello@arm.com>2019-10-15 14:05:55 +0000
commitdb8485ac24135f17e9882c76196924435abc064f (patch)
treedfe4ff6a50012ac93c6b1cf3fb29c099a7592522 /tests/validation/fixtures/ActivationLayerFixture.h
parenta046e164b96a8441b2fa14ef578f7db46a0e97da (diff)
downloadComputeLibrary-db8485ac24135f17e9882c76196924435abc064f.tar.gz
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 <pablo.tello@arm.com> Reviewed-on: https://review.mlplatform.org/c/1998 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'tests/validation/fixtures/ActivationLayerFixture.h')
-rw-r--r--tests/validation/fixtures/ActivationLayerFixture.h14
1 files changed, 10 insertions, 4 deletions
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 <typename TensorType, typename AccessorType, typename FunctionType, typ
class ActivationValidationGenericFixture : public framework::Fixture
{
public:
+ ActivationValidationGenericFixture()
+ : _target(parameters->get_ctx<TensorType>())
+ {
+ }
+
template <typename...>
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<TensorType>();
// Create tensors
- TensorType src = create_tensor<TensorType>(shape, _data_type, 1, _input_quantization_info);
- TensorType dst = create_tensor<TensorType>(shape, _data_type, 1, _output_quantization_info);
+ TensorType src = create_tensor<TensorType>(shape, _data_type, 1, _input_quantization_info, DataLayout::NCHW, ctx);
+ TensorType dst = create_tensor<TensorType>(shape, _data_type, 1, _output_quantization_info, DataLayout::NCHW, ctx);
// Create and configure function
- FunctionType act_layer(parameters->get_ctx<TensorType>());
+ FunctionType act_layer(ctx);
TensorType *dst_ptr = _in_place ? nullptr : &dst;