MCPcopy
hub / github.com/OpenPPL/ppq / __init__

Method __init__

ppq/quantization/algorithm/training.py:198–203  ·  view source on GitHub ↗
(self, graph: BaseGraph, topo_order: List[Operation])

Source from the content-addressed store, hash-verified

196 Besides, there is a parameter 'limit' to control the size of each block.
197 """
198 def __init__(self, graph: BaseGraph, topo_order: List[Operation]) -> None:
199 self.graph = graph
200 self.op_orders = topo_order
201 self.depth = {}
202 self.search_engine = SearchableGraph(self.graph)
203 self.initialize_depth()
204
205 def create_block(self, sp: Operation, ep: Operation) -> TrainableBlock:
206 if sp == ep: return TrainableBlock(sp=sp, ep=ep, rps=[sp])

Callers

nothing calls this directly

Calls 2

initialize_depthMethod · 0.95
SearchableGraphClass · 0.90

Tested by

no test coverage detected