aboutsummaryrefslogtreecommitdiff
path: root/tests/benchmark/fixtures/DepthwiseSeparableConvolutionLayerFixture.h
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2017-10-23 20:29:30 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:35:24 +0000
commit81a26ad6b626ce2da83659d7c6c17b6104d1f203 (patch)
tree536807115771f1a4b06048892d1d4e17c98779de /tests/benchmark/fixtures/DepthwiseSeparableConvolutionLayerFixture.h
parent511347a7282b948bddfc071e9a8fa08e79da25b4 (diff)
downloadComputeLibrary-81a26ad6b626ce2da83659d7c6c17b6104d1f203.tar.gz
COMPMID-643: Add bias to CLDepthwiseConvolution.
Change-Id: Ibfe7b8c1172d10cbcae7971fe86b82090519d31d Reviewed-on: http://mpd-gerrit.cambridge.arm.com/92798 Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com> Reviewed-by: Jaroslaw Rzepecki <jaroslaw.rzepecki@arm.com> Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'tests/benchmark/fixtures/DepthwiseSeparableConvolutionLayerFixture.h')
-rw-r--r--tests/benchmark/fixtures/DepthwiseSeparableConvolutionLayerFixture.h22
1 files changed, 14 insertions, 8 deletions
diff --git a/tests/benchmark/fixtures/DepthwiseSeparableConvolutionLayerFixture.h b/tests/benchmark/fixtures/DepthwiseSeparableConvolutionLayerFixture.h
index 928b0c7328..fa1544042f 100644
--- a/tests/benchmark/fixtures/DepthwiseSeparableConvolutionLayerFixture.h
+++ b/tests/benchmark/fixtures/DepthwiseSeparableConvolutionLayerFixture.h
@@ -40,7 +40,8 @@ class DepthwiseSeparableConvolutionLayerFixture : public framework::Fixture
{
public:
template <typename...>
- void setup(TensorShape src_shape, TensorShape depthwise_weights_shape, TensorShape depthwise_out_shape, TensorShape pointwise_weights_shape, TensorShape biases_shape, TensorShape dst_shape,
+ void setup(TensorShape src_shape, TensorShape depthwise_weights_shape, TensorShape depthwise_biases_shape, TensorShape depthwise_out_shape, TensorShape pointwise_weights_shape,
+ TensorShape pointwise_biases_shape, TensorShape dst_shape,
PadStrideInfo pad_stride_depthwise_info, PadStrideInfo pad_stride_pointwise_info, DataType data_type, int batches)
{
// Set batched in source and destination shapes
@@ -51,27 +52,30 @@ public:
src = create_tensor<TensorType>(src_shape, data_type, 1, fixed_point_position);
depthwise_weights = create_tensor<TensorType>(depthwise_weights_shape, data_type, 1, fixed_point_position);
+ depthwise_biases = create_tensor<TensorType>(depthwise_biases_shape, data_type, 1, fixed_point_position);
depthwise_out = create_tensor<TensorType>(depthwise_out_shape, data_type, 1, fixed_point_position);
pointwise_weights = create_tensor<TensorType>(pointwise_weights_shape, data_type, 1, fixed_point_position);
- biases = create_tensor<TensorType>(biases_shape, data_type, 1, fixed_point_position);
+ pointwise_biases = create_tensor<TensorType>(pointwise_biases_shape, data_type, 1, fixed_point_position);
dst = create_tensor<TensorType>(dst_shape, data_type, 1, fixed_point_position);
// Create and configure function
- depth_sep_conv_layer.configure(&src, &depthwise_weights, &depthwise_out, &pointwise_weights, &biases, &dst, pad_stride_depthwise_info, pad_stride_pointwise_info);
+ depth_sep_conv_layer.configure(&src, &depthwise_weights, &depthwise_biases, &depthwise_out, &pointwise_weights, &pointwise_biases, &dst, pad_stride_depthwise_info, pad_stride_pointwise_info);
// Allocate tensors
src.allocator()->allocate();
depthwise_weights.allocator()->allocate();
+ depthwise_biases.allocator()->allocate();
depthwise_out.allocator()->allocate();
pointwise_weights.allocator()->allocate();
- biases.allocator()->allocate();
+ pointwise_biases.allocator()->allocate();
dst.allocator()->allocate();
// Fill tensors
library->fill_tensor_uniform(Accessor(src), 0);
library->fill_tensor_uniform(Accessor(depthwise_weights), 1);
- library->fill_tensor_uniform(Accessor(pointwise_weights), 2);
- library->fill_tensor_uniform(Accessor(biases), 3);
+ library->fill_tensor_uniform(Accessor(depthwise_biases), 2);
+ library->fill_tensor_uniform(Accessor(pointwise_weights), 3);
+ library->fill_tensor_uniform(Accessor(pointwise_biases), 4);
}
void run()
@@ -83,18 +87,20 @@ public:
{
src.allocator()->free();
depthwise_weights.allocator()->free();
+ depthwise_biases.allocator()->free();
depthwise_out.allocator()->free();
pointwise_weights.allocator()->free();
- biases.allocator()->free();
+ pointwise_biases.allocator()->free();
dst.allocator()->free();
}
private:
TensorType src{};
TensorType depthwise_weights{};
+ TensorType depthwise_biases{};
TensorType depthwise_out{};
TensorType pointwise_weights{};
- TensorType biases{};
+ TensorType pointwise_biases{};
TensorType dst{};
Function depth_sep_conv_layer{};
};