model_optimization icon indicating copy to clipboard operation
model_optimization copied to clipboard

Max Cut (Scheduler) algorithm implementation

Open ofirgo opened this issue 2 years ago • 0 comments

Implementing the scheduler algorithm for finding an optimal schedule for running a computation on a model. The algorithm also provides a mean for calculating the value of a Max Cut in a model computation graph (according to the found schedule). In addition, the algorithm returns a list of intermediate cuts which are built during the computation, to be used in the future to define and calculate Max Cut KPI for mixed-precision constraint.

The implementation include the following (key) classes and provedures:

  • DirectedBipartiteGraph - a base class representation of a bipartite graph.
  • MemoryGraph - A bipartite graph which represents the computation options on the actual model graph.
  • Cut - An object that represents a cut.
  • MemoryElements - a set of activation tensors to be used for defining a cut in the search.
  • MaxCutAstar - a class which implements the AStar-like solver for finding a schedule and a max cut.
  • compute_graph_max_cut - a wrapper function which runs AStar iterations for finding the optimal schedule.

ofirgo avatar Oct 06 '22 10:10 ofirgo