class_docstr: Arm(R) Ethos(TM)-U NPU config class
class_docstr_tok: ["Arm","(","R",")","Ethos","(","TM",")","-U","NPU","config","class"]
code: def _get_subkernel_propagator(
      self, op_attrs, ifm_propagator, input_layout, output_layout, depth
  ):
      op_type = op_attrs.get("op")
      stride_h = int(op_attrs.get("stride_h", 1))
      stride_w = int(op_attrs.get("stride_w", 1))
      transform = ifm_propagator.transform
  
      if op_type != "ethosu_identity":
          if input_layout == "NHCWB16":
              transform[1][-1] = min(
                  transform[1][-1], self._subkernel_limits[0] - stride_h
              )
              transform[3][-1] = min(
                  transform[3][-1], self._subkernel_limits[1] - stride_w
              )
          else:
              transform[1][-1] = min(
                  transform[1][-1], self._subkernel_limits[0] - stride_h
              )
              transform[2][-1] = min(
                  transform[2][-1], self._subkernel_limits[1] - stride_w
              )
  
          if op_type in ("ethosu_pooling", "ethosu_depthwise_conv2d"):
              if output_layout == "NHCWB16" and input_layout == "NHWC":
                  transform[3][-1] = depth
              elif (
                  output_layout == "NHCWB16"
                  and input_layout == "NHCWB16"
              ):
                  transform[2][-1] = 1 + ((depth - 1) // 16)
  
      return Propagator(transform, ifm_propagator.offset)
  
imports: from typing import Tuple, List, Dict, Optional
  from functools import reduce
  import math
  import numpy
  import tvm
  from .None import BlockConfig
  from .None import StripeConfig
  from .None import Propagator
label_desc: Use image node_id 18 for calling the EthosuDeviceConfig obj's underlying member method code with example usage: obj._get_subkernel_propagator(op_attrs, ifm_propagator, input_layout, output_layout, depth) and returns: Propagator