class_docstr: Arm(R) Ethos(TM)-U NPU config class
class_docstr_tok: ["Arm","(","R",")","Ethos","(","TM",")","-U","NPU","config","class"]
docstr: Calculate the total number of subkernels and their sizes
  
  Parameters
  ----------
  op_type : str
      The NPU primitive operator
          "ethosu_pooling"
  dilated_kernel_h: int
      Height of dilated kernel
  dilated_kernel_w: int
      Width of dilated kernel
  ifm_dtype: str
      Datatype of the Input Feature Map tensor (IFM)
  partkernel: bool
      Flag showing whether part-kernel first traversal is used
  
  Returns
  ----------
  List[int]
      List where each entry contains the amount of elements in one of the subkernels
docstr_tok: ["Calculate","the","total","number","of","subkernels","and","their","sizes","Parameters","--","--","--","--","--","op_type",":","str","The","NPU","primitive","operator","``","ethosu_pooling","''","dilated_kernel_h",":","int","Height","of","dilated","kernel","dilated_kernel_w",":","int","Width","of","dilated","kernel","ifm_dtype",":","str","Datatype","of","the","Input","Feature","Map","tensor","(","IFM",")","partkernel",":","bool","Flag","showing","whether","part-kernel","first","traversal","is","used","Returns","--","--","--","--","--","List","[","int","]","List","where","each","entry","contains","the","amount","of","elements","in","one","of","the","subkernels"]
code: def get_kernel_steps(
      self,
      op_type: str,
      dilated_kernel_h: int,
      dilated_kernel_w: int,
      ifm_dtype: str,
      partkernel: bool = False,
  ) -> List[int]:
      """Calculate the total number of subkernels and their sizes
  
      Parameters
      ----------
      op_type : str
          The NPU primitive operator
              "ethosu_pooling"
      dilated_kernel_h: int
          Height of dilated kernel
      dilated_kernel_w: int
          Width of dilated kernel
      ifm_dtype: str
          Datatype of the Input Feature Map tensor (IFM)
      partkernel: bool
          Flag showing whether part-kernel first traversal is used
  
      Returns
      ----------
      List[int]
          List where each entry contains the amount of elements in one of the subkernels
      """
      if op_type == "ethosu_binary_elementwise":
          return [1]
  
      subkernels = self._get_subkernels(
          dilated_kernel_h, dilated_kernel_w
      )
  
      # Determine the number of kernel steps per subkernel
      kernel_steps = []
      for y, x in subkernels:
          subkernel_elements = x * y
          if op_type == "ethosu_conv2d" and partkernel:
              # Part-kernel-first traversal conv2d
              divisor = 4 if ifm_dtype == "int8" else 2
              kernel_steps.append(
                  int(_round_up_div(subkernel_elements, divisor))
              )
          elif op_type == "ethosu_depthwise_conv2d":
              kernel_steps.append(
                  int(_round_up_div(subkernel_elements, 4))
              )
          else:
              # Depth-first traversal conv2d or pooling
              kernel_steps.append(int(subkernel_elements))
  
      return kernel_steps
  
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 10 for calling the EthosuDeviceConfig obj's underlying member method code with example usage: obj.get_kernel_steps(op_type, dilated_kernel_h, dilated_kernel_w, ifm_dtype, partkernel) and returns: kernel_steps, list