diff options
author | SiCongLi <sicong.li@arm.com> | 2021-11-03 19:01:22 +0000 |
---|---|---|
committer | SiCong Li <sicong.li@arm.com> | 2021-11-04 14:03:19 +0000 |
commit | d928735fee6baefdb74325c05d8152dd13044f32 (patch) | |
tree | 6fb702e36da2863639149995e2df1cfe70905fc7 /src/gpu/cl | |
parent | 6049edadf0c89a026b3fcd1927ee7531d3c40278 (diff) | |
download | ComputeLibrary-d928735fee6baefdb74325c05d8152dd13044f32.tar.gz |
Add validate tests for CLConvolutionLayer and CLGEMMConvolutionLayer with post ops
* Add validate tests
* Restrict post ops support in ClGemmConv2d to only those that do not
need im2col or col2im. In practice this means we only support post ops
in conv1x1 with stride = 1, dilation = 1 and data layout = NHWC
Resolves COMPMID-4435
Change-Id: I1fdf0c5d565a4624857250075ac76db35c2f383b
Signed-off-by: SiCongLi <sicong.li@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/6573
Reviewed-by: Gunes Bayir <gunes.bayir@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/gpu/cl')
-rw-r--r-- | src/gpu/cl/operators/ClGemmConv2d.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gpu/cl/operators/ClGemmConv2d.cpp b/src/gpu/cl/operators/ClGemmConv2d.cpp index 7db5fa0052..682477e4ea 100644 --- a/src/gpu/cl/operators/ClGemmConv2d.cpp +++ b/src/gpu/cl/operators/ClGemmConv2d.cpp @@ -389,6 +389,9 @@ Status ClGemmConv2d::validate(const ITensorInfo *src, const ITensorInfo *weights ARM_COMPUTE_RETURN_ERROR_ON((weights->dimension(idx_channel) * conv2d_info.num_groups) != src->dimension(idx_channel)); ARM_COMPUTE_RETURN_ERROR_ON(weights->num_dimensions() > 4); + ARM_COMPUTE_RETURN_ERROR_ON_MSG(!skip_im2col + && conv2d_info.post_ops.size() > 0, + "ClGemmConv2d does not support post ops with col2im or im2col operation"); // Post ops must be performed after every other op // Validate biases if(biases != nullptr) @@ -523,7 +526,6 @@ Status ClGemmConv2d::validate(const ITensorInfo *src, const ITensorInfo *weights // Validate Col2Im if(!skip_col2im) { - ARM_COMPUTE_RETURN_ERROR_ON_MSG(conv2d_info.post_ops.size() > 0, "ClGemmConv2d does not support post ops with col2im operation"); // Post ops must be performed after every other op ARM_COMPUTE_RETURN_ON_ERROR(kernels::ClCol2ImKernel::validate(gemm_output_to_use, dst, Size2D(conv_w, conv_h), conv2d_info.num_groups)); } |