code: def _get_workload(
      data,
      kernel,
      stride,
      padding,
      dilation,
      out_dtype,
      data_layout="NCHW",
  ):
      """Get the workload structure for a depthwise conv2d.
  
      Input data and filter should use NCHW layout.
      """
      if data_layout == "NCHW":
          _, in_channel, height, width = get_const_tuple(data.shape)
          filter_channel, channel_multiplier, kh, kw = get_const_tuple(
              kernel.shape
          )
      elif data_layout == "NHWC":
          _, height, width, in_channel = get_const_tuple(data.shape)
          kh, kw, filter_channel, channel_multiplier = get_const_tuple(
              kernel.shape
          )
      elif data_layout == "NCHWc":
          (
              _,
              in_channel_chunk,
              height,
              width,
              in_channel_block,
          ) = get_const_tuple(data.shape)
          in_channel = in_channel_chunk * in_channel_block
          (
              filter_channel_chunk,
              cm_chunk,
              kh,
              kw,
              cm_block,
              filter_channel_block,
          ) = get_const_tuple(kernel.shape)
          filter_channel = filter_channel_chunk * filter_channel_block
          channel_multiplier = cm_chunk * cm_block
  
          assert in_channel_block == filter_channel_block, (
              f"Incorrect dimensions, data has block size {in_channel_block}, but filter has "
              f"block size {filter_channel_block}"
          )
  
      else:
          raise ValueError(f"Data layout {data_layout} not supported")
  
      assert in_channel == filter_channel, (
          f"Incorrect dimensions, data has {in_channel} channels but filter expects "
          f"{filter_channel} channels"
      )
  
      out_channel = filter_channel * channel_multiplier
      dilation_h, dilation_w = (
          dilation
          if isinstance(dilation, (tuple, list))
          else (dilation, dilation)
      )
      if isinstance(stride, (tuple, list)):
          HSTR, WSTR = stride
      else:
          HSTR, WSTR = stride, stride
      assert (data.dtype == kernel.dtype) or (
          data.dtype == "uint8" and kernel.dtype == "int8"
      ), f"Do not support inputs with different data types now. {data.dtype} vs. {kernel.dtype}"
      dilated_kernel_h = (kh - 1) * dilation_h + 1
      dilated_kernel_w = (kw - 1) * dilation_w + 1
      pt, pl, pb, pr = get_pad_tuple(
          padding, (dilated_kernel_h, dilated_kernel_w)
      )
      return Workload(
          data.dtype,
          out_dtype,
          height,
          width,
          in_channel,
          out_channel,
          kh,
          kw,
          pt,
          pl,
          pb,
          pr,
          dilation_h,
          dilation_w,
          HSTR,
          WSTR,
      )
  
file_path: tvm/python/tvm/topi/nn/depthwise_conv2d.py
imports: from __future__ import absolute_import
  from collections import namedtuple
  import numpy
  import tvm
  from tvm import te
  from .dilate import dilate
  from .pad import pad
  from .utils import get_pad_tuple
  from ..utils import simplify, get_const_tuple
label_desc: Use image node_id 1 for calling a global function with example usage: _get_workload(data, kernel, stride, padding, dilation, out_dtype, data_layout) and returns: Workload