+
    &j                         ^ RI Ht ^ RIt^ RIHt ^ RIHt . ROt ! R R]P                  4      t ! R	 R]P                  4      t	 ! R
 R]P                  4      t
R# )    AnyN)nnQConfig	QuantStubDeQuantStubQuantWrapperc                   X   a a ] tR t^t oRtRV3R lV 3R llltV3R lR ltRtVtV ;t	# )r   a  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                .   < V ^8  d   QhRS[ R,          /#    qconfigNr   )format__classdict__s   "s/Users/jameslopez/projects/CWCArchive/cwc-podcast/.venv/lib/python3.14/site-packages/torch/ao/quantization/stubs.py__annotate__QuantStub.__annotate__   s     # #$ #    c                D   < \         SV `  4        V'       d	   Wn        R # R # Nsuper__init__r   selfr   	__class__s   &&r   r   QuantStub.__init__       "L r   c                N   < V ^8  d   QhRS[ P                  RS[ P                  /# r   xreturntorchTensor)r   r   s   "r   r   r      #       %,, r   c                    V# r    r   r"   s   &&r   forwardQuantStub.forward       r   r   r   
__name__
__module____qualname____firstlineno____doc__r   r+   __static_attributes____classdictcell____classcell__r   r   s   @@r   r   r      #     # #
  r   c                   X   a a ] tR t^t oRtRV3R lV 3R llltV3R lR ltRtVtV ;t	# )r	   a  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                .   < V ^8  d   QhRS[ R,          /# r   r   )r   r   s   "r   r   DeQuantStub.__annotate__&   s     # #d
 #r   c                D   < \         SV `  4        V'       d	   Wn        R # R # r   r   r   s   &&r   r   DeQuantStub.__init__&   r   r   c                N   < V ^8  d   QhRS[ P                  RS[ P                  /# r!   r$   )r   r   s   "r   r   r<   +   r'   r   c                    V# r   r)   r*   s   &&r   r+   DeQuantStub.forward+   r-   r   r.   r   r/   r8   s   @@r   r	   r	      r9   r   c                   `   a a ] tR t^/t oRtV3R lV 3R lltV3R lR ltV3R ltRtVt	V ;t
# )r
   a  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`.
c                4   < V ^8  d   QhRS[ P                  /# )r   module)r   Module)r   r   s   "r   r   QuantWrapper.__annotate__?   s     $ $ryy $r   c                  < \         SV `  4        \        VR R4      pV P                  R\	        V4      4       V P                  R\        V4      4       V P                  RV4       V P                  VP                  4       R# )r   NquantdequantrD   )r   r   getattr
add_moduler   r	   traintraining)r   rD   r   r   s   && r   r   QuantWrapper.__init__?   s`    &)T27!34	;w#78&)

6??#r   c                N   < V ^8  d   QhRS[ P                  RS[ P                  /# )r   Xr#   r$   )r   r   s   "r   r   rF   G   s#       %,, r   c                h    V P                  V4      pV P                  V4      pV P                  V4      # r   )rH   rD   rI   )r   rP   s   &&r   r+   QuantWrapper.forwardG   s*    JJqMKKN||Ar   c                R   < V ^8  d   Qh/ S[ ;R&   S[;R&   S[P                  ;R&   # )r   rH   rI   rD   )r   r	   r   rE   )r   r   s   "r   r   rF   /   s0          II r   r)   )r0   r1   r2   r3   r4   r   r+   __annotate_func__r5   r6   r7   r8   s   @@r   r
   r
   /   s%     	$ $ 1  r   )r   r	   r
   )typingr   r%   r   torch.ao.quantizationr   __all__rE   r   r	   r
   r)   r   r   <module>rX      sH       ) 7		 $")) $299 r   