aboutsummaryrefslogtreecommitdiff
path: root/tests/datasets/ShapeDatasets.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/datasets/ShapeDatasets.h')
-rw-r--r--tests/datasets/ShapeDatasets.h188
1 files changed, 182 insertions, 6 deletions
diff --git a/tests/datasets/ShapeDatasets.h b/tests/datasets/ShapeDatasets.h
index 37c5f1626d..c1e61444a8 100644
--- a/tests/datasets/ShapeDatasets.h
+++ b/tests/datasets/ShapeDatasets.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2021 Arm Limited.
+ * Copyright (c) 2017-2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -135,7 +135,7 @@ public:
Tiny4DShapes()
: ShapeDataset("Shape",
{
- TensorShape{ 7U, 7U, 5U, 3U },
+ TensorShape{ 2U, 7U, 5U, 3U },
TensorShape{ 17U, 13U, 7U, 2U },
})
{
@@ -171,6 +171,26 @@ public:
{
}
};
+/** Data set containing small tensor shapes with none of the dimensions equal to 1 (unit). */
+class SmallNoneUnitShapes final : public ShapeDataset
+{
+public:
+ SmallNoneUnitShapes()
+ : ShapeDataset("Shape",
+ {
+ // Batch size 1
+ TensorShape{ 13U, 11U },
+ TensorShape{ 16U, 16U },
+ TensorShape{ 24U, 26U, 5U },
+ TensorShape{ 7U, 7U, 17U, 2U },
+ // Batch size 4
+ TensorShape{ 27U, 13U, 2U, 4U },
+ // Arbitrary batch size
+ TensorShape{ 8U, 7U, 5U, 5U }
+ })
+ {
+ }
+};
/** Data set containing small tensor shapes. */
class SmallShapes final : public ShapeDataset
{
@@ -179,12 +199,12 @@ public:
: ShapeDataset("Shape",
{
// Batch size 1
- TensorShape{ 11U, 11U },
- TensorShape{ 16U, 16U },
+ TensorShape{ 3U, 11U },
+ TensorShape{ 1U, 16U },
TensorShape{ 27U, 13U, 7U },
TensorShape{ 7U, 7U, 17U, 2U },
- // Batch size 4
- TensorShape{ 27U, 13U, 2U, 4U },
+ // Batch size 4 and 2 SIMD iterations
+ TensorShape{ 33U, 13U, 2U, 4U },
// Arbitrary batch size
TensorShape{ 11U, 11U, 3U, 5U }
})
@@ -192,6 +212,25 @@ public:
}
};
+/** Data set containing small tensor shapes. */
+class SmallShapesNoBatches final : public ShapeDataset
+{
+public:
+ SmallShapesNoBatches()
+ : ShapeDataset("Shape",
+ {
+ // Batch size 1
+ TensorShape{ 3U, 11U },
+ TensorShape{ 1U, 16U },
+ TensorShape{ 27U, 13U, 7U },
+ TensorShape{ 7U, 7U, 17U },
+ TensorShape{ 33U, 13U, 2U },
+ TensorShape{ 11U, 11U, 3U }
+ })
+ {
+ }
+};
+
/** Data set containing pairs of tiny tensor shapes that are broadcast compatible. */
class TinyShapesBroadcast final : public framework::dataset::ZipDataset<ShapeDataset, ShapeDataset>
{
@@ -211,6 +250,25 @@ public:
{
}
};
+/** Data set containing pairs of tiny tensor shapes that are broadcast compatible and can do in_place calculation. */
+class TinyShapesBroadcastInplace final : public framework::dataset::ZipDataset<ShapeDataset, ShapeDataset>
+{
+public:
+ TinyShapesBroadcastInplace()
+ : ZipDataset<ShapeDataset, ShapeDataset>(
+ ShapeDataset("Shape0",
+ {
+ TensorShape{ 9U },
+ TensorShape{ 10U, 2U, 14U, 2U },
+ }),
+ ShapeDataset("Shape1",
+ {
+ TensorShape{ 9U, 1U, 9U },
+ TensorShape{ 10U },
+ }))
+ {
+ }
+};
/** Data set containing pairs of small tensor shapes that are broadcast compatible. */
class SmallShapesBroadcast final : public framework::dataset::ZipDataset<ShapeDataset, ShapeDataset>
{
@@ -243,6 +301,52 @@ public:
}
};
+class TemporaryLimitedSmallShapesBroadcast final : public framework::dataset::ZipDataset<ShapeDataset, ShapeDataset>
+{
+public:
+ TemporaryLimitedSmallShapesBroadcast()
+ : ZipDataset<ShapeDataset, ShapeDataset>(
+ ShapeDataset("Shape0",
+ {
+ TensorShape{ 1U, 3U, 4U, 2U }, // LHS broadcast X
+ TensorShape{ 6U, 4U, 2U, 3U }, // RHS broadcast X
+ TensorShape{ 7U, 1U, 1U, 4U }, // LHS broadcast Y, Z
+ TensorShape{ 8U, 5U, 6U, 3U }, // RHS broadcast Y, Z
+ TensorShape{ 1U, 1U, 1U, 2U }, // LHS broadcast X, Y, Z
+ TensorShape{ 2U, 6U, 4U, 3U }, // RHS broadcast X, Y, Z
+ }),
+ ShapeDataset("Shape1",
+ {
+ TensorShape{ 5U, 3U, 4U, 2U },
+ TensorShape{ 1U, 4U, 2U, 3U },
+ TensorShape{ 7U, 2U, 3U, 4U },
+ TensorShape{ 8U, 1U, 1U, 3U },
+ TensorShape{ 4U, 7U, 3U, 2U },
+ TensorShape{ 1U, 1U, 1U, 3U },
+ }))
+ {
+ }
+};
+
+class TemporaryLimitedLargeShapesBroadcast final : public framework::dataset::ZipDataset<ShapeDataset, ShapeDataset>
+{
+public:
+ TemporaryLimitedLargeShapesBroadcast()
+ : ZipDataset<ShapeDataset, ShapeDataset>(
+ ShapeDataset("Shape0",
+ {
+ TensorShape{ 127U, 25U, 5U },
+ TensorShape{ 485, 40U, 10U }
+ }),
+ ShapeDataset("Shape1",
+ {
+ TensorShape{ 1U, 1U, 1U }, // Broadcast in X, Y, Z
+ TensorShape{ 485U, 1U, 1U }, // Broadcast in Y, Z
+ }))
+ {
+ }
+};
+
/** Data set containing medium tensor shapes. */
class MediumShapes final : public ShapeDataset
{
@@ -320,6 +424,19 @@ public:
}
};
+/** Data set containing large tensor shapes. */
+class LargeShapesNoBatches final : public ShapeDataset
+{
+public:
+ LargeShapesNoBatches()
+ : ShapeDataset("Shape",
+ {
+ TensorShape{ 582U, 131U, 2U },
+ })
+ {
+ }
+};
+
/** Data set containing pairs of large tensor shapes that are broadcast compatible. */
class LargeShapesBroadcast final : public framework::dataset::ZipDataset<ShapeDataset, ShapeDataset>
{
@@ -501,6 +618,21 @@ public:
}
};
+/** Data set containing small 5D tensor shapes. */
+class Small5dShapes final : public ShapeDataset
+{
+public:
+ Small5dShapes()
+ : ShapeDataset("Shape",
+ {
+ TensorShape{ 5U, 5U, 7U, 4U, 3U },
+ TensorShape{ 5U, 5U, 4U, 13U, 2U },
+ TensorShape{ 5U, 5U, 3U, 5U, 2U },
+ })
+ {
+ }
+};
+
/** Data set containing large 5x5 tensor shapes. */
class Large5x5Shapes final : public ShapeDataset
{
@@ -514,6 +646,19 @@ public:
}
};
+/** Data set containing large 5D tensor shapes. */
+class Large5dShapes final : public ShapeDataset
+{
+public:
+ Large5dShapes()
+ : ShapeDataset("Shape",
+ {
+ TensorShape{ 30U, 40U, 30U, 32U, 3U }
+ })
+ {
+ }
+};
+
/** Data set containing small 5x1 tensor shapes. */
class Small5x1Shapes final : public ShapeDataset
{
@@ -651,6 +796,7 @@ public:
SmallDeconvolutionShapes()
: ShapeDataset("InputShape",
{
+ // Multiple Vector Loops for FP32
TensorShape{ 5U, 4U, 3U, 2U },
TensorShape{ 5U, 5U, 3U },
TensorShape{ 11U, 13U, 4U, 3U }
@@ -659,6 +805,19 @@ public:
}
};
+class SmallDeconvolutionShapesWithLargerChannels final : public ShapeDataset
+{
+public:
+ SmallDeconvolutionShapesWithLargerChannels()
+ : ShapeDataset("InputShape",
+ {
+ // Multiple Vector Loops for all data types
+ TensorShape{ 5U, 5U, 35U }
+ })
+ {
+ }
+};
+
/** Data set containing tiny tensor shapes for direct convolution. */
class TinyDirectConvolutionShapes final : public ShapeDataset
{
@@ -689,6 +848,23 @@ public:
}
};
+class SmallDirectConv3DShapes final : public ShapeDataset
+{
+public:
+ SmallDirectConv3DShapes()
+ : ShapeDataset("InputShape",
+ {
+ // Batch size 2
+ TensorShape{ 1U, 3U, 4U, 5U, 2U },
+ // Batch size 3
+ TensorShape{ 7U, 27U, 3U, 6U, 3U },
+ // Batch size 1
+ TensorShape{ 32U, 37U, 13U, 1U, 1U },
+ })
+ {
+ }
+};
+
/** Data set containing small tensor shapes for direct convolution. */
class SmallDirectConvolutionTensorShiftShapes final : public ShapeDataset
{