parameters: (input_x1, input_x2, output_y, kernel_name, trans_a, trans_b)
return_statement: return shape_a, shape_b, trans_a, trans_b, shape_output
docstring: shape gen1
docstring_summary: shape gen1
docstring_tokens: shape gen1
function: def shape_gen1(input_x1, input_x2, output_y, kernel_name, trans_a, trans_b):
      """shape gen1"""
      shape_a = input_x1.get("ori_shape")
      shape_b = input_x2.get("ori_shape")
      shape_output = output_y.get("ori_shape")
  
      if input_x2.get("format") == "FRACTAL_Z":
          n, c, h, w = shape_b
          c0 = 16
          c1 = c // c0
          if c1 == 0:
              c1 = 1
          shape_b = [n, c1 * h * w * c0]
          shape_a = [n, n]
  
      if input_x1.get("format") == "FRACTAL_Z":
          n, c, h, w = shape_a
          c0 = 16
          c1 = c // c0
          if c1 == 0:
              c1 = 1
          shape_a = [n, c1 * h * w * c0]
          shape_b = [c1 * h * w * c0, c1 * h * w * c0]
  
      if input_x2.get("format") == "FRACTAL_NZ":
          shape_a = [shape_b[0], shape_b[0]]
  
      if input_x1.get("format") == "FRACTAL_NZ":
          shape_b = [shape_a[1], shape_a[1]]
  
      shape_a = list(shape_a)
      shape_b = list(shape_b)
  
      shape_a = _get_input_shape(shape_a)
      shape_b = _get_input_shape(shape_b)
      util.check_kernel_name(kernel_name)
      util.check_shape_rule(shape_a)
      util.check_shape_rule(shape_b)
      util.check_shape_size(shape_a, SHAPE_SIZE_LIMIT)
      util.check_shape_size(shape_b, SHAPE_SIZE_LIMIT)
  
      shape_a = [shape_a[1], shape_a[0]]
      trans_a = bool(1 - trans_a)
  
      shape_b = [shape_b[1], shape_b[0]]
      trans_b = bool(1 - trans_b)
      return shape_a, shape_b, trans_a, trans_b, shape_output
function_tokens: def shape_gen1 ( input_x1 , input_x2 , output_y , kernel_name , trans_a , trans_b ) : shape_a = input_x1 . get ( "ori_shape" ) shape_b = input_x2 . get ( "ori_shape" ) shape_output = output_y . get ( "ori_shape" ) if input_x2 . get ( "format" ) == "FRACTAL_Z" : n , c , h , w = shape_b c0 = 16 c1 = c // c0 if c1 == 0 : c1 = 1 shape_b = [ n , c1 * h * w * c0 ] shape_a = [ n , n ] if input_x1 . get ( "format" ) == "FRACTAL_Z" : n , c , h , w = shape_a c0 = 16 c1 = c // c0 if c1 == 0 : c1 = 1 shape_a = [ n , c1 * h * w * c0 ] shape_b = [ c1 * h * w * c0 , c1 * h * w * c0 ] if input_x2 . get ( "format" ) == "FRACTAL_NZ" : shape_a = [ shape_b [ 0 ] , shape_b [ 0 ] ] if input_x1 . get ( "format" ) == "FRACTAL_NZ" : shape_b = [ shape_a [ 1 ] , shape_a [ 1 ] ] shape_a = list ( shape_a ) shape_b = list ( shape_b ) shape_a = _get_input_shape ( shape_a ) shape_b = _get_input_shape ( shape_b ) util . check_kernel_name ( kernel_name ) util . check_shape_rule ( shape_a ) util . check_shape_rule ( shape_b ) util . check_shape_size ( shape_a , SHAPE_SIZE_LIMIT ) util . check_shape_size ( shape_b , SHAPE_SIZE_LIMIT ) shape_a = [ shape_a [ 1 ] , shape_a [ 0 ] ] trans_a = bool ( 1 - trans_a ) shape_b = [ shape_b [ 1 ] , shape_b [ 0 ] ] trans_b = bool ( 1 - trans_b ) return shape_a , shape_b , trans_a , trans_b , shape_output