File tree Expand file tree Collapse file tree
backends/cadence/hifi/operators Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -300,7 +300,7 @@ void xa_opt_quantized_conv2d_nhwc(
300300 return ;
301301 }
302302
303- if (groups == input_channels ) {
303+ if (is_depthwise ) {
304304 WORD32 channels_multiplier = out_channels / input_channels;
305305
306306 scratch_size = xa_nn_conv2d_depthwise_getsize (
@@ -359,6 +359,26 @@ void xa_opt_quantized_conv2d_nhwc(
359359 return ;
360360 }
361361 }
362+
363+ // Fallback to generic grouped conv for cases not handled by nnlib
364+ // (e.g. grouped conv with 4D weight where is_depthwise is false)
365+ ::impl::generic::native::quantized_conv2d_nhwc_per_tensor_out (
366+ ctx,
367+ input,
368+ weight,
369+ bias,
370+ stride,
371+ padding,
372+ dilation,
373+ groups,
374+ in_zero_point,
375+ weight_zero_point,
376+ bias_scale,
377+ output_scale,
378+ output_zero_point,
379+ 0 , // out_multiplier (unused)
380+ 0 , // out_shift (unused)
381+ out);
362382}
363383
364384void quantized_conv2d_nhwc (
You can’t perform that action at this time.
0 commit comments