Skip to content

Commit 98a08f4

Browse files
[OpenVINOQuantizer] Mark quantizer and quantize_pt2e as API
1 parent 77ef40c commit 98a08f4

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

nncf/experimental/torch/fx/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@
88
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
99
# See the License for the specific language governing permissions and
1010
# limitations under the License.
11+
12+
from nncf.experimental.torch.fx.quantization.quantize_pt2e import quantize_pt2e as quantize_pt2e
13+
from nncf.experimental.torch.fx.quantization.quantizer.openvino_quantizer import OpenVINOQuantizer as OpenVINOQuantizer

nncf/experimental/torch/fx/quantization/quantize_pt2e.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import nncf
2626
from nncf.common.factory import NNCFGraphFactory
2727
from nncf.common.logging import nncf_logger
28+
from nncf.common.utils.api_marker import api
2829
from nncf.data import Dataset
2930
from nncf.experimental.quantization.algorithms.post_training.algorithm import ExperimentalPostTrainingQuantization
3031
from nncf.experimental.torch.fx.constant_folding import constant_fold
@@ -38,6 +39,7 @@
3839
from nncf.quantization.advanced_parameters import RangeEstimatorParameters
3940

4041

42+
@api()
4143
def quantize_pt2e(
4244
model: torch.fx.GraphModule,
4345
quantizer: Quantizer,

nncf/experimental/torch/fx/quantization/quantizer/openvino_quantizer.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
from nncf.common.quantization.quantizer_setup import SingleConfigQuantizerSetup
3131
from nncf.common.quantization.structs import QuantizationPreset
3232
from nncf.common.quantization.structs import QuantizationScheme
33+
from nncf.common.utils.api_marker import api
3334
from nncf.experimental.torch.fx.nncf_graph_builder import GraphConverter
3435
from nncf.experimental.torch.fx.node_utils import get_graph_node_by_name
3536
from nncf.experimental.torch.fx.transformations import fold_constant_except_qdq
@@ -46,6 +47,7 @@
4647
QUANT_ANNOTATION_KEY = "quantization_annotation"
4748

4849

50+
@api()
4951
class OpenVINOQuantizer(TorchAOQuantizer):
5052
"""
5153
Implementation of the Torch AO quantizer which annotates models with quantization annotations

0 commit comments

Comments
 (0)