code: def conv2d_gemm_weight_transform(kernel, tile_N, tile_K):
      """Weight transformation for winograd
  
      Parameters
      ----------
      kernel: Tensor
          The raw kernel tensor with layout "NHWC".
      tile_N: int
          Tile size across N axis of the weight transformation for ConvGemm. (N = OC)
      tile_K: int
          Tile size across K axis of the weight transformation for ConvGemm. (K = KW * KH * IC)
  
      Returns
      -------
      output : tvm.te.Tensor
          2-D with shape [CI*KH*KW,CO]
      """
      KH, KW, IC, OC = get_const_tuple(kernel.shape)
      K = KH * KW * IC
      N = OC
  
      kernel_flat = te.compute(
          (K, N),
          lambda x, y: kernel[
              (x // IC) // KW, (x // IC) % KW, x % IC, y
          ],
          "weight_flatten",
      )
  
      (
          pad_N,
          pad_K,
      ) = tvm.topi.arm_cpu.arm_utils.get_conv2d_weights_padding(
          N, K, tile_N, tile_K
      )
  
      N_padded = N + pad_N
      K_padded = K + pad_K
  
      if pad_K != 0 or pad_N != 0:
          kernel_flat = pad(
              kernel_flat,
              pad_before=(0, 0),
              pad_after=(pad_K, pad_N),
              name="weight_padding",
          )
  
      if kernel.dtype in ["int8", "uint8"]:
          B_inter_t = te.compute(
              (N_padded // tile_N, K_padded // tile_K, tile_N, tile_K),
              lambda x, y, z, w: kernel_flat[
                  w + tile_K * y, z + tile_N * x
              ],
              name="weight_block_reshape",
          )
      else:
          B_inter_t = te.compute(
              (N_padded // tile_N, K_padded // tile_K, tile_K, tile_N),
              lambda x, y, z, w: kernel_flat[
                  z + tile_K * y, w + tile_N * x
              ],
              name="weight_block_reshape",
          )
      return B_inter_t
  
imports: from __future__ import absolute_import
  import re
  from collections import namedtuple
  from typing import Optional, Sequence, Union
  import numpy
  import tvm
  from tvm import auto_scheduler, te
  from ..utils import get_const_int, get_const_tuple, simplify, tag
  from .pad import pad
  from .utils import get_pad_tuple, get_pad_tuple_generic
  from .winograd_util import winograd_transform_matrices
label_desc: Use image node_id 12 for calling a global function with example usage: conv2d_gemm_weight_transform(kernel, tile_N, tile_K) and returns: B_inter_t