Skip to content

Commit

Permalink
PTMeanReducer is removed (#3016)
Browse files Browse the repository at this point in the history
### Changes

PTMeanReducer is removed

### Reason for changes

To fix pre-commit
  • Loading branch information
daniil-lyakhov authored Oct 15, 2024
1 parent 30f579b commit 03f2422
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from nncf.common.graph.transformations.commands import TargetType
from nncf.common.graph.transformations.layout import TransformationLayout
from nncf.common.tensor_statistics.statistics import WCTensorStatistic
from nncf.experimental.common.tensor_statistics.collectors import MeanReducer
from nncf.experimental.common.tensor_statistics.collectors import NoopAggregator
from nncf.experimental.common.tensor_statistics.collectors import ShapeReducer
from nncf.experimental.common.tensor_statistics.collectors import TensorCollector
Expand All @@ -44,7 +45,6 @@
from nncf.torch.nncf_network import NNCFNetwork
from nncf.torch.quantization.layers import AsymmetricWeightsDecompressor
from nncf.torch.quantization.layers import SymmetricWeightsDecompressor
from nncf.torch.tensor_statistics.collectors import PTMeanReducer


class PTWeightCompressionAlgoBackend(WeightCompressionAlgoBackend):
Expand Down Expand Up @@ -148,7 +148,7 @@ def target_point(target_type: TargetType, target_node_name: str, port_id: int) -
def mean_statistic_collector(
self, reduction_axes: Tuple[int], subset_size: Optional[int] = None
) -> TensorCollector:
mean_reducer = PTMeanReducer(reduction_axes)
mean_reducer = MeanReducer(reduction_axes)
shape_reducer = ShapeReducer()
collector = TensorCollector(WCTensorStatistic)
collector.register_statistic_branch(WCTensorStatistic.MEAN_STAT, mean_reducer, NoopAggregator(subset_size))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
from nncf.common.graph.transformations.commands import TargetType
from nncf.common.graph.transformations.layout import TransformationLayout
from nncf.common.tensor_statistics.statistics import WCTensorStatistic
from nncf.experimental.common.tensor_statistics.collectors import MeanReducer
from nncf.experimental.common.tensor_statistics.collectors import NoopAggregator
from nncf.experimental.common.tensor_statistics.collectors import ShapeReducer
from nncf.experimental.common.tensor_statistics.collectors import TensorCollector
Expand All @@ -46,7 +47,6 @@
from nncf.torch.model_graph_manager import get_weight_tensor_port_ids
from nncf.torch.quantization.layers import AsymmetricWeightsDecompressor
from nncf.torch.quantization.layers import SymmetricWeightsDecompressor
from nncf.torch.tensor_statistics.collectors import PTMeanReducer


class FXWeightCompressionAlgoBackend(WeightCompressionAlgoBackend):
Expand Down Expand Up @@ -114,7 +114,7 @@ def target_point(target_type: TargetType, target_node_name: str, port_id: int) -
def mean_statistic_collector(
self, reduction_axes: Tuple[int], subset_size: Optional[int] = None
) -> TensorCollector:
mean_reducer = PTMeanReducer(reduction_axes)
mean_reducer = MeanReducer(reduction_axes)
shape_reducer = ShapeReducer()
collector = TensorCollector(WCTensorStatistic)
collector.register_statistic_branch(WCTensorStatistic.MEAN_STAT, mean_reducer, NoopAggregator(subset_size))
Expand Down

0 comments on commit 03f2422

Please sign in to comment.