From ba76dbcd12e290a90bd632dbaeeed9050d85f0ad Mon Sep 17 00:00:00 2001 From: Andrey Churkin Date: Fri, 23 Aug 2024 13:45:13 +0100 Subject: [PATCH] Add docs --- nncf/quantization/algorithms/min_max/backend.py | 3 ++- nncf/quantization/passes.py | 9 +++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/nncf/quantization/algorithms/min_max/backend.py b/nncf/quantization/algorithms/min_max/backend.py index 26d1d7ca65d..73befbe90c7 100644 --- a/nncf/quantization/algorithms/min_max/backend.py +++ b/nncf/quantization/algorithms/min_max/backend.py @@ -36,7 +36,8 @@ class MinMaxAlgoBackend(ABC): @abstractmethod def preserved_metatypes(self) -> List[OperatorMetatype]: """ - TODO + Property for backend-specific metatypes that require preserving float subgraphs + when removing the ShapeOf subgraph. """ @property diff --git a/nncf/quantization/passes.py b/nncf/quantization/passes.py index 4c32dfd85e3..3d5cfa58e5f 100644 --- a/nncf/quantization/passes.py +++ b/nncf/quantization/passes.py @@ -100,10 +100,11 @@ def find_preserved_nodes( preserved_metatypes: List[OperatorMetatype], ) -> List[NNCFNode]: """ - :param graph: - :param shapeof_subgraphs: - :param preserved_metatypes: - :return: + :param graph: The input graph to be analyzed. + :param shapeof_subgraphs: A list of nodes belonging to ShapeOf subgraphs. + :param preserved_metatypes: Backend-specific metatypes that require preserving + float subgraphs when removing the ShapeOf subgraph. + :return: A list of nodes in float subgraphs of ShapeOf subgraphs. """ preserved_nodes = set() for node in graph.get_nodes_by_metatypes(preserved_metatypes):