aboutsummaryrefslogtreecommitdiff
path: root/tests/validation/fixtures
diff options
context:
space:
mode:
authorGian Marco Iodice <gianmarco.iodice@arm.com>2018-09-13 11:51:56 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:54:54 +0000
commit8bab0ee5f44a0e2cfe60d4d9e040a2f5ae4ef9b1 (patch)
tree7659331b8f28ef85d0f59a8cca22384b25006e58 /tests/validation/fixtures
parent651540f5fc0529589867fc834f8c206c7e7a60c1 (diff)
downloadComputeLibrary-8bab0ee5f44a0e2cfe60d4d9e040a2f5ae4ef9b1.tar.gz
COMPMID-1584 - Collapse batch size in CLChannelShuffleLayerKernel
COMPMID-1589 - Add support for NHWC to CLChannelShuffleLayerKernel Change-Id: I13936a5cd1659d01fdb10b346e90f0d72d79f1f1 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/148475 Tested-by: bsgcomp <bsgcomp@arm.com> Reviewed-by: Michele DiGiorgio <michele.digiorgio@arm.com>
Diffstat (limited to 'tests/validation/fixtures')
-rw-r--r--tests/validation/fixtures/ChannelShuffleLayerFixture.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/tests/validation/fixtures/ChannelShuffleLayerFixture.h b/tests/validation/fixtures/ChannelShuffleLayerFixture.h
index 9746480829..c9aae2dc17 100644
--- a/tests/validation/fixtures/ChannelShuffleLayerFixture.h
+++ b/tests/validation/fixtures/ChannelShuffleLayerFixture.h
@@ -46,9 +46,9 @@ class ChannelShuffleLayerValidationFixture : public framework::Fixture
{
public:
template <typename...>
- void setup(TensorShape shape, unsigned int num_groups, DataType data_type)
+ void setup(TensorShape shape, unsigned int num_groups, DataType data_type, DataLayout data_layout)
{
- _target = compute_target(shape, data_type, num_groups);
+ _target = compute_target(shape, data_type, num_groups, data_layout);
_reference = compute_reference(shape, data_type, num_groups);
}
@@ -59,11 +59,17 @@ protected:
library->fill_tensor_uniform(tensor, 0);
}
- TensorType compute_target(const TensorShape &shape, DataType data_type, unsigned int num_groups)
+ TensorType compute_target(TensorShape shape, DataType data_type, unsigned int num_groups, DataLayout data_layout)
{
+ // Note: The input shape passed to the function is always in NCHW
+ if(data_layout == DataLayout::NHWC)
+ {
+ permute(shape, PermutationVector(2U, 0U, 1U));
+ }
+
// Create tensors
- TensorType src = create_tensor<TensorType>(shape, data_type);
- TensorType dst = create_tensor<TensorType>(shape, data_type);
+ TensorType src = create_tensor<TensorType>(shape, data_type, 1, QuantizationInfo(), data_layout);
+ TensorType dst;
// Create and configure function
FunctionType channel_shuffle_func;