Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PTMeanReducer is removed #3016

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading