class_docstr: Accelerator is an abstraction for the hardware device that is used to run the model.
  
  Args:
      device (str): The device to be used. Currently only support 'cpu' and 'gpu'.
class_docstr_tok: ["Accelerator","is","an","abstraction","for","the","hardware","device","that","is","used","to","run","the","model",".","Args",":","device","(","str",")",":","The","device","to","be","used",".","Currently","only","support","'cpu","'","and","'gpu","'","."]
docstr: Set the default device for the current process.
docstr_tok: ["Set","the","default","device","for","the","current","process","."]
code: def bind(self):
      """
      Set the default device for the current process.
      """
      if self.device == "cpu":
          pass
      elif self.device == "cuda":
          # TODO(FrankLeeeee): use global environment to check if it is a dist job
          # if is_distributed:
          #     local_rank = EnvTable().get_local_rank()
          #     torch.cuda.set_device(torch.device(f'cuda:{local_rank}'))
          torch.cuda.set_device(torch.device("cuda"))
      else:
          raise ValueError(f"Device {self.device} is not supported yet")
  
imports: import torch
  import torch.nn
label_desc: Use image node_id 2 for calling the Accelerator obj's underlying member method code with example usage: obj.bind() without return types