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

Method load_graph

ppq/executor/torch.py:604–608  ·  view source on GitHub ↗
(self, graph: BaseGraph)

Source from the content-addressed store, hash-verified

602 hooks=hooks)
603
604 def load_graph(self, graph: BaseGraph) -> dict:
605 super().load_graph(graph)
606 self._deployed = False
607 self._runnable_graph = RunnableGraph(self._graph)
608 self._runnable_graph(GraphDeployCommand(device=self._device))
609
610 def quantize_function(self, tensor: torch.Tensor, config: TensorQuantizationConfig = None) -> torch.Tensor:
611 if config is None or not QuantizationStates.is_activated(config.state): return tensor

Callers 8

yolo6_sample.pyFile · 0.45
fp8_sample.pyFile · 0.45
bert_sample.pyFile · 0.45
fp8_sample.pyFile · 0.45
yolo_5.pyFile · 0.45
Example_PTQ.pyFile · 0.45
quantizeMethod · 0.45

Calls 2

RunnableGraphClass · 0.90
GraphDeployCommandClass · 0.90

Tested by

no test coverage detected