diff --git a/src/nncf/openvino/quantization/backend_parameters.py b/src/nncf/common/quantization/backend_parameters.py similarity index 57% rename from src/nncf/openvino/quantization/backend_parameters.py rename to src/nncf/common/quantization/backend_parameters.py index cd9dba8669e..4dd4b13990a 100644 --- a/src/nncf/openvino/quantization/backend_parameters.py +++ b/src/nncf/common/quantization/backend_parameters.py @@ -1,17 +1,7 @@ -# Copyright (c) 2025 Intel Corporation -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - from typing import Optional -from nncf.quantization.advanced_parameters import AdvancedQuantizationParameters +from nncf.common.quantization.backend_parameters import is_weight_compression_needed + class BackendParameters: diff --git a/src/nncf/experimental/torch/fx/quantization/backend_parameters.py b/src/nncf/experimental/torch/fx/quantization/backend_parameters.py deleted file mode 100644 index eca6c1d8bba..00000000000 --- a/src/nncf/experimental/torch/fx/quantization/backend_parameters.py +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright (c) 2025 Intel Corporation -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from typing import Optional - -from nncf.quantization.advanced_parameters import AdvancedQuantizationParameters - - -class FXBackendParameters: - COMPRESS_WEIGHTS = "compress_weights" - - -def is_weight_compression_needed(advanced_parameters: Optional[AdvancedQuantizationParameters]) -> bool: - """ - Determines whether weight compression is needed based on the provided - advanced quantization parameters. - - :param advanced_parameters: Advanced quantization parameters. - :return: True if weight compression is needed, False otherwise. - """ - if advanced_parameters is not None and advanced_parameters.backend_params is not None: - return advanced_parameters.backend_params.get(FXBackendParameters.COMPRESS_WEIGHTS, True) - return True diff --git a/src/nncf/version.py b/src/nncf/version.py index a51e0b6bea6..d82a4ff1bff 100644 --- a/src/nncf/version.py +++ b/src/nncf/version.py @@ -9,7 +9,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "2.19.0" +__version__ = "2.19.0.dev0+803b4985" BKC_TORCH_SPEC = "==2.8.*"