class_docstr: Provides the test_conv2d test function, to be used by other test classes.
  
  Test parameter sets are split out into different classes for
  readability (e.g. used for mobilenet), and for restrictions
  (e.g. implemented only for llvm).
class_docstr_tok: ["Provides","the","test_conv2d","test","function",",","to","be","used","by","other","test","classes",".","Test","parameter","sets","are","split","out","into","different","classes","for","readability","(","e.g",".","used","for","mobilenet",")",",","and","for","restrictions","(","e.g",".","implemented","only","for","llvm",")","."]
docstr: Returns filter shape.
docstr_tok: ["Returns","filter","shape","."]
code: def filter_shape(
      self, layout, in_channel, channel_multiplier, kernel
  ):
      """Returns filter shape."""
      filter_channel = in_channel
      if layout == "NCHW":
          return (filter_channel, channel_multiplier, kernel, kernel)
      elif layout == "NHWC":
          return (kernel, kernel, filter_channel, channel_multiplier)
      elif layout == "NCHWc":
          out_channel = in_channel * channel_multiplier
          # For testing the functionality, we choose an arbitrary block
          # size that can divide out_channel, regardless of the
          # performance.
          oc_block = next(
              bn for bn in range(16, 0, -1) if out_channel % bn == 0
          )
          return (
              out_channel // oc_block,
              1,
              kernel,
              kernel,
              1,
              oc_block,
          )
      else:
          raise RuntimeError(f"Not supported layout {layout}")
  
file_path: tvm/tests/python/contrib/test_hexagon/topi/test_depthwise_conv2d.py
imports: import numpy
  import tvm
  from tvm.contrib.hexagon.session import Session
  import tvm.testing
  import tvm.topi.testing
  from tvm import te, topi
  from tvm.topi.utils import get_const_tuple
  from tvm.topi.nn.utils import get_pad_tuple
  from ..infrastructure import get_hexagon_target
label_desc: Use image node_id 2 for calling the BaseDepthwiseConv2D obj's underlying member method code with example usage: obj.filter_shape(layout, in_channel, channel_multiplier, kernel) and returns: filter_channel,  channel_multiplier,  kernel,  kernel, kernel,  kernel,  filter_channel,  channel_multiplier, unknown,  int,  kernel,  kernel,  int,  oc_block