parameters: (shape_a_temp, shape_b_temp, shape_output, kernel_name)
return_statement: return tik_instance
docstring: core func
docstring_summary: core func
docstring_tokens: core func
function: def core(shape_a_temp, shape_b_temp, shape_output, kernel_name):
      """core func"""
      if util.get_product_version() == util.VERSION_MINI:
          tik_instance = tik.Tik(tik.Dprofile("v100", "mini"))
      else:
          tik_instance = tik.Tik(tik.Dprofile("v100", "cloud"))
  
      input_x1 = tik_instance.Tensor("float16", shape_a_temp, name="left_matrix", scope=tik.scope_gm)
      input_x2 = tik_instance.Tensor("float16", shape_b_temp, name="right_matrix", scope=tik.scope_gm)
      resmatmul = tik_instance.Tensor("float16", shape_output, name="output", scope=tik.scope_gm)
      with tik_instance.for_range(0, 32, block_num=32) as block_index:
          resmatmul_local_ub = tik_instance.Tensor("float16", (128 * 256,), scope=tik.scope_ubuf,
                                                   name="resmatmul_local_ub")
          resmatmul_local_ub_local_l0c = tik_instance.Tensor("float32", (128 * 256,), scope=tik.scope_cc,
                                                             name="resmatmul_local_ub")
          input_1_local_l1_local_l0a = tik_instance.Tensor("float16", (128 * 128,), scope=tik.scope_ca,
                                                           name="input_1_local_l1_local_l0a")
          input_2_local_l1 = tik_instance.Tensor("float16", (128 * 256,), scope=tik.scope_cbuf,
                                                 name="input_2_local_l1")
          input_1_local_l1 = tik_instance.Tensor("float16", (128 * 128,), scope=tik.scope_cbuf,
                                                 name="input_1_local_l1")
          input_2_local_l1_local_l0b = tik_instance.Tensor("float16", (128 * 256,), scope=tik.scope_cb,
                                                           name="input_2_local_l1_local_l0b")
          core_m_idx = block_index % 8
          core_n_idx = block_index // 8
          with tik_instance.if_scope(core_m_idx != 7):
              tik_instance.data_move(input_1_local_l1, input_x1[core_m_idx * (8 * 256 + 128 * 1008)], 0, 8, 128,
                                     55 * 16, 0)
              tik_instance.data_move(input_2_local_l1, input_x2[core_m_idx * 8 * 256 + core_n_idx * 512 * 1008], 0,
                                     32, 128, 55 * 16, 0)
              with tik_instance.for_range(0, 8) as cc12:
                  tik_instance.load2dv1(input_1_local_l1_local_l0a[cc12 * 2048], input_1_local_l1[cc12 * 256], 0, 8,
                                        8, 0, False)
              with tik_instance.for_range(0, 2) as cc6:
                  with tik_instance.for_range(0, 8) as cc121:
                      tik_instance.load2dv1(input_2_local_l1_local_l0b[cc121 * 4096],
                                            input_2_local_l1[cc6 * 32768 + cc121 * 256], 0, 16, 8, 0, True)
                  tik_instance.mmad(resmatmul_local_ub_local_l0c, input_1_local_l1_local_l0a,
                                    input_2_local_l1_local_l0b, 128, 128, 256, 0)
                  tik_instance.data_move(resmatmul_local_ub, resmatmul_local_ub_local_l0c, 0, 1, 128, 0, 0, 1)
                  tik_instance.data_move(resmatmul[cc6 * 256 * 1008 + core_m_idx * 8 * 256 + core_n_idx * 512 * 1008]
                                         , resmatmul_local_ub, 0, 16, 256 // 2, 0, 55 * 16 * 2 // 2)
          with tik_instance.else_scope():
              tik_instance.data_move(input_1_local_l1, input_x1[core_m_idx * (8 * 256 + 128 * 1008)], 0, 7, 112,
                                     56 * 16, 0)
              tik_instance.data_move(input_2_local_l1, input_x2[core_m_idx * 8 * 256 + core_n_idx * 512 * 1008], 0,
                                     32, 112, 56 * 16, 0)
              with tik_instance.for_range(0, 7) as cc10:
                  tik_instance.load2dv1(input_1_local_l1_local_l0a[cc10 * 1792], input_1_local_l1[cc10 * 256], 0, 7,
                                        7, 0, False)
              with tik_instance.for_range(0, 2) as cc5:
                  with tik_instance.for_range(0, 7) as cc101:
                      tik_instance.load2dv1(input_2_local_l1_local_l0b[cc101 * 4096],
                                            input_2_local_l1[cc5 * 28672 + cc101 * 256], 0, 16, 7, 0, True)
                  tik_instance.mmad(resmatmul_local_ub_local_l0c, input_1_local_l1_local_l0a,
                                    input_2_local_l1_local_l0b, 112, 112, 256, 0)
                  tik_instance.data_move(resmatmul_local_ub, resmatmul_local_ub_local_l0c, 0, 1, 112, 0, 0, 1)
                  tik_instance.data_move(resmatmul[cc5 * 256 * 1008 + core_m_idx * 8 * 256 + core_n_idx * 512 * 1008]
                                         , resmatmul_local_ub, 0, 16, 224 // 2, 0, 56 * 16 * 2 // 2)
      tik_instance.BuildCCE(kernel_name=kernel_name, inputs=[input_x1, input_x2], outputs=[resmatmul])
      return tik_instance
function_tokens: def core ( shape_a_temp , shape_b_temp , shape_output , kernel_name ) : if util . get_product_version ( ) == util . VERSION_MINI : tik_instance = tik . Tik ( tik . Dprofile ( "v100" , "mini" ) ) else : tik_instance = tik . Tik ( tik . Dprofile ( "v100" , "cloud" ) ) input_x1 = tik_instance . Tensor ( "float16" , shape_a_temp , name = "left_matrix" , scope = tik . scope_gm ) input_x2 = tik_instance . Tensor ( "float16" , shape_b_temp , name = "right_matrix" , scope = tik . scope_gm ) resmatmul = tik_instance . Tensor ( "float16" , shape_output , name = "output" , scope = tik . scope_gm ) with tik_instance . for_range ( 0 , 32 , block_num = 32 ) as block_index : resmatmul_local_ub = tik_instance . Tensor ( "float16" , ( 128 * 256 , ) , scope = tik . scope_ubuf , name = "resmatmul_local_ub" ) resmatmul_local_ub_local_l0c = tik_instance . Tensor ( "float32" , ( 128 * 256 , ) , scope = tik . scope_cc , name = "resmatmul_local_ub" ) input_1_local_l1_local_l0a = tik_instance . Tensor ( "float16" , ( 128 * 128 , ) , scope = tik . scope_ca , name = "input_1_local_l1_local_l0a" ) input_2_local_l1 = tik_instance . Tensor ( "float16" , ( 128 * 256 , ) , scope = tik . scope_cbuf , name = "input_2_local_l1" ) input_1_local_l1 = tik_instance . Tensor ( "float16" , ( 128 * 128 , ) , scope = tik . scope_cbuf , name = "input_1_local_l1" ) input_2_local_l1_local_l0b = tik_instance . Tensor ( "float16" , ( 128 * 256 , ) , scope = tik . scope_cb , name = "input_2_local_l1_local_l0b" ) core_m_idx = block_index % 8 core_n_idx = block_index // 8 with tik_instance . if_scope ( core_m_idx != 7 ) : tik_instance . data_move ( input_1_local_l1 , input_x1 [ core_m_idx * ( 8 * 256 + 128 * 1008 ) ] , 0 , 8 , 128 , 55 * 16 , 0 ) tik_instance . data_move ( input_2_local_l1 , input_x2 [ core_m_idx * 8 * 256 + core_n_idx * 512 * 1008 ] , 0 , 32 , 128 , 55 * 16 , 0 ) with tik_instance . for_range ( 0 , 8 ) as cc12 : tik_instance . load2dv1 ( input_1_local_l1_local_l0a [ cc12 * 2048 ] , input_1_local_l1 [ cc12 * 256 ] , 0 , 8 , 8 , 0 , False ) with tik_instance . for_range ( 0 , 2 ) as cc6 : with tik_instance . for_range ( 0 , 8 ) as cc121 : tik_instance . load2dv1 ( input_2_local_l1_local_l0b [ cc121 * 4096 ] , input_2_local_l1 [ cc6 * 32768 + cc121 * 256 ] , 0 , 16 , 8 , 0 , True ) tik_instance . mmad ( resmatmul_local_ub_local_l0c , input_1_local_l1_local_l0a , input_2_local_l1_local_l0b , 128 , 128 , 256 , 0 ) tik_instance . data_move ( resmatmul_local_ub , resmatmul_local_ub_local_l0c , 0 , 1 , 128 , 0 , 0 , 1 ) tik_instance . data_move ( resmatmul [ cc6 * 256 * 1008 + core_m_idx * 8 * 256 + core_n_idx * 512 * 1008 ] , resmatmul_local_ub , 0 , 16 , 256 // 2 , 0 , 55 * 16 * 2 // 2 ) with tik_instance . else_scope ( ) : tik_instance . data_move ( input_1_local_l1 , input_x1 [ core_m_idx * ( 8 * 256 + 128 * 1008 ) ] , 0 , 7 , 112 , 56 * 16 , 0 ) tik_instance . data_move ( input_2_local_l1 , input_x2 [ core_m_idx * 8 * 256 + core_n_idx * 512 * 1008 ] , 0 , 32 , 112 , 56 * 16 , 0 ) with tik_instance . for_range ( 0 , 7 ) as cc10 : tik_instance . load2dv1 ( input_1_local_l1_local_l0a [ cc10 * 1792 ] , input_1_local_l1 [ cc10 * 256 ] , 0 , 7 , 7 , 0 , False ) with tik_instance . for_range ( 0 , 2 ) as cc5 : with tik_instance . for_range ( 0 , 7 ) as cc101 : tik_instance . load2dv1 ( input_2_local_l1_local_l0b [ cc101 * 4096 ] , input_2_local_l1 [ cc5 * 28672 + cc101 * 256 ] , 0 , 16 , 7 , 0 , True ) tik_instance . mmad ( resmatmul_local_ub_local_l0c , input_1_local_l1_local_l0a , input_2_local_l1_local_l0b , 112 , 112 , 256 , 0 ) tik_instance . data_move ( resmatmul_local_ub , resmatmul_local_ub_local_l0c , 0 , 1 , 112 , 0 , 0 , 1 ) tik_instance . data_move ( resmatmul [ cc5 * 256 * 1008 + core_m_idx * 8 * 256 + core_n_idx * 512 * 1008 ] , resmatmul_local_ub , 0 , 16 , 224 // 2 , 0 , 56 * 16 * 2 // 2 ) tik_instance . BuildCCE ( kernel_name = kernel_name , inputs = [ input_x1 , input_x2 ] , outputs = [ resmatmul ] ) return tik_instance