aboutsummaryrefslogtreecommitdiff
path: root/tests/benchmark/fixtures
diff options
context:
space:
mode:
authorMichele Di Giorgio <michele.digiorgio@arm.com>2018-03-01 16:56:48 +0000
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:49:54 +0000
commit0cbb927ac309e332ac6e6f1ab9170f041f0138ab (patch)
tree102d50dec9f741f04b1126ae03e6e491dda2d3ba /tests/benchmark/fixtures
parent82b51482479951cf133c223eb81aae291cb4d590 (diff)
downloadComputeLibrary-0cbb927ac309e332ac6e6f1ab9170f041f0138ab.tar.gz
COMPMID-804: Add NHWC data format support for NEON batch normalisation
Change-Id: I04892e7be3f5aa58cd95917a4f90a6b4ffcf6efc Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/122897 Reviewed-by: Giorgio Arena <giorgio.arena@arm.com> Tested-by: Jenkins <bsgcomp@arm.com> Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'tests/benchmark/fixtures')
-rw-r--r--tests/benchmark/fixtures/BatchNormalizationLayerFixture.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/benchmark/fixtures/BatchNormalizationLayerFixture.h b/tests/benchmark/fixtures/BatchNormalizationLayerFixture.h
index c55bb2acc9..ae8f8a7af1 100644
--- a/tests/benchmark/fixtures/BatchNormalizationLayerFixture.h
+++ b/tests/benchmark/fixtures/BatchNormalizationLayerFixture.h
@@ -42,15 +42,19 @@ class BatchNormalizationLayerFixture : public framework::Fixture
{
public:
template <typename...>
- void setup(TensorShape tensor_shape, TensorShape param_shape, float epsilon, bool use_gamma, bool use_beta, ActivationLayerInfo act_info, DataType data_type, int batches)
+ void setup(TensorShape tensor_shape, TensorShape param_shape, float epsilon, bool use_gamma, bool use_beta, ActivationLayerInfo act_info, DataType data_type, DataLayout data_layout, int batches)
{
// Set batched in source and destination shapes
const unsigned int fixed_point_position = 4;
tensor_shape.set(tensor_shape.num_dimensions(), batches);
+ if(data_layout == DataLayout::NHWC)
+ {
+ permute(tensor_shape, PermutationVector(2U, 0U, 1U));
+ }
// Create tensors
- src = create_tensor<TensorType>(tensor_shape, data_type, 1, fixed_point_position);
- dst = create_tensor<TensorType>(tensor_shape, data_type, 1, fixed_point_position);
+ src = create_tensor<TensorType>(tensor_shape, data_type, 1, fixed_point_position, QuantizationInfo(), data_layout);
+ dst = create_tensor<TensorType>(tensor_shape, data_type, 1, fixed_point_position, QuantizationInfo(), data_layout);
mean = create_tensor<TensorType>(param_shape, data_type, 1, fixed_point_position);
variance = create_tensor<TensorType>(param_shape, data_type, 1, fixed_point_position);
beta = create_tensor<TensorType>(param_shape, data_type, 1, fixed_point_position);