
    [Thm                        S r SSKrSSKrSSKJr  SSKJrJr  SSKJ	r	J
r
JrJr  SSKrSSKJr  SSKJr  SSKJr  \\\\4   \\\\\4   4   \	4   rS	\l        \	r\\
\\
\
4   \\
\\
\
4   4   \	4   rS	\l         " S
 S5      r\R4                  R6                  \R4                  R8                  \R4                  R:                  \R4                  R<                  \R4                  R>                  \R4                  R@                  \R4                  RB                  \R4                  RD                  \R4                  RF                  \R4                  RH                  \R4                  RJ                  \R4                  RL                  \R4                  RN                  \R4                  RP                  \R4                  RR                  1r*\R4                  RV                  RX                  \R4                  RV                  RZ                  \R4                  RV                  R\                  \R4                  RV                  R^                  \R4                  RV                  R`                  \R4                  RV                  Rb                  \R4                  RV                  Rd                  \R4                  RV                  Rf                  \R4                  RV                  Rh                  \R4                  RV                  Rj                  \R4                  RV                  Rl                  \R4                  RV                  Rn                  \R4                  RV                  Rp                  \R4                  RV                  Rr                  \R4                  RV                  Rt                  \R4                  RV                  Rv                  \R4                  RV                  Rx                  \R4                  RV                  Rz                  \R4                  RV                  R|                  \R~                  \R                  \R|                  \R                  \R                  \R                  \R                  \R                  \R                  1rG\R                  SSSSSSSSSSSSSSSSSSSSS S!S"S#1rIS$ rJS% rKS& rLS' rMS(\	S)\NS*\	4S+ jrOS, rPS- rQS. rRS/ rSS0 rTS1 rUS2 rVS3 rWS4 rXS5 rYS6 rZS*\[4S7 jr\S8 r]S9 r^S:\R                  S;\R                  S*\[4S< jr`S=\aS>\aS?\[S@\R                  SA\[S*\\a\a4   4SB jrcSC rdSD reSE\R4                  R                  SF\R4                  R                  S*\\N   4SG jrgSH\
SI\h\N\	4   S*\h\N\	4   4SJ jriSH\
S*SK4SL jrjSM\
SI\h\N\	4   S*SK4SN jrkS=\aS>\aS*S4SO jrl\R                  4S:\R                  S;\R                  S=\aS>\aS@\R                  SP\R                  S?\[SQ\R                  S*\\R                  \R                  4   4SR jjroSH\
S*\a4SS jrpST\R4                  R                  SU\\	SV4   S*\h\N\\	SV4   4   4SW jrqSX\R4                  R                  S*\	4SY jrr/ SZQrsg)[z?
Utils shared by different modes of quantization (eager/graph)
    N)OrderedDict)getfullargspec	signature)AnyCallableOptionalUnion)	QuantType)Node)is_parametrizedztorch.ao.quantization.utilsc                       \ rS rSrSrSrg)MatchAllNode%   zfA node pattern that matches all nodes, used in defining
fusion patterns in FX Graph Mode Quantization
 N)__name__
