docstr: Call the solver to search an efficient parameter offloading strategy for the linearized graph.
  The solver adopts greedy algorithm.
  
  Raises:
      NotImplementedError: Unable to find a solution for the given memory budget.
docstr_tok: ["Call","the","solver","to","search","an","efficient","parameter","offloading","strategy","for","the","linearized","graph",".","The","solver","adopts","greedy","algorithm",".","Raises",":","NotImplementedError",":","Unable","to","find","a","solution","for","the","given","memory","budget","."]
code: def _call_solver(self):
      """
      Call the solver to search an efficient parameter offloading strategy for the linearized graph.
      The solver adopts greedy algorithm.
  
      Raises:
          NotImplementedError: Unable to find a solution for the given memory budget.
      """
  
      print("search offloading strategy ......")
      while self.best_ts.peak_mem > self.memory_budget:
          offload_region = None
          best_ts = None
          max_profit = (0,)
  
          # search which region should be offloaded,
          # the last region does not need to be offloaded.
          for region in self.region_list[:-1]:
              if region.param_size and not region.need_offload:
                  temp_ts, profit = self._try_to_offload(region)
                  if self._compare_profit(profit, max_profit):
                      offload_region = region
                      max_profit = profit
                      best_ts = temp_ts
  
          if offload_region is not None and best_ts is not None:
              offload_region.need_offload = True
              offload_region.is_syn = True
              self._update_state(best_ts)
          else:
              raise NotImplementedError(
                  f"can't find the offload strategy met the memory budget {self.memory_budget / 1024 ** 2} MB, "
                  f"it needs {self.best_ts.peak_mem / 1024 ** 2:.3f} MB at least!"
              )
  
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 3 for calling the SynGreedySolver obj's underlying member method code with example usage: obj._call_solver() without return types