class_docstr: The parameter offload solver.
  
  Args:
      region_list (List[Region]): represents the linearized DNN computing graph.
      memory_budget (float): the given memory budget.
      error_factor (float): the error factor.
          It is used to reduce the memory budget. Due to some errors in the estimation of peak memory and execution time.
docstr: Compute the profits of the offload strategies,
  which packages the memory savings information for subsequent comparisons.
  
  Args:
      total_mem_saving (float): the total memory saving of the offload strategy.
      peak_mem_saving (float): the peak memory saving of the offload strategy.
      extra_cost (float): extra data transfer cost.
  
  Returns:
      tuple: profit information, the first term represents memory savings per unit of time.
docstr_tok: ["Compute","the","profits","of","the","offload","strategies",",","which","packages","the","memory","savings","information","for","subsequent","comparisons",".","Args",":","total_mem_saving","(","float",")",":","the","total","memory","saving","of","the","offload","strategy",".","peak_mem_saving","(","float",")",":","the","peak","memory","saving","of","the","offload","strategy",".","extra_cost","(","float",")",":","extra","data","transfer","cost",".","Returns",":","tuple",":","profit","information",",","the","first","term","represents","memory","savings","per","unit","of","time","."]
code: def _compute_offload_profit(
      self,
      total_mem_saving: float,
      peak_mem_saving: float,
      extra_cost: float,
  ):
      """
      Compute the profits of the offload strategies,
      which packages the memory savings information for subsequent comparisons.
  
      Args:
          total_mem_saving (float): the total memory saving of the offload strategy.
          peak_mem_saving (float): the peak memory saving of the offload strategy.
          extra_cost (float): extra data transfer cost.
  
      Returns:
          tuple: profit information, the first term represents memory savings per unit of time.
      """
  
      if extra_cost == 0:
          # means data transfer overhead can be completely overlapped
          return (float("inf"), total_mem_saving, peak_mem_saving)
      return (
          total_mem_saving / extra_cost,
          total_mem_saving,
          peak_mem_saving,
      )
  
imports: import time
  from abc import ABC, abstractmethod
  from typing import Dict, List, Type
  import torch
  from torch.fx.node import Node
  from colossalai.utils.device import get_current_device
  from .region import Region
  from .training_simulator import AsynTrainingSimulator, SynTrainingSimulator, TrainingSimulator
  from .util import NodeInfo, NvDevicePower
label_desc: Use image node_id 5 for calling the Solver obj's underlying member method code with example usage: obj._compute_offload_profit(total_mem_saving, peak_mem_saving, extra_cost) and returns: unknown,  total_mem_saving,  peak_mem_saving, float,  total_mem_saving,  peak_mem_saving