from __future__ import annotations

import unittest
from typing import Any

class TestQuant2Int8MkldnnPassMul(unittest.TestCase):
    def op_name(self): ...
    scope: Any = ...
    place: Any = ...
    dtype: Any = ...
    use_mkldnn: bool = ...
    quantized_ops: Any = ...
    mul_input_size: Any = ...
    mul_weights_size: Any = ...
    mul_output_size: Any = ...
    mul_input: Any = ...
    mul_weights: Any = ...
    mul_weights_bad: Any = ...
    mul_output: Any = ...
    mul_output_scale: Any = ...
    variables_mul: Any = ...
    def setUp(self) -> None: ...
    def prepare_program_mul(self, program: Any) -> None: ...
    def test_dequantize_op_weights(self) -> None: ...

class TestQuant2Int8MkldnnPassMatmulV2(TestQuant2Int8MkldnnPassMul):
    def op_name(self): ...

class TestQuant2Int8MkldnnPassConv2D(unittest.TestCase):
    scope: Any = ...
    place: Any = ...
    dtype: Any = ...
    use_cudnn: bool = ...
    use_mkldnn: bool = ...
    data_format: str = ...
    pad: Any = ...
    stride: Any = ...
    dilations: Any = ...
    groups: int = ...
    input_size: Any = ...
    filter_size: Any = ...
    filter_size2: Any = ...
    conv_output_size: Any = ...
    conv_output2_size: Any = ...
    input: Any = ...
    filter: Any = ...
    filter2: Any = ...
    conv_output: Any = ...
    conv_output2: Any = ...
    quantized_ops: str = ...
    variables: Any = ...
    def setUp(self) -> None: ...
    def prepare_program_conv2d(self, program: Any) -> None: ...
    def remove_fuse_activation_attribute(self, graph: Any): ...
    def check_graph_before_pass(self, graph: Any) -> None: ...
    def check_graph_after_pass(self, graph: Any) -> None: ...
    def test_quant_update_activation(self) -> None: ...

    class TestQuant2Int8MkldnnPassNearestInterp(unittest.TestCase):
        def op_name(self): ...
        scope: Any = ...
        place: Any = ...
        dtype: Any = ...
        use_cudnn: bool = ...
        use_mkldnn: bool = ...
        data_format: str = ...
        pad: Any = ...
        stride: Any = ...
        dilations: Any = ...
        groups: int = ...
        input_size: Any = ...
        filter_size: Any = ...
        conv_output_size: Any = ...
        input: Any = ...
        filter: Any = ...
        conv_output: Any = ...
        out_h: int = ...
        out_w: int = ...
        scale: float = ...
        interp_method: str = ...
        data_layout: str = ...
        nearest_interp_output_size: Any = ...
        nearest_interp_output: Any = ...
        dropout_prob: float = ...
        dropout_out: Any = ...
        dropout_mask: Any = ...
        quantized_ops: Any = ...
        variables: Any = ...
        def setUp(self) -> None: ...
        def prepare_program(self, program: Any) -> None: ...
        def check_graph_after_pass(self, graph: Any) -> None: ...
        def test_quant_update_activation(self) -> None: ...

    class TestQuant2Int8MkldnnPassNearestInterpV2(unittest.TestCase):
        def op_name(self): ...
