class_docstr: Target device information, use through TVM API.
  
  Note
  ----
  You can create target using the constructor or the following functions
  
  - :py:func:`tvm.target.arm_cpu` create arm_cpu target
  - :py:func:`tvm.target.cuda` create CUDA target
  - :py:func:`tvm.target.rocm` create ROCM target
  - :py:func:`tvm.target.mali` create Mali target
  - :py:func:`tvm.target.intel_graphics` create Intel Graphics target
class_docstr_tok: ["Target","device","information",",","use","through","TVM","API",".","Note","--","--","You","can","create","target","using","the","constructor","or","the","following","functions","-",":","py",":","func",":","`","tvm.target.arm_cpu","`","create","arm_cpu","target","-",":","py",":","func",":","`","tvm.target.cuda","`","create","CUDA","target","-",":","py",":","func",":","`","tvm.target.rocm","`","create","ROCM","target","-",":","py",":","func",":","`","tvm.target.mali","`","create","Mali","target","-",":","py",":","func",":","`","tvm.target.intel_graphics","`","create","Intel","Graphics","target"]
docstr: Returns target_map as a map from TVM Target's in canonical form to IRModules. The keys
  of the input target_map can be in any form recognized by Target.canon_target.
  Similarly, if given, target_host can be in any form recognized by
  Target.canon_target. The final target_map keys will capture the target_host in
  canonical form. Also returns the target_host in canonical form.
docstr_tok: ["Returns","target_map","as","a","map","from","TVM","Target","'s","in","canonical","form","to","IRModules",".","The","keys","of","the","input","target_map","can","be","in","any","form","recognized","by","Target.canon_target",".","Similarly",",","if","given",",","target_host","can","be","in","any","form","recognized","by","Target.canon_target",".","The","final","target_map","keys","will","capture","the","target_host","in","canonical","form",".","Also","returns","the","target_host","in","canonical","form","."]
code: def canon_target_map_and_host(target_map, target_host=None):
      """Returns target_map as a map from TVM Target's in canonical form to IRModules. The keys
      of the input target_map can be in any form recognized by Target.canon_target.
      Similarly, if given, target_host can be in any form recognized by
      Target.canon_target. The final target_map keys will capture the target_host in
      canonical form. Also returns the target_host in canonical form."""
      new_target_map = {}
      canonical_target_host = None
      for tgt, mod in target_map.items():
          tgt = Target.canon_target(tgt)
          assert tgt is not None
          if canonical_target_host is None:
              if tgt.host is not None:
                  canonical_target_host = tgt.host
              elif target_host is not None:
                  # No deprecation warning in this case since host may have been manufactured
                  # behind the scenes in build_module.py build.
                  canonical_target_host = Target.canon_target(
                      target_host
                  )
          if tgt.host is None and canonical_target_host is not None:
              tgt = tgt.with_host(canonical_target_host)
          new_target_map[tgt] = mod
      return new_target_map, canonical_target_host
  
imports: import json
  import re
  import warnings
  from typing import Union
  import tvm._ffi
  from tvm._ffi import register_func
  from tvm._ffi.runtime_ctypes import Device
  from tvm.runtime import Object, convert
  from tvm.runtime.container import String
  from tvm.ir.container import Map, Array
  from .None import _ffi_api
label_desc: Use image node_id 32 for calling the Target obj's underlying member method code with example usage: obj.canon_target_map_and_host(target_map, target_host) and returns: new_target_map,  canonical_target_host