code: def test_odd_width_3x3_depthwise_strides_code():
      """This is the function that would be generated for a 1x4x48x48 NCHW input tensor with "SAME"
      padding and (2, 2) strides, being written into NHWC layout. The layout change is encoded by
      out_stride = 4. This is a common use case seen in MobileNetV1, among others.
  
      Note that despite the rows not being word-aligned, the *tensor pointer will always be word
      aligned (satisfying this requirement) since y_stride = 2."""
  
      _, code = tensordot_int16_impl(2, (49, 3, 3), (0, 0, 0), (2, 4))
      assert code == textwrap.dedent(
          """
      #ifndef TENSORDOT_OPT_X2_INT16_W49_3X3_000_2_4_EXISTS
      #define TENSORDOT_OPT_X2_INT16_W49_3X3_000_2_4_EXISTS
      #include <arm_acle.h>
      __attribute__((always_inline)) static inline int32_t tensordot_opt_x2_int16_w49_3x3_000_2_4(
          int16_t *output_arg, int16_t *tensor_arg, int16_t *kernel_arg,
          int32_t *bias, int32_t *scale
      ) {
        int32_t *output = output_arg;
        int32_t *tensor = tensor_arg;
        int32_t *kernel = kernel_arg;
  
        int32_t sum_0 = *bias, sum_1 = *bias;
  
        int32_t tensor__y00_x00__y00_x01 = tensor[0];
        int32_t tensor__y00_x02__y00_x03 = tensor[1];
        int32_t tensor__y00_x04__unknown = tensor[2];
        int32_t tensor__unknown__y01_x00 = tensor[24];
        int32_t tensor__y01_x01__y01_x02 = tensor[25];
        int32_t tensor__y01_x03__y01_x04 = tensor[26];
        int32_t tensor__y02_x00__y02_x01 = tensor[49];
        int32_t tensor__y02_x02__y02_x03 = tensor[50];
        int32_t tensor__y02_x04__unknown = tensor[51];
  
        int32_t kernel__y00_x00__y00_x01 = kernel[0];
        int32_t kernel__y00_x02__y01_x00 = kernel[1];
        int32_t kernel__y01_x01__y01_x02 = kernel[2];
        int32_t kernel__y02_x00__y02_x01 = kernel[3];
        int32_t kernel__y02_x02__unknown = kernel[4];
  
        sum_0 = __smlad(tensor__y00_x00__y00_x01, kernel__y00_x00__y00_x01, sum_0);
        sum_0 = __smlabb(tensor__y00_x02__y00_x03, kernel__y00_x02__y01_x00, sum_0);
        sum_0 = __smlatt(tensor__unknown__y01_x00, kernel__y00_x02__y01_x00, sum_0);
        sum_0 = __smlad(tensor__y01_x01__y01_x02, kernel__y01_x01__y01_x02, sum_0);
        sum_0 = __smlad(tensor__y02_x00__y02_x01, kernel__y02_x00__y02_x01, sum_0);
        sum_0 = __smlabb(tensor__y02_x02__y02_x03, kernel__y02_x02__unknown, sum_0);
        sum_1 = __smlad(tensor__y00_x02__y00_x03, kernel__y00_x00__y00_x01, sum_1);
        sum_1 = __smlabb(tensor__y00_x04__unknown, kernel__y00_x02__y01_x00, sum_1);
        sum_1 = __smlatt(tensor__y01_x01__y01_x02, kernel__y00_x02__y01_x00, sum_1);
        sum_1 = __smlad(tensor__y01_x03__y01_x04, kernel__y01_x01__y01_x02, sum_1);
        sum_1 = __smlad(tensor__y02_x02__y02_x03, kernel__y02_x00__y02_x01, sum_1);
        sum_1 = __smlabb(tensor__y02_x04__unknown, kernel__y02_x02__unknown, sum_1);
  
        int32_t scale_val = *scale;
        int32_t requant_0 = (sum_0 * (int64_t) scale_val) >> 32;
        requant_0 = (requant_0 + 1) >> 1;
        requant_0 = __ssat(requant_0 + -128, 8);
        int32_t requant_1 = (sum_1 * (int64_t) scale_val) >> 32;
        requant_1 = (requant_1 + 1) >> 1;
        requant_1 = __ssat(requant_1 + -128, 8);
  
        ((int16_t*) output)[0] = (int16_t) requant_0;
        ((int16_t*) output)[4] = (int16_t) requant_1;
        return 0;
      }
      #endif
      """
      )
  
file_path: tvm/tests/python/topi/test_topi_conv2d_tensordot_opts.py
imports: import textwrap
  from tvm.topi.arm_cpu.mprofile.dsp.micro_kernel.tensordot import _get_tensor_halfwords, _get_kernel_halfwords, tensordot_int16_impl
label_desc: Use image node_id 4 for calling a global function with example usage: test_odd_width_3x3_depthwise_strides_code() without return types