[IE CLDNN] Fixed performance of grouped convolutions (#4210)

This commit is contained in:
Vladimir Paramuzov 2021-02-09 18:20:50 +03:00 committed by GitHub
parent f65a6f5424
commit aeff338c2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 8 deletions

View File

@ -110,11 +110,12 @@ public:
conv_params.local_convolution = weights_size.local[0] > 1 || weights_size.local[1] > 1;
conv_params.split = split;
conv_params.groups = groups;
conv_params.filterSize = {
(uint32_t)weights_size.spatial[0],
(uint32_t)weights_size.spatial[1],
(uint32_t)weights_size.spatial[2],
};
auto spatial_size = arg.get_output_layout().format.dimension() - 2;
uint32_t kx = weights_size.spatial[0];
uint32_t ky = weights_size.spatial[1];
uint32_t kz = spatial_size == 2 ? 1 : weights_size.spatial[2];
conv_params.filterSize = { kx, ky, kz };
conv_params.padding = {(uint32_t)std::max(-input_offset.spatial[0], 0),
(uint32_t)std::max(-input_offset.spatial[1], 0),

View File

@ -88,9 +88,12 @@ public:
deconv_params.split = split;
deconv_params.groups = groups;
deconv_params.filterSize = {(uint32_t)weights_size.spatial[0],
(uint32_t)weights_size.spatial[1],
(uint32_t)weights_size.spatial[2]};
auto spatial_size = arg.get_output_layout().format.dimension() - 2;
uint32_t kx = weights_size.spatial[0];
uint32_t ky = weights_size.spatial[1];
uint32_t kz = spatial_size == 2 ? 1 : weights_size.spatial[2];
deconv_params.filterSize = { kx, ky, kz };
deconv_params.padding = {(uint32_t)std::max(-input_offset.spatial[0], 0),
(uint32_t)std::max(-input_offset.spatial[1], 0),