code: def evaluate_network(network, target, target_host, dtype, repeat):
      print_progress(network)
      net, params, input_shape, output_shape = get_network(
          network, batch_size=1, dtype=dtype
      )
  
      # Auto Tuning
      tune_log = "adreno-" + network + "-" + dtype + ".log"
      tuning_options = {
          "log_filename": tune_log,
          "early_stopping": None,
          "measure_option": autotvm.measure_option(
              builder=autotvm.LocalBuilder(
                  build_func=ndk.create_shared, timeout=15
              ),
              runner=autotvm.RPCRunner(
                  args.rpc_key,
                  host=args.host,
                  port=args.port,
                  number=3,
                  timeout=600,
              ),
          ),
      }
      if args.tune:
          tasks = autotvm.task.extract_from_program(
              net, target=target, target_host=target_host, params=params
          )
          tune_tasks(tasks, **tuning_options)
  
      print_progress("%-20s building..." % network)
  
      # Build the tuning log
      if os.path.exists(tune_log):
          with autotvm.apply_history_best(tune_log):
              with tvm.transform.PassContext(opt_level=3):
                  lib = relay.build(
                      net,
                      target=tvm.target.Target(
                          target, host=target_host
                      ),
                      params=params,
                  )
      else:
          with tvm.transform.PassContext(opt_level=3):
              lib = relay.build(
                  net,
                  target=tvm.target.Target(target, host=target_host),
                  params=params,
              )
  
      tmp = tempdir()
  
      filename = "%s.so" % network
      lib.export_library(
          tmp.relpath(filename), fcompile=ndk.create_shared
      )
  
      # upload library and params
      print_progress("%-20s uploading..." % network)
  
      # connect to remote device
      tracker = tvm.rpc.connect_tracker(args.host, args.port)
      remote = tracker.request(args.rpc_key)
  
      dev = remote.device(str(target), 0)
      remote.upload(tmp.relpath(filename))
  
      rlib = remote.load_module(filename)
      module = runtime.GraphModule(rlib["default"](dev))
      data_tvm = tvm.nd.array(
          (np.random.uniform(size=input_shape)).astype(dtype)
      )
      module.set_input("data", data_tvm)
  
      # evaluate
      print_progress("%-20s evaluating..." % network)
      ftimer = module.module.time_evaluator(
          "run", dev, number=1, repeat=repeat
      )
      prof_res = (
          np.array(ftimer().results) * 1000
      )  # multiply 1000 for converting to millisecond
      print(
          "%-20s %-19s (%s)"
          % (
              network + "-" + dtype,
              "%.2f ms" % np.mean(prof_res),
              "%.2f ms" % np.std(prof_res),
          )
      )
      return (np.mean(prof_res), np.std(prof_res))
  
file_path: tvm/apps/benchmark/adreno/adreno_gpu_bench_texture.py
imports: import argparse
  import numpy
  import os
  import sys
  import tvm
  from tvm import te
  from tvm.relay import testing
  from tvm.contrib.utils import tempdir
  import tvm.contrib.graph_executor
  from tvm import relay
  from tvm import autotvm
  from tvm.contrib import utils, ndk
label_desc: Use image node_id 4 for calling a global function with example usage: evaluate_network(network, target, target_host, dtype, repeat) and returns: np,  np