Skip to content

MLBEDSW-9267: Standardise Depthwise Axis Order throughout

Philip Hall requested to merge MLBEDSW-9267B into main

Weight axis layout is currently described by the GraphIR tensor such that ScheduleIR can only access the layout via a reference to the source tensor. This makes it difficult to create schedule-only weight tensors because a graph tensor is still required to hold the axis layout information.

Depthwise weight storage has been normalised to 4-axis NHWC - equivalent to OHWI - where I is the combined size of depth channel C and depth multiplier M. Effectively making a reshaped OHWCM tensor. Weight traversal for depthwise is now corrected and handled by the weight source for the encoder.

Additionally:

  • Changed IWeightEncodingConfig implementations to hold ONLY encoder related parameters by moving responsibility for handling the weight slice depth offsets to the caller. This removes the need for the weight config to track Depthwise weight strides.
  • Removed depth multiplier from the kernel. This is considered unnecessary as the ofm depth must be dictated by the ifm:weights depth ratio.

Signed-off-by: Philip Hall philip.hall@arm.com Change-Id: I105b8626d549c814e0774f81759442facf0a3a79

Merge request reports

Loading