google / XNNPACK

High-efficiency floating-point neural network inference operators for mobile, server, and Web

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing setting of output_height and width for convolution with nchw

kvoronin-intel opened this issue · comments

Hi all!

A quick question: I've noticed that for nchw convolution the output_width/output_height are not being set (so it is zero when I checked during xnn_run_operator.
I see this for nchw:
https://github.com/google/XNNPACK/blob/master/src/operators/convolution-nchw.c#L555
and I see this for nhwc:
https://github.com/google/XNNPACK/blob/master/src/operators/convolution-nhwc.c#L1035
in a similar setup function which makes me think it is just a bug of not setting it for nchw.

Am I missing something? If no, do you need a PR to fix that?

Thanks,
Kirill

xnn_run_operator doesn't check the member variables of struct xnn_operator, it expects fully initialized context that is directly passed to the pthreadpool APIs.

Right, but the members remain unset after the operator gets created, is it ok? I'd expect convolution operator to have these fields set after creation.

Yes, it is ok for any members not to be set. The only part that matters after xnn_setup_* call is the context passed to pthreadpool APIs.