class_docstr: Arm(R) Ethos(TM)-U NPU config class
class_docstr_tok: ["Arm","(","R",")","Ethos","(","TM",")","-U","NPU","config","class"]
code: def _get_input_block(
      self,
      output_block: _Shape,
      input_shape: _Shape,
      dtype: str,
      op_type: str,
      partkernel: bool,
      stride_h: int,
      stride_w: int,
      dilated_kernel_h: int,
      dilated_kernel_w: int,
      upscaling_factor: int,
  ) -> _Shape:
      height = self._get_input_size(
          output_block.height,
          stride_h,
          min(dilated_kernel_h, self._subkernel_limits[0]),
          upscaling_factor,
      )
      width = self._get_input_size(
          output_block.width,
          stride_w,
          min(dilated_kernel_w, self._subkernel_limits[1]),
          upscaling_factor,
      )
  
      if op_type == "ethosu_conv2d":
          if dtype == "int8":
              if partkernel:
                  depth = self._align(min(32, input_shape.depth), 8)
              else:
                  depth = self._align(min(16, input_shape.depth), 8)
          elif dtype == "int16":
              depth = self._align(min(16, input_shape.depth), 4)
          else:
              depth = self._align(min(8, input_shape.depth), 2)
      else:
          depth = output_block.depth
  
      return _Shape(
          [
              1,
              self._align(height, self._micro_block.height),
              self._align(width, self._micro_block.width),
              depth,
          ]
      )
  
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 9 for calling the EthosuDeviceConfig obj's underlying member method code with example usage: obj._get_input_block(output_block, input_shape, dtype, op_type, partkernel, stride_h, stride_w, dilated_kernel_h, dilated_kernel_w, upscaling_factor) and returns: _Shape