docstr: multi-cpu-core or mix cpu & multi-gpu
docstr_tok: ["multi-cpu-core","or","mix","cpu","&","multi-gpu"]
code: def fast_train_mp(self):
      """multi-cpu-core or mix cpu & multi-gpu"""
      self.init_device_emb()
      self.emb_model.share_memory()
  
      if self.args.count_params:
          sum_up_params(self.emb_model)
  
      start_all = time.time()
      ps = []
  
      for i in range(len(self.args.gpus)):
          p = mp.Process(
              target=self.fast_train_sp, args=(i, self.args.gpus[i])
          )
          ps.append(p)
          p.start()
  
      for p in ps:
          p.join()
  
      print("Used time: %.2fs" % (time.time() - start_all))
      if self.args.save_in_txt:
          self.emb_model.save_embedding_txt(
              self.dataset, self.args.output_emb_file
          )
      elif self.args.save_in_pt:
          self.emb_model.save_embedding_pt(
              self.dataset, self.args.output_emb_file
          )
      else:
          self.emb_model.save_embedding(
              self.dataset, self.args.output_emb_file
          )
  
file_path: dgl/examples/pytorch/ogb/deepwalk/deepwalk.py
imports: import argparse
  import os
  import random
  import time
  import dgl
  import numpy
  import torch
  import torch.multiprocessing
  from model import SkipGramModel
  from reading_data import DeepwalkDataset
  from torch.utils.data import DataLoader
  from utils import shuffle_walks, sum_up_params
label_desc: Use image node_id 4 for calling the DeepwalkTrainer obj's underlying member method code with example usage: obj.fast_train_mp() without return types