oneDNN icon indicating copy to clipboard operation
oneDNN copied to clipboard

Implementation choice for BWD_D deconvolution

Open alenik01 opened this issue 6 years ago • 2 comments

Good afternoon, dear colleagues.

I have a question about primitive descriptors created within the following setup: ./benchdnn --deconv --dir=BWD_D ic16ih5oc3oh5kh3ph1n"2d_conv:1st" Deconvolution with backward_data regime is created here, and it employs gemm_convolution_fwd_t like it is a usual forward convolution (this probably makes sense, if deconvolution brings transposition and BWD_D applies another transposition).

May you please point out, at what stage of the call stack this deconvolution pd starts to search in the list of forward implementations of cpu_convolution_list.cpp? I wish to tune launch checks for acl_gemm_convolution_fwd_t in such a setup.

Best regards, Aleksandr Nikolaev

alenik01 avatar Nov 04 '20 22:11 alenik01

Hi @alenik01 , As you mentioned there is a deconvolution implementation which is based on convolution implementations. This deconvolution is called ref_deconvolution_bwd_data_t and is chosen if other implementations are not applicable. The same idea is used for other propagation kinds.

In ref_deconvolution_bwd_data_t there is a method called init_convolution, which does the following:

  1. Creates a convolution descriptor based on deconvolution one;
  2. Iterates through convolution implementations until an applicable implementation is found;

During execution deconvolution executes the following:

  1. Convolution primitive
  2. Bias kernel (if needed and not supported by convolution)

To launch acl_gemm_convolution_fwd_t you need to make sure that ref_deconvolution_bwd_data_t is chosen and acl_gemm_convolution_fwd_t implementation is chosen in init_convolution.

igorsafo avatar Nov 04 '20 22:11 igorsafo

Good morning, @igorsafo .

Many thanks for explaining, it is indeed in the ref_deconvolution.hpp.

Best wishes, Aleksandr

alenik01 avatar Nov 05 '20 10:11 alenik01