Ë
    g^(hø  ã                   óŽ   — d dl mZ  G d„ dej                  «      Z G d„ dej                  «      Z G d„ dej                  «      Zy)	é    )Únnc                   ó*   ‡ — e Zd ZdZdˆ fd„	Zd„ Zˆ xZS )Ú	QuantStuba  Quantize stub module, before calibration, this is same as an observer,
    it will be swapped as `nnq.Quantize` in `convert`.

    Args:
        qconfig: quantization configuration for the tensor,
            if qconfig is not provided, we will get qconfig from parent modules
    c                 ó6   •— t         ‰| �  «        |r|| _        y y ©N©ÚsuperÚ__init__Úqconfig©Úselfr   Ú	__class__s     €úY/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/torch/ao/quantization/stubs.pyr
   zQuantStub.__init__   ó   ø€ Ü‰ÑÔÙØ"ˆD�Lð ó    c                 ó   — |S r   © ©r   Úxs     r   ÚforwardzQuantStub.forward   ó   € Øˆr   r   ©Ú__name__Ú
__module__Ú__qualname__Ú__doc__r
   r   Ú__classcell__©r   s   @r   r   r      ó   ø„ ñõ#ö
r   r   c                   ó*   ‡ — e Zd ZdZdˆ fd„	Zd„ Zˆ xZS )ÚDeQuantStuba  Dequantize stub module, before calibration, this is same as identity,
    this will be swapped as `nnq.DeQuantize` in `convert`.

    Args:
        qconfig: quantization configuration for the tensor,
            if qconfig is not provided, we will get qconfig from parent modules
    c                 ó6   •— t         ‰| �  «        |r|| _        y y r   r   r   s     €r   r
   zDeQuantStub.__init__!   r   r   c                 ó   — |S r   r   r   s     r   r   zDeQuantStub.forward&   r   r   r   r   r   s   @r   r!   r!      r   r   r!   c                   ó\   ‡ — e Zd ZU dZeed<   eed<   ej                  ed<   ˆ fd„Z	d„ Z
ˆ xZS )ÚQuantWrapperaç  A wrapper class that wraps the input module, adds QuantStub and
    DeQuantStub and surround the call to module with call to quant and dequant
    modules.

    This is used by the `quantization` utility functions to add the quant and
    dequant modules, before `convert` function `QuantStub` will just be observer,
    it observes the input tensor, after `convert`, `QuantStub`
    will be swapped to `nnq.Quantize` which does actual quantization. Similarly
    for `DeQuantStub`.
    ÚquantÚdequantÚmodulec                 ó  •— t         ‰| �  «        t        |dd «      }| j                  dt	        |«      «       | j                  dt        |«      «       | j                  d|«       | j                  |j                  «       y )Nr   r&   r'   r(   )r	   r
   ÚgetattrÚ
add_moduler   r!   ÚtrainÚtraining)r   r(   r   r   s      €r   r
   zQuantWrapper.__init__9   s`   ø€ Ü‰ÑÔÜ˜& )¨TÓ2ˆØ�‰˜¤¨7Ó!3Ô4Ø�‰˜	¤;¨wÓ#7Ô8Ø�‰˜ &Ô)Ø�
‰
�6—?‘?Õ#r   c                 óh   — | j                  |«      }| j                  |«      }| j                  |«      S r   )r&   r(   r'   )r   ÚXs     r   r   zQuantWrapper.forwardA   s*   € Ø�J‰J�q‹MˆØ�K‰K˜‹NˆØ�|‰|˜A‹Ðr   )r   r   r   r   r   Ú__annotations__r!   r   ÚModuler
   r   r   r   s   @r   r%   r%   *   s*   ø… ñ	ð ÓØÓØ�I‰IÓô$ör   r%   N)Útorchr   r1   r   r!   r%   r   r   r   ú<module>r3      s:   ðõ ô�—	‘	ô ô$�"—)‘)ô ô$�2—9‘9õ r   