
    `i?	                     n   S SK Jr  S SKJr  S SKJr  S SKJrJr  S SK	J
r
  S SKJr  S SKJr  S SKJrJrJr  S S	KJrJr  S S
KJr  S SKJr  S SKJr  S SKJr  S SKJr  S SK J!r!  S SK"J#r#  \\\#S.r$\\\
\S.r%\%RM                  \$5        \\\\\\\\\\\\!S.r'\'RM                  \$5        \\\S.r(S r)S r*S r+g)   )QuantizationModeQuantOperatorBase)QDQOperatorBase)MatMulIntegerQLinearMatMul)AttentionQuant)EmbedLayerNormalizationQuant)GatherQuant)QLinearConvConvIntegerQDQConv)QLinearActivationQDQRemovableActivation)QLinearBinaryOp)QMaxPool)QGlobalAveragePool)	LSTMQuant)QSplit)QPad)ReshapeQuant)GatherEmbedLayerNormalizationReshape)ConvMatMul	AttentionLSTM)r   r   AddMulReluClip	LeakyReluSigmoidMaxPoolGlobalAveragePoolSplitPad)r   r"   r!   c                     [        X5      $ Nr   onnx_quantizernodes     f/var/www/html/ai-image-ml/venv/lib/python3.13/site-packages/onnxruntime_tools/quantization/registry.pyCreateDefaultOpQuantizerr/   5   s    ^22    c                     U R                   [        R                  :X  a  [        O[        nUR
                  UR                  5       ;   a  X!R
                     " X5      $ [        X5      $ r*   )moder   
IntegerOpsIntegerOpsRegistryQLinearOpsRegistryop_typekeysr   )r,   r-   registrys      r.   CreateOpQuantizerr9   9   sN    %3%8%8<L<W<W%W!]oH||x}}&%n;;^22r0   c                     UR                   [        R                  5       ;   a  [        UR                      " X5      $ [        X5      $ r*   )r6   QDQRegistryr7   r   r+   s     r.   CreateQDQQuantizerr<   @   s6    ||{''))4<<(>>>00r0   N),quant_utilsr   operators.base_operatorr   operators.qdq_base_operatorr   operators.matmulr   r   operators.attentionr	   operators.embed_layernormr
   operators.gatherr   operators.convr   r   r   operators.activationr   r   operators.binary_opr   operators.maxpoolr   operators.gavgpoolr   operators.lstmr   operators.splitr   operators.padr   operators.reshaper   CommonOpsRegistryr4   updater5   r;   r/   r9   r<    r0   r.   <module>rP      s    ) 6 8 : / C ) = = K 0 ' 2 % #  +*0L ,. 
 	    + , " +    + , ""331r0   