aboutsummaryrefslogtreecommitdiff
path: root/tests/validation/fixtures/WinogradConvolutionLayerFixture.h
diff options
context:
space:
mode:
authorGiorgio Arena <giorgio.arena@arm.com>2018-07-12 15:41:35 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:54:54 +0000
commitea55f91e5dd4e5bc766fabbac6df6ce3ab984d0e (patch)
tree290272820514c19d9e45b9bc0f0fee4eb3a0bff1 /tests/validation/fixtures/WinogradConvolutionLayerFixture.h
parent2df1f99ed6d318c428459fcda8c8052450ccd9bd (diff)
downloadComputeLibrary-ea55f91e5dd4e5bc766fabbac6df6ce3ab984d0e.tar.gz
COMPMID-1373 Enable tests for CLWinogradConvolutionLayer for NHWC
Change-Id: I2c6a744f174cfb6c78a9923b737f06537debaa0d Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/139758 Tested-by: Jenkins <bsgcomp@arm.com> Reviewed-by: Pablo Tello <pablo.tello@arm.com> Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'tests/validation/fixtures/WinogradConvolutionLayerFixture.h')
-rw-r--r--tests/validation/fixtures/WinogradConvolutionLayerFixture.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/tests/validation/fixtures/WinogradConvolutionLayerFixture.h b/tests/validation/fixtures/WinogradConvolutionLayerFixture.h
index f1660e6e90..aba3efffa8 100644
--- a/tests/validation/fixtures/WinogradConvolutionLayerFixture.h
+++ b/tests/validation/fixtures/WinogradConvolutionLayerFixture.h
@@ -501,25 +501,30 @@ protected:
TensorShape output_shape = compute_winograd_output_transform_shape(TensorInfo(input_shape, 1, data_type), winograd_info);
// Create tensors
- TensorType src = create_tensor<TensorType>(input_shape, data_type);
- TensorType dst = create_tensor<TensorType>(output_shape, data_type, 1, QuantizationInfo(), winograd_info.output_data_layout);
+ TensorType src = create_tensor<TensorType>(input_shape, data_type);
+ TensorType bias = create_tensor<TensorType>(output_shape[get_data_layout_dimension_index(winograd_info.output_data_layout, DataLayoutDimension::CHANNEL)], data_type);
+ TensorType dst = create_tensor<TensorType>(output_shape, data_type, 1, QuantizationInfo(), winograd_info.output_data_layout);
// Create and configure function
FunctionType output_transform;
- output_transform.configure(&src, nullptr, &dst, winograd_info);
+ output_transform.configure(&src, &bias, &dst, winograd_info);
ARM_COMPUTE_EXPECT(src.info()->is_resizable(), framework::LogLevel::ERRORS);
+ ARM_COMPUTE_EXPECT(bias.info()->is_resizable(), framework::LogLevel::ERRORS);
ARM_COMPUTE_EXPECT(dst.info()->is_resizable(), framework::LogLevel::ERRORS);
// Allocate tensors
src.allocator()->allocate();
+ bias.allocator()->allocate();
dst.allocator()->allocate();
ARM_COMPUTE_EXPECT(!src.info()->is_resizable(), framework::LogLevel::ERRORS);
+ ARM_COMPUTE_EXPECT(!bias.info()->is_resizable(), framework::LogLevel::ERRORS);
ARM_COMPUTE_EXPECT(!dst.info()->is_resizable(), framework::LogLevel::ERRORS);
// Fill tensors
fill(AccessorType(src), 0, -1.f, 1.f);
+ fill(AccessorType(bias), 1, -1.f, 1.f);
output_transform.run();
@@ -537,7 +542,7 @@ protected:
// Fill reference
fill(src, 0, -1.f, 1.f);
- fill(bias, 1, 0.0f, 0.0f); // Fill with zeros as we validate just the output transform without bias contribution
+ fill(bias, 1, -1.f, 1.f);
return reference::winograd_output_transform<T>(src, bias, output_shape, winograd_info);
}