diff options
author | Giorgio Arena <giorgio.arena@arm.com> | 2018-04-26 11:33:05 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:53:09 +0000 |
commit | c42f28d45e9b990276d54880d2cee9c9ee675a41 (patch) | |
tree | 5b407f4cc8abb67ca3c9f95c1f59e3f79859495a /tests/validation/fixtures/WinogradConvolutionLayerFixture.h | |
parent | 376c85f3d826526b8b197c55e22c10765a97631e (diff) | |
download | ComputeLibrary-c42f28d45e9b990276d54880d2cee9c9ee675a41.tar.gz |
COMPMID-1048 Add NHWC data format support to Winograd input transform 4x4_3x3
https://confluence.arm.com/display/MLENG/Winograd+Input+Transform%3A+NCHW+vs+NHWC+on+OpenCL
Change-Id: Iac35a54389266701b7d8f5434a7a37df85b7b187
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/133315
Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com>
Tested-by: Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'tests/validation/fixtures/WinogradConvolutionLayerFixture.h')
-rw-r--r-- | tests/validation/fixtures/WinogradConvolutionLayerFixture.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/validation/fixtures/WinogradConvolutionLayerFixture.h b/tests/validation/fixtures/WinogradConvolutionLayerFixture.h index f40f3d2e43..07795c2361 100644 --- a/tests/validation/fixtures/WinogradConvolutionLayerFixture.h +++ b/tests/validation/fixtures/WinogradConvolutionLayerFixture.h @@ -314,10 +314,15 @@ protected: } } - TensorType compute_target(const TensorShape &input_shape, const TensorShape &output_shape, const WinogradInfo &winograd_info, DataLayout data_layout, DataType data_type) + TensorType compute_target(TensorShape input_shape, const TensorShape &output_shape, const WinogradInfo &winograd_info, DataLayout data_layout, DataType data_type) { + if(data_layout == DataLayout::NHWC) + { + permute(input_shape, PermutationVector(2U, 0U, 1U)); + } + TensorType src = create_tensor<TensorType>(input_shape, data_type, 1, 0, QuantizationInfo(), data_layout); - TensorType dst = create_tensor<TensorType>(output_shape, data_type, 1, 0, QuantizationInfo(), data_layout); + TensorType dst = create_tensor<TensorType>(output_shape, data_type, 1, 0, QuantizationInfo()); // Create and configure function FunctionType transf; @@ -345,7 +350,7 @@ protected: SimpleTensor<T> compute_reference(const TensorShape &input_shape, const TensorShape &output_shape, const WinogradInfo &winograd_info, DataLayout data_layout, DataType data_type) { // Create reference - SimpleTensor<T> src{ input_shape, data_type, 1, 0, QuantizationInfo(), data_layout }; + SimpleTensor<T> src{ input_shape, data_type, 1, 0, QuantizationInfo() }; // Fill reference fill(src, 0, -1.f, 1.f); |