class_docstr: Options for applying layout rewrite.
  
  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.
class_docstr_tok: ["Options","for","applying","layout","rewrite",".","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","."]
docstr: Get the default layout rewrite option for the specified target.
  Currently we only enable layout rewrite for cpu / mali backend for now
  
  Parameters
  ----------
  target: tvm.target.Target
      The compilation target.
  in_relay_integration: bool
      If this check is ask for relay integration.
  
  Returns
  -------
  layout_rewrite_option: LayoutRewriteOption
      The default layout rewrite option for the specified target.
docstr_tok: ["Get","the","default","layout","rewrite","option","for","the","specified","target",".","Currently","we","only","enable","layout","rewrite","for","cpu","\/","mali","backend","for","now","Parameters","--","--","--","--","--","target",":","tvm.target.Target","The","compilation","target",".","in_relay_integration",":","bool","If","this","check","is","ask","for","relay","integration",".","Returns","--","--","--","-","layout_rewrite_option",":","LayoutRewriteOption","The","default","layout","rewrite","option","for","the","specified","target","."]
code: def get_target_default(target, in_relay_integration=False):
      """Get the default layout rewrite option for the specified target.
      Currently we only enable layout rewrite for cpu / mali backend for now
  
      Parameters
      ----------
      target: tvm.target.Target
          The compilation target.
      in_relay_integration: bool
          If this check is ask for relay integration.
  
      Returns
      -------
      layout_rewrite_option: LayoutRewriteOption
          The default layout rewrite option for the specified target.
      """
      layout_rewrite_option = LayoutRewriteOption.NO_REWRITE
      if target.kind.name == "llvm" or (
          "device" in target.attrs and target.attrs["device"] == "mali"
      ):
          layout_rewrite_option = (
              LayoutRewriteOption.REWRITE_FOR_PRE_TRANSFORMED
              if in_relay_integration
              else LayoutRewriteOption.INSERT_TRANSFORM_STAGE
          )
  
      return layout_rewrite_option
  
imports: import hashlib
  import json
  import tvm._ffi
  from tvm.runtime import Object
  from tvm.runtime._ffi_node_api import LoadJSON, SaveJSON
  from .None import _ffi_api
  from .loop_state import State, StateObject
  from .utils import get_const_tuple
  from .workload_registry import workload_key_to_tensors
label_desc: Use image node_id 1 for calling the LayoutRewriteOption obj's underlying member method code with example usage: obj.get_target_default(target, in_relay_integration) and returns: layout_rewrite_option