class_docstr: A context manager that enables MetaTensor mode.
  
  Usage:
      >>> with MetaTensorMode():
      >>>     # all torch.xxx and torch.distributed.xxx will be replaced by patched functions
      >>>     # and the actual execution will be on torch.device('meta')
      >>>     a = torch.rand(100000, 100000)
      >>>     b = torch.rand(100000, 100000)
      >>>     c = torch.mm(a, b)
class_docstr_tok: ["A","context","manager","that","enables","MetaTensor","mode",".","Usage",":",">",">",">","with","MetaTensorMode","(",")",":",">",">",">","#","all","torch.xxx","and","torch.distributed.xxx","will","be","replaced","by","patched","functions",">",">",">","#","and","the","actual","execution","will","be","on","torch.device","(","'meta","'",")",">",">",">","a","=","torch.rand","(","100000",",","100000",")",">",">",">","b","=","torch.rand","(","100000",",","100000",")",">",">",">","c","=","torch.mm","(","a",",","b",")"]
code: def __exit__(self, exc_type, exc_value, traceback):
      for func, func_impl in self.torch_overrides.items():
          setattr(torch, func, func_impl)
  
      for func, func_impl in self.dist_overrides.items():
          setattr(dist, func, func_impl)
  
imports: import uuid
  from functools import partial
  import torch
  import torch.distributed
  from torch.types import _device
  from torch.utils._pytree import tree_map
  from ._monkey_patch import _AliasATen, _DistCommMethod, _InplaceATen, _MaybeInplaceATen, _TorchOverrideableFactoryMethod
label_desc: Use image node_id 3 for calling the MetaTensorMode obj's underlying member method code with example usage: obj.__exit__(exc_type, exc_value, traceback) without return types