diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2017-07-05 17:02:25 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-09-17 14:15:39 +0100 |
commit | ac4e873dad6aa6291fc36aff62047a896db04f6a (patch) | |
tree | 2c5397c6c04b97cedb88ff809f5d40cbe7dc79c9 /tests/validation/Reference.cpp | |
parent | df24618b53cffed1c574e11e9fd4ba7740f8c009 (diff) | |
download | ComputeLibrary-ac4e873dad6aa6291fc36aff62047a896db04f6a.tar.gz |
COMPMID-417: Port DepthConcatenate to QS8/QS16 for NEON/CL.
Change-Id: I3dddae63043c7aa18d908a4fc8abacf3c64f98ca
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/80081
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Reviewed-by: Steven Niu <steven.niu@arm.com>
Diffstat (limited to 'tests/validation/Reference.cpp')
-rw-r--r-- | tests/validation/Reference.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/validation/Reference.cpp b/tests/validation/Reference.cpp index 04362f0dc1..857dd7c741 100644 --- a/tests/validation/Reference.cpp +++ b/tests/validation/Reference.cpp @@ -538,6 +538,30 @@ RawTensor Reference::compute_reference_convolution_layer(const TensorShape &inpu return ref_dst; } +RawTensor Reference::compute_reference_depth_concatenate_layer(const std::vector<TensorShape> &shapes, DataType dt, int fixed_point_position) +{ + std::vector<std::unique_ptr<RawTensor>> ref_srcs{}; + TensorShape dst_shape = calculate_depth_concatenate_shape(shapes); + + // Create tensors + for(unsigned int i = 0; i < shapes.size(); ++i) + { + ref_srcs.push_back(support::cpp14::make_unique<RawTensor>(RawTensor(shapes[i], dt, 1, fixed_point_position))); + } + RawTensor ref_dst = library->get(dst_shape, dt, 1, fixed_point_position); + + // Fill references + for(unsigned int i = 0; i < ref_srcs.size(); ++i) + { + library->fill_tensor_uniform(*ref_srcs[i], i); + } + + // Compute reference + ReferenceCPP::depth_concatenate_layer(ref_srcs, ref_dst); + + return ref_dst; +} + RawTensor Reference::compute_reference_fully_connected_layer(const TensorShape &input_shape, const TensorShape &weights_shape, const TensorShape &bias_shape, const TensorShape &output_shape, DataType dt, bool transpose_weights, int fixed_point_position) { |