parameters: (total_item, item_per_thread, n_times,
                                target, target_host, remote, ctx, verbose=True)
return_statement: return result
docstring: measure peak flops for all types
  
      Parameters
      ----------
      total_item: int
          number of elements in input array
      item_per_thread: int
          number of elements each thread accmulates
      n_times: int
          number of runs for averaging
      target: :any:`tvm.target.Target`
          the target and option of the compilation.
      target_host : str or :any:`tvm.target.Target`
          host compilation target
      remote: tvm.contrib.rpc.RPCSession
          remote rpc session
      ctx: TVMcontext
          the context of array
      verbose: bool
          whether outputs immediate result
  
      Returns
      -------
      result: list
          a list of (type_name, GFLOPS/GIOPS) pairs
docstring_summary: measure peak flops for all types
docstring_tokens: measure peak flops for all types
function: def measure_compute_all_types(total_item, item_per_thread, n_times,
                                target, target_host, remote, ctx, verbose=True):
      """ measure peak flops for all types
  
      Parameters
      ----------
      total_item: int
          number of elements in input array
      item_per_thread: int
          number of elements each thread accmulates
      n_times: int
          number of runs for averaging
      target: :any:`tvm.target.Target`
          the target and option of the compilation.
      target_host : str or :any:`tvm.target.Target`
          host compilation target
      remote: tvm.contrib.rpc.RPCSession
          remote rpc session
      ctx: TVMcontext
          the context of array
      verbose: bool
          whether outputs immediate result
  
      Returns
      -------
      result: list
          a list of (type_name, GFLOPS/GIOPS) pairs
      """
      result = []
      for base_type in ["float", "int"]:
          for bits in [16, 32, 64]:
              for lanes in [1, 2, 4, 8, 16]:
                  if base_type == 'int' and bits != 32:  # only measure int32
                      continue
  
                  max_speed = -1e9
                  for per_thread in [item_per_thread//2, item_per_thread, item_per_thread*2]:
                      speed = measure_compute_mad(total_item, per_thread,
                                                  base_type, bits, lanes, target,
                                                  target_host, remote, ctx, n_times)
                      max_speed = max(max_speed, speed)
                  type_name = base_type + str(bits)
                  result.append(["%sx%d" % (type_name, lanes), max_speed])
  
                  unit = "GFLOPS" if base_type == "float" else "GIOPS"
  
                  if verbose:
                      logging.info("\t%-10s %.2f %s", result[-1][0], result[-1][1], unit)
  
      return result
function_tokens: def measure_compute_all_types ( total_item , item_per_thread , n_times , target , target_host , remote , ctx , verbose = True ) : result = [ ] for base_type in [ "float" , "int" ] : for bits in [ 16 , 32 , 64 ] : for lanes in [ 1 , 2 , 4 , 8 , 16 ] : if base_type == 'int' and bits != 32 : # only measure int32 continue max_speed = - 1e9 for per_thread in [ item_per_thread // 2 , item_per_thread , item_per_thread * 2 ] : speed = measure_compute_mad ( total_item , per_thread , base_type , bits , lanes , target , target_host , remote , ctx , n_times ) max_speed = max ( max_speed , speed ) type_name = base_type + str ( bits ) result . append ( [ "%sx%d" % ( type_name , lanes ) , max_speed ] ) unit = "GFLOPS" if base_type == "float" else "GIOPS" if verbose : logging . info ( "\t%-10s %.2f %s" , result [ - 1 ] [ 0 ] , result [ - 1 ] [ 1 ] , unit ) return result