aboutsummaryrefslogtreecommitdiff
path: root/tests/validation/fixtures/PermuteFixture.h
diff options
context:
space:
mode:
authorPablo Tello <pablo.tello@arm.com>2018-12-05 17:36:30 +0000
committerGeorgios Pinitas <georgios.pinitas@arm.com>2018-12-12 18:48:48 +0000
commit35767bc09f21050a9767a91b086b327afc928a81 (patch)
tree0b4b3dad94566ae3c52f847103b2577ada5dd06d /tests/validation/fixtures/PermuteFixture.h
parent1f8db2be160718979d38e3671a135d22e83cc5c2 (diff)
downloadComputeLibrary-35767bc09f21050a9767a91b086b327afc928a81.tar.gz
COMPMID-1697: NEPermute extended support for more cases.
Regardless the input data layout NEPermute function has been added support for the all the permutations of 4d tensors Added corresponding validation tests. Change-Id: I0f8f20c2c3716e908a18a59783be53efab80ef5b Reviewed-on: https://review.mlplatform.org/367 Reviewed-by: Giuseppe Rossini <giuseppe.rossini@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'tests/validation/fixtures/PermuteFixture.h')
-rw-r--r--tests/validation/fixtures/PermuteFixture.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/validation/fixtures/PermuteFixture.h b/tests/validation/fixtures/PermuteFixture.h
index 3aae384706..92d01a5654 100644
--- a/tests/validation/fixtures/PermuteFixture.h
+++ b/tests/validation/fixtures/PermuteFixture.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017 ARM Limited.
+ * Copyright (c) 2017-2018 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -46,10 +46,10 @@ class PermuteValidationFixture : public framework::Fixture
{
public:
template <typename...>
- void setup(TensorShape shape, PermutationVector perm, DataType data_type)
+ void setup(TensorShape input_shape, DataLayout input_layout, PermutationVector perm, DataType data_type)
{
- _target = compute_target(shape, data_type, perm);
- _reference = compute_reference(shape, data_type, perm);
+ _target = compute_target(input_shape, input_layout, data_type, perm);
+ _reference = compute_reference(input_shape, data_type, perm);
}
protected:
@@ -59,14 +59,14 @@ protected:
library->fill_tensor_uniform(tensor, 0);
}
- TensorType compute_target(const TensorShape &shape, DataType data_type, PermutationVector perm)
+ TensorType compute_target(const TensorShape &input_shape, DataLayout input_layout, DataType data_type, PermutationVector perm)
{
// Permute shapes
- TensorShape output_shape = shape;
+ TensorShape output_shape = input_shape;
permute(output_shape, perm);
// Create tensors
- TensorType src = create_tensor<TensorType>(shape, data_type);
+ TensorType src = create_tensor<TensorType>(input_shape, data_type);
TensorType dst = create_tensor<TensorType>(output_shape, data_type);
// Create and configure function
@@ -92,10 +92,10 @@ protected:
return dst;
}
- SimpleTensor<T> compute_reference(const TensorShape &shape, DataType data_type, PermutationVector perm)
+ SimpleTensor<T> compute_reference(const TensorShape &input_shape, DataType data_type, PermutationVector perm)
{
// Create reference
- SimpleTensor<T> src{ shape, data_type };
+ SimpleTensor<T> src{ input_shape, data_type };
// Fill reference
fill(src);