class_docstr: Global environment for extracting tuning tasks from graph
class_docstr_tok: ["Global","environment","for","extracting","tuning","tasks","from","graph"]
docstr: Get the single instance of TaskExtractEnv
  
  Parameters
  ----------
  allow_duplicate : boolean
      Whether to fetch all workloads in the network,
      even though some of them are the same. This is
      useful for graph tuning.
  
  Returns
  -------
  env: TaskExtractEnv
      The single instance of TaskExtractEnv
docstr_tok: ["Get","the","single","instance","of","TaskExtractEnv","Parameters","--","--","--","--","--","allow_duplicate",":","boolean","Whether","to","fetch","all","workloads","in","the","network",",","even","though","some","of","them","are","the","same",".","This","is","useful","for","graph","tuning",".","Returns","--","--","--","-","env",":","TaskExtractEnv","The","single","instance","of","TaskExtractEnv"]
code: def get(allow_duplicate=False):
      """Get the single instance of TaskExtractEnv
  
      Parameters
      ----------
      allow_duplicate : boolean
          Whether to fetch all workloads in the network,
          even though some of them are the same. This is
          useful for graph tuning.
  
      Returns
      -------
      env: TaskExtractEnv
          The single instance of TaskExtractEnv
      """
      if not TaskExtractEnv.current:
          TaskExtractEnv.current = TaskExtractEnv(allow_duplicate)
      else:
          TaskExtractEnv.current.allow_duplicate = allow_duplicate
      return TaskExtractEnv.current
  
file_path: tvm/python/tvm/autotvm/task/topi_integration.py
imports: import functools
  import tvm.te._ffi_api
  from tvm.target import Target
  from tvm.te import tensor
  from .task import args_to_workload, serialize_args, DispatchContext, _register_task_compute, _register_task_schedule
label_desc: Use image node_id 7 for calling the TaskExtractEnv obj's underlying member method code with example usage: obj.get(allow_duplicate) and returns: TaskExtractEnv