class_docstr: The computation information and hardware parameters for a schedule search task.
  
  Parameters
  ----------
  func : Union[Function, str]
      The function that returns the compute declaration Tensors.
      Can be the a function or the function name.
  args : Union[Tuple[Any, ...], List[Any]]
      The args of the function.
  compute_dag : ComputeDAG
      The ComputeDAG for the corresponding compute declaration.
  workload_key : str
      The workload key for the corresponding compute declaration.
  target : any target-like object, see Target.canon_target
      The target device of this search task.
  target_host : None or any target-like object, see Target.canon_target
      The target host device of this search task.
  hardware_params : Optional[HardwareParams]
      Hardware parameters used in this search task.
  layout_rewrite_option : Optional[LayoutRewriteOption]
      The layout rewrite option used for measuring programs. If None, the default value will be
      set depending on the specified target.
      Auto_scheduler will find a better schedule for the specified layout rewrite option.
      The NO_REWRITE and INSERT_TRANSFORM_STAGE are expected to be used when tuning a standalone
      op, and the REWRITE_FOR_PRE_TRANSFORMED is expected to be used when tuning ops inside a
      network.
  task_inputs : Union[Dict[str, tvm.nd.NDArray], List[str]]
      A dict maps the input names to input tensors or a list of input names.
      Some special Tensor used as inputs in program measuring. Usually we do not need to care
      about it, but for special workloads like Sparse computation the Sparse Tensor input are
      meaningful that we cannot use random input directly.
  task_inputs_overwrite : bool = False
      Whether to overwrite the data if a name has already in the global table.
  task_inputs_save_to_file : bool = False
      Whether to save the data to a local file as well. This can be reused to resume the last
      tuning process.
  desc: str = ""
      The description string of this task.
  
  Examples
  --------
  .. code-block:: python
  
    # We support two ways to create a search task
  
    # Way 1: create a task by a workload generation function.
    # The `workload_func` is a function decorated by @auto_scheduler.register_workload
    task = SearchTask(func=workload_func, args=args, target=target)
  
    # Way 2: create a task by a workload_key.
    # The `workload_key` is a string, which can be either a hash key or a json-serialized
    # tuple(func, args).
    task = SearchTask(workload_key=workload_key, target=target)
code: def __getstate__(self):
      self.target, self.target_host = Target.canon_target_and_host(
          self.target, self.target_host
      )
      return {
          "compute_dag": self.compute_dag,
          "workload_key": self.workload_key,
          "target": self.target,
          "target_host": self.target_host,
          "hardware_params": self.hardware_params,
          "layout_rewrite_option": self.layout_rewrite_option,
          "task_input_names": self.task_input_names,
          "desc": self.desc,
      }
  
imports: import json
  import os
  import logging
  import numpy
  import tvm._ffi
  from tvm.runtime import Object, ndarray
  from tvm.driver.build_module import build
  from tvm.target import Target
  from .measure import LocalBuilder, LocalRunner
  from .measure_record import load_best_record
  from .workload_registry import make_workload_key
  from .compute_dag import ComputeDAG, LayoutRewriteOption
  from .cost_model import XGBModel
  from .search_policy import SketchPolicy
  from .workload_registry import WORKLOAD_FUNC_REGISTRY, register_workload_tensors
  from .None import _ffi_api
label_desc: Use image node_id 5 for calling the SearchTask obj's underlying member method code with example usage: obj.__getstate__() and returns: dict