__module____qualname____firstlineno____doc____static_attributes__r       S/var/www/auris/envauris/lib/python3.13/site-packages/torch/ao/quantization/utils.pyr   r   %   s    r   r   relurelu_
contiguousdetachdetach_hardsigmoidhardsigmoid_permuterepeatrepeat_interleavereshaperesize_shapesigmoidsigmoid_sizesqueezesqueeze_tanhtanh_	transpose	unsqueeze
unsqueeze_viewc                 *   U R                   S:H  =(       a    U R                  [        ;   nU R                   S:H  =(       a    U R                  [        ;   nU R                   S:H  =(       a(    [	        U[        U R                  5         5      [        ;   nX#U4$ )Ncall_functioncall_methodcall_module)optarget	func_listmethod_listtypestrmodule_type_list)nodemodulesis_call_functionis_call_methodis_call_modules        r   
check_noderA   x   sw    ww/1NdkkY6NWW-L$++2LN= XT'#dkk2B*C%DHX%X  ^;;r   c                 H    U R                  5       nUR                  U5        U$ )a{  
Combines two dictionaries.

This function takes two dictionaries as input and returns a new dictionary
that contains all the key-value pairs from both input dictionaries.
If there are any duplicate keys in the `additional_dict`, the values
from the `additional_dict` will overwrite those in the `default_dict`.
Args:
    default_dict (dict): The main dictionary that will be used as the base
    additional_dict (dict): The dictionary used to update `default_dict`

Returns:
    dict: The resulting dictionary
Example:
    >>> x = dict(a=1, b=1)
    >>> y = dict(b=2, c=3)
    >>> get_combined_dict(x, y)
    {'a': 1, 'b': 2, 'c': 3}
)copyupdate)default_dictadditional_dictds      r   get_combined_dictrH      s#    ( 	AHH_Hr   c                 \    U [         R                  :H  =(       d    U [         R                  :H  $ N)torchper_tensor_affineper_tensor_symmetricqschemes    r   is_per_tensorrP      s#    e---VE<V<V1VVr   c                 f    U [         R                  [         R                  [         R                  4;   $ rJ   )rK   per_channel_affine per_channel_affine_float_qparamsper_channel_symmetricrN   s    r   is_per_channelrU      s/      ..##  r   objfqnreturnc                 X    [         R                  " [        UR                  S5      U 5      $ )zG
Given an obj and a fqn such as "foo.bar.baz", returns gm.foo.bar.baz.
.)	functoolsreducegetattrsplit)rV   rW   s     r   getattr_from_fqnr_      s!     GSYYs^S99r   c                    [         R                  [         R                  [         R                  [         R                  [         R
                  [         R                  [         R                  [         R                  [         R                  [         R                  [         R                  [         R                  [         R                  [         R                  [         R                  [         R                  [         R                  [         R                  [         R                  [         R                  [         R                  [         R                  [         R                  [         R                  0nX;   d   S[        U 5      -   5       eX   $ )NzUnsupported dtype: )rK   quint8uint8qint8int8qint32int32quint4x2quint2x4uint16int16float8_e5m2float8_e4m3fnr:   )qdtypeDTYPE_MAPPINGs     r   to_underlying_dtypero      s    ekkUZZekkU[[

EJJellU[[U[[5,,U00M "G$9CK$GG"  r   c                 &   SSK Jn  [        U SS 5      nU R                  nX#S.nU(       a  [	        X5      (       a  S US.$ [        U5      (       a  [        R                  nOR[        U5      (       a4  U[        R                  :X  a  [        R                  nU R                  US'   O[        SU 35      eX$S'   U R                  5       u  pVXTS'   XdS'   [        U S	5      (       a  U R                  US	'   [        U S
5      (       a  U R                   US
'   U$ )Nr   )PlaceholderObserverrO   )rO   dtypeaxiszUnrecognized qscheme: scale
zero_point	quant_min	quant_max)torch.ao.quantization.observerrq   r]   rr   
isinstancerP   rK   rL   rU   rT   rR   ch_axisRuntimeErrorcalculate_qparamshasattrrv   rw   )observer_or_fake_quantrq   rO   rr   qparamsrt   ru   s          r   get_qparam_dictr      s
   B,i>G"((E!2Gj!7MM%00W))		 	  e111..G0883G9=>> !I.@@BEG&L%{335??%{335??Nr   c                     [        U5      nUR                  U0 5      n[        U 5      U;   d   S[        U 5       SU 35       eU[        U 5         $ )a  Get the observed/quantized custom module class that we need
to swap `custom_module` to
Input:
    custom_module: input, can be an instance of either a float or observed custom module
    custom_module_class_mapping: the float to observed or observed to quantized custom module class mapping
    qconfig: qconfig configured for the custom module

Output:
    corresponding observed/quantized custom module class for input custom module instance
z5did not find corresponding observed module class for z in mapping: )get_quant_typegetr9   )custom_modulecustom_module_class_mappingqconfig
quant_typeclass_mappings        r   get_swapped_custom_module_classr      sh      (J/33JCM-/ 	 /0m_	N/ m,--r   c                 D    U c   eU R                  5       nUR                  $ rJ   )
activationrr   )r   r   s     r   activation_dtyper      s(    ##%Jr   c                 D    U c   eU R                  5       nUR                  $ rJ   )weightrr   )r   r   s     r   weight_dtyper     s$    ^^F<<r   c                 x   [        U 5      [        R                  [        R                  [        R                  [        R
                  [        R                  [        R                  [        R                  [        R                  [        R                  [        R                  4
;   =(       a    [        U 5      (       + $ )zGiven a qconfig, decide if the activation needs to be
quantized or not, this includes quantizing to quint8, qint8 and qint32 and float16
)r   rK   ra   rc   re   float16rb   rd   rj   rf   rk   rl   #activation_is_dynamically_quantizedr   s    r   "activation_is_statically_quantizedr     sw     G$

)  = 37;;=r   c                 "    [        U 5      u  pnU$ )zGiven a qconfig, decide if the activation needs to be
dynamically quantized or not, this includes dynamically quantizing to
quint8, qint8 and float16
)get_qconfig_dtypes)r   _activation_dtype_activation_is_dynamics       r   r   r     s    
 3EW2M//  r   c                     [        U 5      [        R                  [        R                  [        R                  [        R
                  4;   $ )zzGiven a qconfig, decide if the activation needs to be
quantized to int8 or not, this includes quantizing to quint8, qint8
)r   rK   ra   rc   rb   rd   r   s    r   activation_is_int8_quantizedr   "  s7     G$

	)  r   c                 Z    [        U 5      [        R                  [        R                  4;   $ )zPGiven a qconfig, decide if the activation needs to be
quantized to int32 or not
)r   rK   re   rf   r   s    r   activation_is_int32_quantizedr   .  s!     G$u{{(CCCr   c                 J   [        U 5      [        R                  [        R                  [        R                  [        R
                  [        R                  [        R                  [        R                  [        R                  [        R                  [        R                  4
;   $ )zCGiven a qconfig, decide if the weight needs to be
quantized or not
)r   rK   ra   rc   r   rg   rb   rd   rj   rf   rk   rl   r   s    r   weight_is_quantizedr   5  se      

%  r   c                     [        U 5      [        R                  [        R                  [        R                  [        R
                  4;   $ )zNGiven a qconfig, decide if the weight needs to be statically
quantized or not
)r   rK   ra   rc   rb   rd   r   s    r   weight_is_statically_quantizedr   G  s-      U\\5;;UZZ$XXXr   c                     [        U 5      u  pnU[        R                  [        R                  4;   =(       a,    U[        R                  [        R
                  4;   =(       a    U$ )zLGiven a qconfig, returns True if this op is using int8 dynamic
quantization
)r   rK   ra   rb   rc   rd   )r   r   r   r   s       r    op_is_int8_dynamically_quantizedr   N  sV     =Ow<W9$9U\\5;;77 	" 	ejj11	" "r   c                     U c   eU R                  5       nU R                  5       n[        USS5      nUR                  UR                  U4$ )z_returns the qconfig tuple for qconfig:
(activation_dtype, weight_dtype, activation_is_dynamic)

is_dynamicF)r   r   r]   rr   )r   r   r   act_is_dynamics       r   r   r   \  sO     ##%J^^FZu=NfllN;;r   c           
         U c   eU R                  5       nU R                  5       n[        R                  [        R                  [        R
                  [        R                  [        R                  [        R                  [        R                  [        R                  [        R                  [        R                  /
nUR                  U;   ab  [        US5      (       a!  UR                  (       a  [         R"                  $ UR                  U;   a  [         R$                  $ [         R&                  $ UR                  [        R(                  :X  a`  [        US5      (       a!  UR                  (       a  [         R"                  $ UR                  [        R(                  :X  a  [         R$                  $ [+        SUR                   SUR                   S35      e)Nr   z=Unrecognized dtype combination in get_quant_type: activation(z	),weight())r   r   rK   ra   rc   rg   re   rb   rd   rj   rf   rk   rl   rr   r}   r   r
   DYNAMICSTATICWEIGHT_ONLYr   	Exception)r   r   r   static_dtypess       r   r   r   g  sN   ##%J^^F

M ||}$:|,,1F1F$$$.###(((||u}}$:|,,1F1F$$$.###

G
HXHXGY Z,,q	" r   min_valmax_valc                    U R                  5       S:X  d  UR                  5       S:X  a  [        R                  " S5        gU R                  5       S:X  d  UR                  5       S:X  aI  U [	        S5      :X  a&  U[	        S5      :X  a  [        R                  " S5        gX::  d   SU  SU 35       e g[
        R                  " X:*  5      (       d   SU  SU 35       eg)	zChecks if the given minimum and maximum values are valid, meaning that
they exist and the min value is less than the max value.
r   zMmust run observer before calling calculate_qparams. Returning default values.Finfz-infzmin z should be less than max T)numelwarningswarndimfloatrK   all)r   r   s     r   check_min_max_validr     s     }}!w}}!3*	
 {{}W[[]a/eEl"w%-'?MM.
 !UT'2KG9#UU! 	 yy
 
 	>'3G9=	> 
 r   rv   rw   has_customized_qrangerr   reduce_rangec                 v   U(       a  U[         R                  [         R                  4;   a  Su  pVOSu  pVXpUb  Ub  UUpeXe-
  S-   n	U[         R                  [         R                  4;   a  SU	s=:  a  S::  d    S5       e   S5       eOAU[         R                  [         R                  4;   a  SU	s=:  a  S::  d    S5       e   S5       eU(       a	  U S	-  US	-  pX4$ U[         R                  [         R                  4;   a  U(       a  S
u  pX4$ Su  p X4$ U[         R
                  [         R                  4;   a  U(       a  Su  pX4$ Su  p X4$ U[         R                  [         R                  4;   a  Su  pX4$ U[         R                  4;   a  Su  pX4$ U[         R                  4;   a  Su  pX4$ Su  pX4$ )zlCalculates actual qmin and qmax based on the quantization range,
observer datatype and if range is reduced.
)r   l    )r         r      zRquantization range should be positive and not exceed the maximum bit range (=256).l        zYquantization range should be positive and not exceed the maximum bit range (=4294967296).   )i?   )i   )r   r   )i   i)r   i  )i i  )r      )	rK   re   rf   rc   rd   ra   rb   ri   rj   )
rv   rw   r   rr   r   initial_quant_mininitial_quant_maxcustom_quant_mincustom_quant_max
qrange_lens
             r   calculate_qmin_qmaxr     s     U\\5;;//3?00390 .7*',<,H    1
 ':Q>
U[[%**--J%#%dcd%dcd%u||U[[11J'%'kjk'kjk'#,>9>y* % U[[%**--'.$	   (1$	9  u||U[[11'-$	  (.$	9  u||U[[11#< I  u||n$#/ I
 	 u{{m##6 I  $) Ir   c                 f    U R                  SS5      n[        U5      S:X  a  SUS   4$ US   US   4$ )z$
Turn 'foo.bar' into ['foo', 'bar']
rZ   r    r   )rsplitlen)r6   rs     r   _parent_namer     s>     	c1A
1v{1Q4xtQqTzr   c                     [        U R                  5      S:X  a  g[        U 5      (       a.  [        U R                  5      S:H  =(       a    SU R                  ;   $ g)z
Checks if module._modules is empty or
if module is a parametrization, checks that module._modules only has
the 'parametrizations' module
r   Tr   parametrizationsF)r   _modulesr   )modules    r   )has_no_children_ignoring_parametrizationsr     sI     6??q 		 	 6??#q(R-?6??-RRr   root	submodulec                 F    U R                  5        H  u  p#XL d  M  Us  $    g)a.  Get the path (fully qualified name) of a submodule

Example::

>> class M(torch.nn.Module):
       def __init__(self) -> None:
           self.linear = torch.nn.Linear(5, 5)
       def forward(self, x):
           return self.linear(x)

>> m = M()
>> l = m.linear
>> _get_path_of_module(m, l)
"linear"
N)named_modules)r   r   nps       r   _get_path_of_moduler     s(    $ ""$>H % r   flocc                     UR                  5        VVs0 s H"  u  p#U[        U 5      R                  ;   d  M   X#_M$     snn$ s  snnf )zGet local keyword arguments

Example::

>> def f(self, a, b=9):
       pass
>> loc = {"a": 6, "c": 7}
>> _get_signature_locals(f, loc)
{"a": 6}
)itemsr   
parameters)r   r   kvs       r   _get_signature_localsr     s9     !YY[I[TQA11H1H,HDAD[IIIs
   AAzOrderedDict[str, Any]c                 B   0 n[        U 5      R                  R                  5        Hl  u  p#UR                  UR                  La  UR                  X'   M.  UR
                  UR                  L a  SX'   MM  UR
                  UR                  L d  Mh  0 X'   Mn     [        U5      $ )zGet all default keyword arguments from function signature

Example::

>> def f(self, a, b=9):
       pass
>> _get_default_kwargs(f)
{"b": 9}
r   )	r   r   r   defaultemptykindVAR_POSITIONALVAR_KEYWORDr   )r   kwargsnameparams       r   _get_default_kwargsr   %  s     F |..446==+ ==FLZZ5///FLZZ5,,,FL 7 vr   funcc                     [        U 5      n[        X5      nUR                  5       nUR                  5        H  u  pVXT;   d  M  XdU'   M     U$ )a  Given a function and local function arguments, normalize the keyword
arguments by filling in default arguments from function signature

Example::

>> def f(self, key1=3, key2=3):
       pass
>> loc = {"key2": 6}
>> _normalize_kwargs(f, loc)
{"key1": 3, "key2": 6}
)r   r   rC   r   )r   r   default_kwargslocal_kwargsnormalized_kwargsattrvals          r   _normalize_kwargsr   :  sR     ).N(3L&++-!'')	$&)d# * r   c                 V    U Ss=::  a  U::  d    S5       e   S5       eX:  d   S5       eg)a=  Validates that the user-specified quantization range is properly initialized
and within the given bound supported by the observer dtype.

To accommodate lower-bit quantization with respect to the existing torch.qint8 and
torch.quint8 datatypes, the user can choose to use dynamic quantization range by passing
in a tuple of initial qmin and qmax values. One use case is these customized qmin and qmax
values are used to calculate static estimates of the scale and zero point for aggressive lower-bit
fake quantization. These estimates are compared against parameters learned through backpropagation.
The related literatures for scale and zero point via backpropagation are as follows:

Learned Step Size Quantization: https://openreview.net/pdf?id=rkgO66VKDS
Trained Quantization Thresholds: https://arxiv.org/pdf/1903.08066.pdf
r   z1Used-specified quantization range must include 0.zKqmin must be strictly less than qmax for user-specified quantization range.Nr   )rv   rw   s     r   validate_qmin_qmaxr   P  sK    " 	Q#)#;:;#;:;# 	UTUr   epsrO   c                    [        X5      (       dT  [        R                  " S/U R                  R                  S9[        R                  " S/U R                  R                  S94$ [        R
                  " U [        R                  " U 5      5      n[        R                  " U[        R                  " U5      5      n	UR                  n
[        R                  " UR                  5       [        R                  U
S9n[        R                  " UR                  5       [        R                  U
S9nUR                  U
5      nU[        R                  :X  d  U[        R                  :X  a  [        R                  " U* U	5      n	U	[!        X2-
  5      S-  -  n[        R                  " X5      nU[        R"                  [        R$                  4;   aM  U(       a&  UR'                  UR                  5       X#-   S-  5      nOUR'                  UR                  5       S5      nOU[        R(                  :X  aI  X-
  [!        X2-
  5      -  n[        R*                  " X:  U[        R,                  " U5      5      nSU -  U-  nOwX-
  [!        X2-
  5      -  n[        R                  " X5      nU[        R.                  " X-  5      R                  [        R0                  5      -
  n[        R2                  " XU5      n[5        UR6                  5      S:X  a*  [        R                  " [!        U5      /UR8                  U
S9n[5        UR6                  5      S:X  ah  [        R                  " [1        U5      /UR8                  U
S9nU[        R(                  :X  a*  [        R                  " [!        U5      /UR8                  U
S9nUR                  [        R                  5      UR                  [        R                  5      4$ )aD  Calculates the quantization parameters, given min and max
value tensors. Works for both per tensor and per channel cases

Args:
    min_val: Minimum values per channel
    max_val: Maximum values per channel

Returns:
    scales: Scales tensor of shape (#channels,)
    zero_points: Zero points tensor of shape (#channels,)
g      ?)devicer   )rr   r   r      )r   rK   tensorr   r9   min
zeros_likemaxonesr(   doublezerosint64torM   rT   r   rb   ra   new_fullrS   where	ones_likeroundintclampr   r%   rr   )r   r   rv   rw   rr   r   r   rO   min_val_negmax_val_posr   rt   ru   s                r   determine_qparamsr  l  s   * w00||SE'..*=*=>C++A
 
 	
 ))GU%5%5g%>?K))GU%5%5g%>?KFJJ{'')fME[--/u{{6RJ
&&.C%,,,5;V;V0Viik:uY%:;a?@		%%U[[%,,//$'00OO%	(=!'C
 (001BCH
	E::	:"eI,A&BBEK0FG
 '\E)
*eI4I.JJ		%%[-@!A!D!DUYY!OO
[[	B
 5;;1eEl^5;;vN
:!\\_Z%5%5f

 e<<<z"#:+;+;FJ 88ELL!:==#===r   c                 >    [        [        U 5      R                  5      $ )zGet number of positional args for a function

Example::

>> def f(self, key1=3, key2=3):
       pass
>> _get_num_pos_args(f)
3
)r   r   args)r   s    r   _get_num_pos_argsr    s     ~a %%&&r   modelexample_inputs.c                 <  ^^^ U m0 mUUU4S jn[         R                  R                  R                  mU[         R                  R                  l         U " U6   T[         R                  R                  l        T$ ! T[         R                  R                  l        f = f)a  Given a model and its example inputs, return a dictionary from
fully qualified name of submodules to example_inputs for that submodule,
e.g. {"linear1": (tensor1,), "linear2": (tensor2,), "sub": (tensor3,),
      "sub.linear1": (tensor4,), ...}

Used to make quantizing submodules easier now that FX Graph Mode Quantization requires
example inputs.

Also works for keyword arguments with default values, we would flatten keyword
arguments as positional arguments and fill in the missing keyword args with default
values, e.g. if we have a forward function:
def forward(self, x, key1=3, key2=3):
    ...

and we call it with self.submodule(x, key2=6)
we'll get example_inputs: (x, 3, 6)

user can also override `key1` with positional arguments as well:
for self.submodule(x, 5, key2=6)
we'll get: (x, 5, 6)

variable positional arguments and variable positional keyword arguments in forward
function are not supported currently, so please make sure no submodules is using
them.
c                   > [        U5      R                  5       n[        U R                  U5      n[	        U R                  5      S-
  nU[        U5      -
  nU(       a+  U(       a$  UR                  SS9  US-  nU(       a	  U(       a  M$  UR                  UR                  5       5        [        U5      n[        TU 5      nUb  UT	U'   T
" U /UQ70 UD6$ )Nr   F)last)listrC   r   forwardr  r   popitemextendvaluestupler   )selfr  r   submodule_example_inputsr   num_args
num_to_popsubmodule_example_inputs_tuplerW   fqn_to_example_inputsorig_module_callr   s            r   _patched_module_call7get_fqn_to_example_inputs.<locals>._patched_module_call  s    #':??#4 -dllFC$T\\2Q6$< ==
.%%5%1!OJ .. 	!''(9(@(@(BC)./G)H&!$-?)G!#&6t6v66r   )rK   nnModule__call__)r  r  r#  r!  r"  r   s      @@@r   get_fqn_to_example_inputsr(    st    8 D7  xx//3EHHOO4~ $4    $4 s   A: :!Br   c                    U R                  5        Vs1 s H  oR                  iM     snU R                  5        Vs1 s H  oR                  iM     sn-  n [        R                  " S5      [        R                  " S5      1U:X  a-  [        R
                  " S5        [        R                  " S5      1n [        U5      S::  d
   SU 35       e[        U5      S:  a  [        [        U5      5      nU$ SnU$ s  snf s  snf )zz
Returns the unique device for a module, or None if no device is found.
Throws an error if multiple devices are detected.
cpumetazfBoth 'meta' and 'cpu' are present in the list of devices. Module can have one device. We Select 'cpu'.r   zKprepare only works with cpu or single-device CUDA modules, but got devices r   N)	r   r   buffersrK   r   r   r   nextiter)r   r   devicesr   s       r   _assert_and_get_unique_devicer0     s    
 "(!2!2!45!4Axx!45 ..*9*Q*9 G 	UU\\&12g=t	
 <<&'w<1 	")	% %(L1$4T$w- FM ;?FM# 6 9s
   C7C<)NodePatternPatternr   rA   rH   rP   rU   r_   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r(  ro   r  r   )tr   r[   r   collectionsr   inspectr   r   typingr   r   r   r	   rK    torch.ao.quantization.quant_typer
   torch.fxr   torch.nn.utils.parametrizer   r  r1  r   QuantizerClsr2  r   r%  ReLUReLU6AdaptiveAvgPool1dAdaptiveAvgPool2dAdaptiveAvgPool3d	AvgPool1d	AvgPool2d	AvgPool3d	MaxPool1d	MaxPool2d	MaxPool3dIdentityHardsigmoidSigmoidTanhr;   
functionaladaptive_avg_pool1dadaptive_avg_pool2dadaptive_avg_pool3delu	hardswishinstance_norm
layer_norm
leaky_relusilumishdropout
max_pool1d
max_pool2d
max_pool3dr   hardtanh	hardtanh_r   r&   r-   r"   r)   stacksumr+   r.   catr7   meanr8   rA   rH   rP   rU   r:   r_   ro   r   r   r   r   r   r   r   r   r   r   boolr   r   r   Tensorr   r	  rr   r   r   r   r&  r   dictr   r   r   r   rL   rO   r  r  r(  r0  __all__r   r   r   <module>rb     s<     # - 1 1  6  6 E$*%uT5t3D-D'EsJK6  
 eHh&'xx?Q9R/R)SUXX 3   
HHMM	HHNN	HH	HH	HH	HH	HH	HH	HH	HH	HH	HH	HH	HH	HHMM $ 
HH++	HH++	HH++	HH	HH!!	HH%%	HH""	HH""	HH	HH	HH	HH""	HH""	HH""	HH	HH  	HH!!	HH##	HH	OO		MM	MM	KK	II	JJ	OO	II9	> 
JJ



3<<2W:# :C :C :!&!H.,=$!	D$Y <!H   :; ; ;   ;  ;;	; 
 ;  38_; |
((//&+hhooc]0JX JDcN JtCH~ J8 (? *H 4S> >U ,U# U# U$ UH #44K>\\K>\\K> K> 	K>
 ;;K> 
K>  K> ]]K> 5<<%&K>\
' 
'c 
'6!88??6!,1#s(O6!	#uS#X
6!r%((// c 2r   