diff options
Diffstat (limited to 'tests/datasets/ShapeDatasets.h')
-rw-r--r-- | tests/datasets/ShapeDatasets.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/datasets/ShapeDatasets.h b/tests/datasets/ShapeDatasets.h index 087342d3b8..0ea8091258 100644 --- a/tests/datasets/ShapeDatasets.h +++ b/tests/datasets/ShapeDatasets.h @@ -241,6 +241,30 @@ public: } }; +/** Data set containing pairs of small tensor shapes that are broadcast compatible for in-place computations. + * When doing in-place computations, only the second input can be broadcast. + */ +class SmallShapesBroadcastInPlace final : public framework::dataset::ZipDataset<ShapeDataset, ShapeDataset> +{ +public: + SmallShapesBroadcastInPlace() + : ZipDataset<ShapeDataset, ShapeDataset>( + ShapeDataset("Shape0", + { + TensorShape{ 9U, 9U, 3U, 4U }, + TensorShape{ 27U, 13U, 2U, 4U }, + TensorShape{ 1U, 16U, 10U, 2U, 128U }, + }), + ShapeDataset("Shape1", + { + TensorShape{ 9U, 1U, 3U }, + TensorShape{ 1U }, + TensorShape{ 1U, 1U, 1U, 1U, 128U }, + })) + { + } +}; + /** Data set containing medium tensor shapes. */ class MediumShapes final : public ShapeDataset { |