§
    2�ÅjÒk  ã                  óÆ  — d dl mZ d dlZd dlmZmZ d dlZd dlZerd dl	m
Z
  G d„ de¦  «        Z G d„ de¦  «        Z G d	„ d
e¦  «        Z G d„ d¦  «        Z G d„ d¦  «        Zd&d„Z e¦   «         Z G d„ d¦  «        Z G d„ d¦  «        Zd'd„Zd(d„Z G d„ d¦  «        Z G d„ dej        ¦  «        Z G d „ d!e¦  «        Z G d"„ d#e¦  «        Z G d$„ d%e¦  «        ZdS ))é    )ÚannotationsN)ÚTYPE_CHECKINGÚAny)ÚSequencec                  ó   — e Zd ZdZdS )ÚRuntimeTypeErrorz/Raised when a type of a variable is unexpected.N©Ú__name__Ú
__module__Ú__qualname__Ú__doc__© ó    úFC:\Projects\Historical\venv\Lib\site-packages\onnx/reference/op_run.pyr   r      s   € € € € € Ø9Ð9Ð9Ð9r   r   c                  ó   — e Zd ZdZdS )ÚRuntimeContextErrorzfRaised when the context is missing but an context dependent implementation is defined for an operator.Nr	   r   r   r   r   r      s   € € € € € ØpÐpÐpÐpr   r   c                  ó   — e Zd ZdZdS )ÚRuntimeImplementationErrorz8Raised when no implementation was found for an operator.Nr	   r   r   r   r   r      s   € € € € € ØBÐBÐBÐBr   r   c                  ó   — e Zd ZdZdS )ÚDefaultNonezjDefault value for parameters when the parameter is not set but the operator has a default behavior for it.Nr	   r   r   r   r   r      s   € € € € € ØtÐtÐtÐtr   r   c                  ó"   — e Zd ZdZdd„Zd	d„ZdS )
ÚRefAttrNamez}Implements a link between a parameter of a function and an attribute in node.

    Args:
        name: name of the input
    ÚnameÚstrc                ó   — || _         d S ©N)r   )Úselfr   s     r   Ú__init__zRefAttrName.__init__(   s   € ØˆŒ	ˆ	ˆ	r   Úreturnc                ó0   — | j         j        › d| j        ›d�S )Nú(ú))Ú	__class__r
   r   ©r   s    r   Ú__repr__zRefAttrName.__repr__+   s    € Ø”.Ô)Ð:Ð:¨D¬IÐ:Ð:Ð:Ð:r   N)r   r   ©r   r   )r
   r   r   r   r   r%   r   r   r   r   r   !   sF   € € € € € ðð ðð ð ð ð;ð ;ð ;ð ;ð ;ð ;r   r   r   údict[str, onnx.defs.OpSchema]c            
     ó²  — i } t           j        j         j                             ¦   «         D ]«}|j        | v rt|j        | |j                 j        k    r3t          d|j        ›d|j        ›d| |j                 j        ›d�¦  «        ‚|j        | |j                 j        k    r
|| |j        <   n
|| |j        <   || |j        dz   t          |j        ¦  «        z   <   Œ¬| S )Nz7This function assumes every operator has a unique name z even across multiple domains z and ú.Ú_)ÚonnxÚdefsÚget_all_schemas_with_historyr   ÚdomainÚNotImplementedErrorÚsince_versionr   )ÚresÚschemas     r   Ú_build_schemasr3   /   s  € Ø)+€CÝ”)”.Ô%×BÒBÑDÔDð Dð DˆàŒ;˜#ÐÐØŒ}  F¤KÔ 0Ô 7Ò7Ð7Ý)ðgÈfÌkð gð gØ4:´Mðgð gØJMÈfÌkÔJZÔJaðgð gð gñô ð ð Ô# c¨&¬+Ô&6Ô&DÒDÐDà#)��F”KÑ øà%ˆC�”ÑØ=CˆˆFŒK˜#Ñ¥ FÔ$8Ñ 9Ô 9Ñ9Ñ:Ð:Ø€Jr   c                  ó   — e Zd Zdd„Zd	d„ZdS )
ÚOnnxTypeÚ
type_protoúonnx.TypeProtoc                óˆ   — t          |t          j        ¦  «        s t          dt	          |¦  «        › d�¦  «        ‚|| _        d S )Nztype_proto z  must be of type onnx.TypeProto.)Ú
isinstancer+   Ú	TypeProtoÚ	TypeErrorÚtyper6   )r   r6   s     r   r   zOnnxType.__init__F   sK   € Ý˜*¥d¤nÑ5Ô5ð 	ÝØP�d :Ñ.Ô.ÐPÐPÐPñô ð ð %ˆŒˆˆr   r   r   c                ó   — d| j         ›d�S )Nz	OnnxType(r"   )r6   r$   s    r   r%   zOnnxType.__repr__M   s   € Ø/˜4œ?Ð/Ð/Ð/Ð/r   N)r6   r7   r&   )r
   r   r   r   r%   r   r   r   r5   r5   E   s<   € € € € € ð%ð %ð %ð %ð0ð 0ð 0ð 0ð 0ð 0r   r5   c                  ó2   — e Zd ZdZdd	„Zedd„¦   «         ZdS )ÚSparseTensorzcSimple representation of a sparse tensor.
    It is based on numpy but does not require scipy.
    Úvaluesú
np.ndarrayÚindicesÚshapeú
tuple[int]r   ÚNonec                ó0   — || _         || _        || _        d S r   )r@   rB   rC   )r   r@   rB   rC   s       r   r   zSparseTensor.__init__V   s   € ð ˆŒØˆŒØˆŒ
ˆ
ˆ
r   r   c                ó   — | j         j        S r   )r@   Údtyper$   s    r   rH   zSparseTensor.dtype]   s   € àŒ{Ô Ð r   N)r@   rA   rB   rA   rC   rD   r   rE   )r   r   )r
   r   r   r   r   ÚpropertyrH   r   r   r   r?   r?   Q   sR   € € € € € ðð ðð ð ð ð ð!ð !ð !ñ „Xð!ð !ð !r   r?   Úattúonnx.AttributeProtoc                óè   — t          d„ | j        D ¦   «         ¦  «        }t          t          j                             | j        ¦  «        t          j                             | j        ¦  «        |¦  «        S )zHosts a sparse tensor.c              3  ó   K  — | ]}|V — Œd S r   r   )Ú.0Úds     r   ú	<genexpr>z#to_sparse_tensor.<locals>.<genexpr>d   s"   è è € Ð&Ð&˜�!Ð&Ð&Ð&Ð&Ð&Ð&r   )ÚtupleÚdimsr?   r+   Únumpy_helperÚto_arrayr@   rB   )rJ   rC   s     r   Úto_sparse_tensorrU   b   sa   € åÐ&Ð&˜SœXÐ&Ñ&Ô&Ñ&Ô&€EÝÝÔ×"Ò" 3¤:Ñ.Ô.ÝÔ×"Ò" 3¤;Ñ/Ô/Øñô ð r   Ú	attr_typeú!onnx.AttributeProto.AttributeTypec                ó
  — t           j        j        d„ t           j        j        d„ t           j        j        d„ t           j        j        d„ t           j        j        d„ t           j        j        d„ t           j        j        d„ t           j        j	        d„ t           j        j
        d	„ t           j        j        d
„ t           j        j        d„ t           j        j        d„ t           j        j        d„ t           j        j        d„ i|          S )Nc                ó4   — t          j        | j        ¦  «        S r   )ÚnpÚfloat32Úf©rJ   s    r   ú<lambda>z0_attribute_conversion_function.<locals>.<lambda>n   s   € ­r¬z¸#¼%Ñ/@Ô/@€ r   c                ó$   — d„ | j         D ¦   «         S )Nc                ó6   — g | ]}t          j        |¦  «        ‘ŒS r   )rZ   r[   )rN   r\   s     r   ú
<listcomp>zD_attribute_conversion_function.<locals>.<lambda>.<locals>.<listcomp>o   s    € Ð0SÐ0SÐ0SÀ1µ´¸A±´Ð0SÐ0SÐ0Sr   )Úfloatsr]   s    r   r^   z0_attribute_conversion_function.<locals>.<lambda>o   s   € Ð0SÐ0SÈÌ
Ð0SÑ0SÔ0S€ r   c                ó*   — t          | j        ¦  «        S r   )ÚGraphÚgr]   s    r   r^   z0_attribute_conversion_function.<locals>.<lambda>p   s   € ­u°S´U©|¬|€ r   c                ó$   — d„ | j         D ¦   «         S )Nc                ó,   — g | ]}t          |¦  «        ‘ŒS r   )rd   )rN   re   s     r   ra   zD_attribute_conversion_function.<locals>.<lambda>.<locals>.<listcomp>q   s   € Ð0NÐ0NÐ0N¸aµ°q±´Ð0NÐ0NÐ0Nr   )Úgraphsr]   s    r   r^   z0_attribute_conversion_function.<locals>.<lambda>q   s   € Ð0NÐ0NÀ3Ä:Ð0NÑ0NÔ0N€ r   c                ó*   — t          | j        ¦  «        S r   )ÚintÚir]   s    r   r^   z0_attribute_conversion_function.<locals>.<lambda>r   s   € ­S°´©Z¬Z€ r   c                ó$   — d„ | j         D ¦   «         S )Nc                ó,   — g | ]}t          |¦  «        ‘ŒS r   )rj   ©rN   rk   s     r   ra   zD_attribute_conversion_function.<locals>.<lambda>.<locals>.<listcomp>s   s   € Ð.HÐ.HÐ.H¸!­s°1©v¬vÐ.HÐ.HÐ.Hr   )Úintsr]   s    r   r^   z0_attribute_conversion_function.<locals>.<lambda>s   s   € Ð.HÐ.H¸s¼xÐ.HÑ.HÔ.H€ r   c                ó*   — t          | j        ¦  «        S r   )rU   Úsparse_tensorr]   s    r   r^   z0_attribute_conversion_function.<locals>.<lambda>t   s   € Õ7GØÔñ8
ô 8
€ r   c                ó$   — d„ | j         D ¦   «         S )Nc                ó,   — g | ]}t          |¦  «        ‘ŒS r   )rU   ©rN   Úts     r   ra   zD_attribute_conversion_function.<locals>.<lambda>.<locals>.<listcomp>w   s.   € ð 9
ð 9
ð 9
Ø$%Õ˜QÑÔð9
ð 9
ð 9
r   )Úsparse_tensorsr]   s    r   r^   z0_attribute_conversion_function.<locals>.<lambda>w   s#   € ð 9
ð 9
Ø),Ô);ð9
ñ 9
ô 9
€ r   c                ó6   — | j                              d¦  «        S )Núutf-8)ÚsÚdecoder]   s    r   r^   z0_attribute_conversion_function.<locals>.<lambda>z   s   € °´·²¸WÑ0EÔ0E€ r   c                ó$   — d„ | j         D ¦   «         S )Nc                ó8   — g | ]}|                      d ¦  «        ‘ŒS )rx   )rz   )rN   ry   s     r   ra   zD_attribute_conversion_function.<locals>.<lambda>.<locals>.<listcomp>{   s1   € ð 2
ð 2
ð 2
Ø"#ˆA�HŠH�WÑÔð2
ð 2
ð 2
r   )Ústringsr]   s    r   r^   z0_attribute_conversion_function.<locals>.<lambda>{   s"   € ð 2
ð 2
Ø'*¤{ð2
ñ 2
ô 2
€ r   c                óJ   — t           j                             | j        ¦  «        S r   )r+   rS   rT   ru   r]   s    r   r^   z0_attribute_conversion_function.<locals>.<lambda>~   s   € µÔ0A×0JÒ0JÈ3Ì5Ñ0QÔ0Q€ r   c                ó$   — d„ | j         D ¦   «         S )Nc                óL   — g | ]!}t           j                             |¦  «        ‘Œ"S r   )r+   rS   rT   rt   s     r   ra   zD_attribute_conversion_function.<locals>.<lambda>.<locals>.<listcomp>   s6   € ð 2
ð 2
ð 2
Ø./�DÔ×&Ò& qÑ)Ô)ð2
ð 2
ð 2
r   )Útensorsr]   s    r   r^   z0_attribute_conversion_function.<locals>.<lambda>   s"   € ð 2
ð 2
Ø36´;ð2
ñ 2
ô 2
€ r   c                ó*   — t          | j        ¦  «        S r   )r5   Útpr]   s    r   r^   z0_attribute_conversion_function.<locals>.<lambda>‚   s   € µH¸S¼VÑ4DÔ4D€ r   c                ó$   — d„ | j         D ¦   «         S )Nc                ó,   — g | ]}t          |¦  «        ‘ŒS r   )r5   rt   s     r   ra   zD_attribute_conversion_function.<locals>.<lambda>.<locals>.<listcomp>ƒ   s+   € ð 6
ð 6
ð 6
Ø�H�Q‰KŒKð6
ð 6
ð 6
r   )Útype_protosr]   s    r   r^   z0_attribute_conversion_function.<locals>.<lambda>ƒ   s"   € ð 6
ð 6
Ø!$¤ð6
ñ 6
ô 6
€ r   )r+   ÚAttributeProtoÚFLOATÚFLOATSÚGRAPHÚGRAPHSÚINTÚINTSÚSPARSE_TENSORÚSPARSE_TENSORSÚSTRINGÚSTRINGSÚTENSORÚTENSORSÚ
TYPE_PROTOÚTYPE_PROTOS)rV   s    r   Ú_attribute_conversion_functionr–   l   s  € åÔÔ!Ð#@Ð#@ÝÔÔ"Ð$SÐ$SÝÔÔ!Ð#;Ð#;ÝÔÔ"Ð$NÐ$NÝÔÔÐ!7Ð!7ÝÔÔ Ð"HÐ"HÝÔÔ)ð ,
ð ,
õ 	ÔÔ*ð -
ð -
õ 	ÔÔ"Ð$EÐ$EÝÔÔ#ð &
ð &
õ 	ÔÔ"Ð$QÐ$QÝÔÔ#ð &
ð &
õ 	ÔÔ&Ð(DÐ(DÝÔÔ'ð *
ð *
ð-ð2 ô3ð r   c                  ó   — e Zd ZdZdd„ZdS )	rd   ©re   re   úonnx.GraphProtor   rE   c                ó   — || _         d S r   r˜   )r   re   s     r   r   zGraph.__init__Œ   s   € ØˆŒˆˆr   N)re   r™   r   rE   )r
   r   r   Ú	__slots__r   r   r   r   rd   rd   ‰   s-   € € € € € Ø€Iðð ð ð ð ð r   rd   c                  óˆ  — e Zd ZdZdZ	 d6d7d
„Zd„ Z	 d6d8d„Zed6d„¦   «         Z	d9d„Z
ed:d„¦   «         Zed;d„¦   «         Zed;d„¦   «         Zed<d„¦   «         Zed<d„¦   «         Zd=d „Zd<d!„Zej        d"„ ¦   «         Zd>d%„Zdddd&œd'„Zed(„ ¦   «         Ze	 	 d?d@d-„¦   «         Ze	 	 	 dAdBd1„¦   «         Zedd.d2œdCd5„¦   «         ZdS )DÚOpRuna0  Ancestor to all operators in this subfolder.

    Args:
        onnx_node: `onnx` node
        run_params: additional parameters such as `verbose`, `opsets`
            (it can be more than one if the operator has a subgraph),
            `log` for a logging function
        schema: operator schema
    Ú NÚ	onnx_nodeúonnx.NodeProtoÚ
run_paramsúdict[str, Any]r2   r   c           	     ó\  — t          |t          ¦  «        s t          dt          |¦  «        › d�¦  «        ‚dD ])}||vr#t	          d|›dt          |¦  «        › d�¦  «        ‚Œ*d|vrt          d¦  «        ‚|| _        || _        |€…t          | j
        d	¦  «        r| j
        j        | _        ne| j
        j        t          v rt          | j
        j                 | _        n5|j        t          v rt          |j                 | _        nd | _        n|| _        d
| _        |                      ¦   «          d S )Nz$run_params must be a dictionary not r)   )ÚopsetsÚnew_opsú
Attribute z must be in run_params, only z was found.Úlogz#run_params must contains key 'log'.Ú	op_schemaF)r9   Údictr;   r<   ÚRuntimeErrorÚsortedÚKeyErrorrŸ   r¡   Úhasattrr#   r¨   Ú_schemar
   Ú_schemasÚop_typeÚhas_subgraphÚ_load_attributes)r   rŸ   r¡   r2   rJ   s        r   r   zOpRun.__init__�   sX  € õ ˜*¥dÑ+Ô+ð 	XÝÐVÅ4È
ÑCSÔCSÐVÐVÐVÑWÔWÐWØ(ð 	ð 	ˆCØ˜*Ð$Ð$Ý"ð7 ð 7ð 7Ý˜jÑ)Ô)ð7ð 7ð 7ñô ð ð %ð
 ˜
Ð"Ð"ÝÐ@ÑAÔAÐAØ"ˆŒØ$ˆŒØˆ>Ý�t”~ {Ñ3Ô3ð $Ø#œ~Ô7�”�Ø”Ô(­HÐ4Ð4Ý'¨¬Ô(?Ô@�”�ØÔ"¥hÐ.Ð.Ý'¨	Ô(9Ô:�”�à#�”�à!ˆDŒLØ!ˆÔØ×ÒÑÔÐÐÐr   c                ó.   —  | j         d         |g|¢R Ž  d S )Nr§   )r¡   )r   ÚpatternÚargss      r   Ú_logz
OpRun._logº   s'   € ØˆŒ˜Ô˜wÐ.¨Ð.Ð.Ð.Ð.Ð.Ð.r   rJ   rK   Úref_attúonnx.AttributeProto | Noner   c                óJ  — |j         t          j        j        k    rê| j                             dd¦  «        }d| j        v r-t          | j        d                              ¦   «         ¦  «        }nd}| j                             dd¦  «        }|€J d|› �¦   «         ‚ ||j        | j        d         t          d| j                             dd¦  «        d	z
  ¦  «        |€dn t          |                     ¦   «         ¦  «        |¬
¦  «        S t          |j         ¦  «        }|� ||¦  «        S |€=t          d|j        ›d|j         ›d| j        j        ›d| j        j        ›d|› d�¦  «        ‚t          d|j        ›d|j         ›d| j        j        ›d| j        j        ›d|› d|› d�¦  «        ‚)z0Converts an attribute value into a python value.r¥   NÚexisting_functionsÚevaluator_clsz0evaluator_cls must be specified to evaluate att=r¤   r   Úverboseé   )r¤   r¼   r¥   Ú	functionszUnable to convert attribute z type z from node type z	, domain ú
r)   z$Unable to convert default value for )r<   r+   r‡   rŠ   r¡   ÚgetÚlistr@   re   Úmaxr–   ÚAttributeErrorr   rŸ   r°   r.   )r   rJ   r·   r¥   r¾   r»   Úconversion_functions          r   Ú_extract_attribute_valuezOpRun._extract_attribute_value½   s$  € ð Œ8•tÔ*Ô0Ò0Ð0Ø”o×)Ò)¨)°TÑ:Ô:ˆGØ# t¤Ð6Ð6Ý  ¤Ð1EÔ!F×!MÒ!MÑ!OÔ!OÑPÔP�	�	à �	Ø œO×/Ò/°ÀÑFÔFˆMØ Ð,Ð,ØHÀ3ÐHÐHñ -Ô,Ð,ð !�=Ø”Ø” xÔ0Ý˜A˜tœ×2Ò2°9¸aÑ@Ô@À1ÑDÑEÔEØ ' ˜˜µT¸'¿.º.Ñ:JÔ:JÑ5KÔ5KØ#ðñ ô ð õ =¸S¼XÑFÔFÐØÐ*Ø&Ð& sÑ+Ô+Ð+àˆ?Ý ð<¨s¬xð <ð <ÀÄð <ð <Ø"&¤.Ô"8ð<ð <àœ.Ô/ð<ð <à58ð<ð <ð <ñô ð õ ðC°7´<ð Cð CÈÌð Cð CØ"œnÔ4ðCð Cà”nÔ+ðCð Cà14ðCð Cà8?ðCð Cð Cñ
ô 
ð 	
r   c                óD   — i }|�
d|d<   ||d<    |j         d | pi fd|i|¤ŽS )NTÚcheck_shape_annotationsÚ	_bindingsÚ
attributes)Úrun)ÚcontextÚvaluerÉ   ÚbindingsÚ
run_kwargss        r   Ú_evaluate_subgraphzOpRun._evaluate_subgraphä   sI   € à%'ˆ
ØÐð
 59ˆJÐ0Ñ1Ø&.ˆJ�{Ñ#ØˆuŒy˜˜w˜}¨"ÐRÐR¸ÐRÀzÐRÐRÐRr   rE   c                óÚ  — d| _         g }| j        j        D ]»}|j        }|j        rt          |j        ¦  «        }d| _         n|                      |¦  «        }t          | ||¦  «         |                     |¦  «         |j	        t          j        j        k    r:d| _        | xj         |j         z  c_         t          | d|j        › �|ddfd„¦  «         Œ¼| j        rþ| j        j        dk    rî| j        j                             ¦   «         D ]Ï\  }}t%          | |¦  «        sºt'          |dd¦  «        r t)          d|›d	| j        j        ›d
�¦  «        ‚t%          |d¦  «        ry|j        j	        dk    s%|j        j	        dk    r|j        j        j        dk    rd}n|                      |j        |¦  «        }t          | ||¦  «         |                     |¦  «         ŒÐt1          |¦  «        | _        dS )zChecks and loads attributes.FTÚ_run_Nc                ó<   — t                                | |||¦  «        S r   )r�   rÏ   )rË   rÌ   rÉ   rÍ   s       r   r^   z(OpRun._load_attributes.<locals>.<lambda>  s   € Ý×0Ò0°¸%ÀÈXÑVÔVð r   ÚConstantÚrequiredr¦   z3 is expected based on ONNX specifications for node r)   Údefault_valuer   é   )Úhas_linked_attributerŸ   Ú	attributer   Úref_attr_namer   rÅ   ÚsetattrÚappendr<   r+   r‡   rŠ   r±   r®   r°   rÉ   Úitemsr­   Úgetattrrª   rÕ   ru   Ú	data_typeÚsetÚattributes_names_)r   Úadded_attributesrJ   r   rÌ   ÚkÚvs          r   r²   zOpRun._load_attributesð   s@  € à$)ˆÔ!ØÐØ”>Ô+ð 	ð 	ˆCØ”8ˆDØÔ ð ;Ý# CÔ$5Ñ6Ô6�Ø,0�Ô)Ð)à×5Ò5°cÑ:Ô:�Ý�D˜$ Ñ&Ô&Ð&Ø×#Ò# DÑ)Ô)Ð)ØŒx�4Ô.Ô4Ò4Ð4Ø$(�Ô!ØÐ)Ô)¨UÔ-GÑGÐ)Ô)ÝØØ&˜CœHÐ&Ð&Ø*/¸DÈ4ð ð ð ñô ð øð Œ<ð 	3˜DœNÔ2°jÒ@Ð@ØœÔ/×5Ò5Ñ7Ô7ð 3ð 3‘��1Ý˜t QÑ'Ô'ð 3Ý˜q *¨dÑ3Ô3ð Ý*ðD¨ð Dð DØ(,¬Ô(>ðDð Dð Dñô ð õ ˜q /Ñ2Ô2ð 
3Øœ?Ô/°1Ò4Ð4ØœOÔ0°AÒ5Ð5Ø !¤Ô 1Ô ;¸qÒ @Ð @ð %)˜E˜Eà$(×$AÒ$AÀ!Ä/ÐSTÑ$UÔ$U˜EÝ  a¨Ñ/Ô/Ð/Ø(×/Ò/°Ñ2Ô2Ð2øÝ!$Ð%5Ñ!6Ô!6ˆÔÐÐr   Úgraphr™   ú	list[str]c                ó<  — t          | t          j        ¦  «        s t          dt	          | ¦  «        ›d�¦  «        ‚t          ¦   «         }t          ¦   «         }| j        D ]}|                     |j        ¦  «         Œ| j	        D ]}|                     |j        ¦  «         Œ| j
        D ]}|                     |j        ¦  «         Œ| j        D ]D}|j        D ]}|                     |¦  «         Œ|j
        D ]}||vr|                     |¦  «         ŒŒEt          |¦  «        S )zÁReturns all variables not registered as inputs and not produced by
        an node inside the graph. This inputs are part of the context
        existing in the graph calling this one.
        zUnexpected type r)   )r9   r+   Ú
GraphProtor;   r<   rß   ÚinitializerÚaddr   Úsparse_initializerÚinputÚnodeÚoutputrÁ   )	rä   ÚlocalÚknownÚinitÚsparse_initÚinprì   Úork   s	            r   Úimplicit_inputszOpRun.implicit_inputs  s6  € õ ˜%¥¤Ñ1Ô1ð 	AÝÐ?­t°E©{¬{Ð?Ð?Ð?Ñ@Ô@Ð@Ý‘”ˆÝ‘”ˆØÔ%ð 	!ð 	!ˆDØ�IŠI�d”iÑ Ô Ð Ð Ø Ô3ð 	(ð 	(ˆKØ�IŠI�kÔ&Ñ'Ô'Ð'Ð'Ø”;ð 	 ð 	 ˆCØ�IŠI�c”hÑÔÐÐØ”Jð 	!ð 	!ˆDØ”[ð ð �Ø—	’	˜!‘”��Ø”Zð !ð !�Ø˜E�>�>Ø—I’I˜a‘L”L�Løð!õ �E‰{Œ{Ðr   úSequence[str]c                ó   — | j         j        S )zReturns node attribute `input`.)rŸ   rë   r$   s    r   rë   zOpRun.input5  s   € ð Œ~Ô#Ð#r   c                ó   — | j         j        S )z Returns node attribute `output`.)rŸ   rí   r$   s    r   rí   zOpRun.output:  ó   € ð Œ~Ô$Ð$r   r   c                ó   — | j         j        S )z!Returns node attribute `op_type`.)rŸ   r°   r$   s    r   r°   zOpRun.op_type?  s   € ð Œ~Ô%Ð%r   c                ó   — | j         j        S )z Returns node attribute `domain`.)rŸ   r.   r$   s    r   r.   zOpRun.domainD  rø   r   Úboolc                ó   — dS )zÓTells the runtime if this node needs the context
        (all the results produced so far) as it may silently access
        one of them (operator Scan, If, Loop).
        The default answer is `False`.
        Fr   r$   s    r   Úneed_contextzOpRun.need_contextI  s	   € ð ˆur   c                óp  — | j         j        dz   d| j        j        › �g}t	          | j                             ¦   «         ¦  «        D ]H\  }}|dv rŒ
d|d         cxk    rdk    r+n Œ |d         dk    r|                     d	|› d
|› d�¦  «         ŒI|                     d¦  «         d                     |¦  «        S )Nr!   z    op_type=>   ÚdescrŸ   Úar   Úzéÿÿÿÿr*   z    ú=ú,r"   r¿   )	r#   r
   rŸ   r°   r«   Ú__dict__rÜ   rÛ   Újoin)r   Úattsrâ   rã   s       r   Ú__str__zOpRun.__str__Q  sÑ   € Ø”Ô'¨#Ñ-Ð/V¸d¼nÔ>TÐ/VÐ/VÐWˆÝ˜4œ=×.Ò.Ñ0Ô0Ñ1Ô1ð 	-ð 	-‰DˆAˆqØÐ)Ð)Ð)ØØ�a˜”dÐ!Ð!Ò!Ð!˜cÒ!Ð!Ð!Ð!Ð! a¨¤e¨s¢l lØ—’˜O 1˜O˜O q˜O˜O˜OÑ,Ô,Ð,øØ�Š�CÑÔÐØ�yŠy˜‰ŒÐr   c                ó<   — t          d| j        j        ›d�¦  «        ‚)aˆ  Should be overwritten.

        Args:
            *args: operator inputs
            **kwargs: optional inputs and overridden attributes, an
                attribute may be overridden if it belongs to a function,
                in this case, the same instance of OpRun can be called
                with different values of the same attribute.

        Returns:
            outputs
        z/Method '_run' must be overwritten for operator r)   )r/   r#   r
   )r   rµ   Úkwargss      r   Ú_runz
OpRun._run[  s)   € õ "ØZ¸d¼nÔ>UÐZÐZÐZñ
ô 
ð 	
r   r1   útuple[Any, ...]c                ó  — t          |t          ¦  «        s-t          d| j        j        ›dt          |¦  «        › d�¦  «        ‚|st          d| j        j        ›d�¦  «        ‚t          d„ |D ¦   «         ¦  «        r,d„ |D ¦   «         }t          d| j        j        ›d|›d	�¦  «        ‚t          d
„ |D ¦   «         ¦  «        }t          d„ |D ¦   «         ¦  «        r,d„ |D ¦   «         }t          d| j        j        ›d|›d	�¦  «        ‚|S )z-Checks the output are from the expected type.zMethod '_run' of class z does not return a tuple but 'z'.z does not return any result.c              3  ó@   K  — | ]}t          |t          ¦  «        V — Œd S r   )r9   rQ   rt   s     r   rP   z/OpRun._check_and_fix_outputs.<locals>.<genexpr>w  s,   è è € Ð1Ð1¨�z˜!�UÑ#Ô#Ð1Ð1Ð1Ð1Ð1Ð1r   c                ó,   — g | ]}t          |¦  «        ‘ŒS r   ©r<   rt   s     r   ra   z0OpRun._check_and_fix_outputs.<locals>.<listcomp>x  ó   € Ð+Ð+Ð+ !•d˜1‘g”gÐ+Ð+Ð+r   z6One of the results returned by method '_run' of class zg is a tuple, this is no ONNX corresponding type (Map, List, Tensor, SparseTensor). All returned types: r)   c              3  ój   K  — | ].}t          j        |¦  «        rt          j        |¦  «        n|V — Œ/d S r   )rZ   ÚisscalarÚarray)rN   Úxs     r   rP   z/OpRun._check_and_fix_outputs.<locals>.<genexpr>~  s;   è è € ÐHÐH¸q¥B¤K°¡N¤NÐ9•R”X˜a‘[”[�[¸ÐHÐHÐHÐHÐHÐHr   c              3  ó†   K  — | ]<}t          |t          j        t          t          f¦  «        pt          |d ¦  «         V — Œ=dS )ÚtodenseN)r9   rZ   ÚndarrayrÁ   r©   r­   rt   s     r   rP   z/OpRun._check_and_fix_outputs.<locals>.<genexpr>  s[   è è € ð 
ð 
àõ ˜A¥¤
­Dµ$Ð7Ñ8Ô8ÐQ½GÀAÀyÑ<QÔ<QÐRð
ð 
ð 
ð 
ð 
ð 
r   c                ó,   — g | ]}t          |¦  «        ‘ŒS r   r  rt   s     r   ra   z0OpRun._check_and_fix_outputs.<locals>.<listcomp>ƒ  r  r   zs has an unexpected type, this is no ONNX corresponding type (Map, List, Tensor, SparseTensor). All returned types: )r9   rQ   r;   r#   r
   r<   Ú
ValueErrorÚany)r   r1   Údtypess      r   Ú_check_and_fix_outputszOpRun._check_and_fix_outputsm  sŠ  € å˜#�uÑ%Ô%ð 	ÝØp¨$¬.Ô*AÐpÐpÕcgÐhkÑclÔclÐpÐpÐpñô ð ð ð 	ÝØa¨$¬.Ô*AÐaÐaÐañô ð õ Ð1Ð1¨SÐ1Ñ1Ô1Ñ1Ô1ð 	Ø+Ð+ sÐ+Ñ+Ô+ˆFÝð3ÈÌÔI`ð 3ð 3à'-ð3ð 3ð 3ñô ð õ
 ÐHÐHÀCÐHÑHÔHÑHÔHˆÝð 
ð 
àð
ñ 
ô 
ñ 
ô 
ð 		ð ,Ð+ sÐ+Ñ+Ô+ˆFÝð3ÈÌÔI`ð 3ð 3à'-ð3ð 3ð 3ñô ð ð
 ˆ
r   )Úlinked_attributesrË   rÍ   c               ó  — |                       ¦   «         r#|€ t          dt          | ¦  «        › d�¦  «        ‚n"|� t          dt          | ¦  «        › d�¦  «        ‚| j        r"|€ t	          dt          | ¦  «        › d�¦  «        ‚| j        s2|�0t	          dt          | ¦  «        › dt          |¦  «        › d�¦  «        ‚i }| j        r�|€ t          d	t          | ¦  «        › d�¦  «        ‚| j        D ]f}t          | |¦  «        }t          |t          ¦  «        r?|j        |vr&t	          d
|›d|›dt          | ¦  «        › d�¦  «        ‚||j                 ||<   Œg|                      d| j        j        t          |¦  «        ¦  «         i }| j        D ]J}||v rŒt!          | |¦  «        s t#          d|›d| j        j        ›d�¦  «        ‚t          | |¦  «        ||<   ŒK| j        r.| j        r"|s t          dt          | ¦  «        › d�¦  «        ‚||d<   |�||d<   |�!| j        st          | t&          ¦  «        r||d<   	 |r | j        |i |¤|¤Ž}	n | j        |i |¤Ž}	nd# t*          t          f$ rP}
t+          dd„ |D ¦   «         › dt-          |¦  «        › dt-          |¦  «        › d| j        j        ›d�	¦  «        |
‚d}
~
ww xY w|                      d| j        j        |	�t          |	¦  «        nd¦  «         |                      |	¦  «        S )aI  Calls method ``_run``, catches exceptions,
        displays a longer error message.

        Args:
            *args: inputs
            linked_attributes: used if this has an attribute linked to
                the attribute of the function it belongs to
            context: if this node is part of the subgraph, `context` is
                a dictionary with the values this node may use
            bindings: if not None, the active `SymbolBindings` instance
                (see `onnx.reference.shape_annotation_checker`) used to
                check shape annotations; propagated to any subgraph this
                node may invoke (If, Loop, Scan) so a symbolic dimension
                shared between the parent graph and the subgraph is
                checked consistently

        Returns:
            tuple of results
        NzThis node if type z needs context to be filled.z+ does not need any contextbut one is given.z
This node zK has linked attributes but None are given in parameter 'linked_attributes'.zM has no linked attribute but some are given in parameter 'linked_attributes' r)   zBOne attribute is linked but no linked value is provided, in class z,Unable to find a value for linked attribute z in z	 in node z-- begin %s.run(%d inputs)r¦   z is missing in operator z6A subgraph has linked attribute but none was given to rÉ   rË   rÍ   zIssues with types c                ó,   — g | ]}t          |¦  «        ‘ŒS r   r  )rN   r*   s     r   ra   zOpRun.run.<locals>.<listcomp>Ý  s   € Ð%<Ð%<Ð%<°!¥d¨1¡g¤gÐ%<Ð%<Ð%<r   z and attributes z and linked attributes=z (operator ú).z-- done %s.run -> %d outputsr   )rý   rª   r<   r×   r  rß   rÃ   rà   rÝ   r9   r   r   r¶   r#   r
   Úlenr­   Ú	NameErrorr±   Ú
OpFunctionr  r;   r«   r  )r   r  rË   rÍ   rµ   Úoverridden_attributesrJ   rã   r
  r1   Úes              r   rÊ   z	OpRun.run‹  sF  € ð( ×ÒÑÔð 	ØˆÝ"ØQ­¨d©¬ÐQÐQÐQñô ð ð ð Ð ÝØ\¥T¨$¡Z¤ZÐ\Ð\Ð\ñô ð ð Ô$ð 	Ð):Ð)BÝØt�T $™ZœZÐtÐtÐtñô ð ð Ô(ð 	Ð->Ð-JÝðA�T $™ZœZð Að AÝ'*Ð+<Ñ'=Ô'=ðAð Að Añô ð ð !#ÐØÔ$ð 	KØ Ð(Ý$ð.Ý $ T¡
¤
ð.ð .ð .ñô ð ð Ô-ð Kð K�Ý˜D #Ñ&Ô&�Ý˜a¥Ñ-Ô-ð KØ”vÐ%6Ð6Ð6Ý(ð5È3ð 5ð 5ÐVgð 5ð 5Ý'+¨D¡z¤zð5ð 5ð 5ñô ð ð 2CÀ1Ä6Ô1JÐ)¨#Ñ.øà�	Š	Ð.°´Ô0GÍÈTÉÌÑSÔSÐSØˆØÔ)ð 	-ð 	-ˆCØÐ+Ð+Ð+ØÝ˜4 Ñ%Ô%ð ÝØ\ Ð\Ð\ÀÄÔ@WÐ\Ð\Ð\ñô ð õ " $¨Ñ,Ô,ˆF�3‰KˆKØÔð 	5ØÔ(ð Ð1Bð Ý"ØZÍTÐRVÉZÌZÐZÐZÐZñô ð ð $5ˆF�<Ñ ØÐØ 'ˆF�9ÑØÐ TÔ%6Ð½*ÀTÍ:Ñ:VÔ:VÐØ!)ˆF�:Ñð
	Ø$ð 1Ø�d”i ÐIÐ)>ÐIÀ&ÐIÐI��à�d”i Ð0¨Ð0Ð0�øøÝ�>Ð*ð 	ð 	ð 	Ýð;Ð%<Ð%<°tÐ%<Ñ%<Ô%<ð ;ð ;Ý˜&‘>”>ð;ð ;Ý:@ÐAVÑ:WÔ:Wð;ð ;à!œ^Ô4ð;ð ;ð ;ñô ð ð	øøøøð	øøøð 	�	Š	Ø*ØŒNÔ#Ø˜�C�‰HŒHˆH¨Qñ	
ô 	
ð 	
ð
 ×*Ò*¨3Ñ/Ô/Ð/s   È7I ÉJ8É(AJ3Ê3J8c                ó  — | j         }d|vr |t          j                             ¦   «         fS |                     dd¦  «        \  }}	 t          |¦  «        }n5# t          $ r( | j         t          j                             ¦   «         fcY S w xY w||fS )Nr*   é   )r
   r+   r,   Úonnx_opset_versionÚrsplitrj   r  )Úclsr   ÚversÚi_verss       r   Ú
infer_namezOpRun.infer_nameè  sŸ   € àŒ|ˆØ�dˆ?ˆ?Ø�œ×5Ò5Ñ7Ô7Ð7Ð7Ø—[’[  aÑ(Ô(‰
ˆˆdð	@Ý˜‘Y”YˆFˆFøÝð 	@ð 	@ð 	@Ø”<¥¤×!=Ò!=Ñ!?Ô!?Ð?Ð?Ð?Ð?ð	@øøøà�Vˆ|Ðs   ÁA Á/BÂBÚn_inputsú
int | NoneÚ	n_outputsr
  c                óˆ  — |                       ¦   «         \  }}| j        }d}|€*|€!t          j                             |||¦  «        }|j        }|€*|€!t          j                             |||¦  «        }|j        }d„ t          |¦  «        D ¦   «         }d„ t          |¦  «        D ¦   «         }	t          j        j	        |||	fi |¤ŽS )aü  Creates an ONNX node for this class based on the given information.

        Args:
            n_inputs: number of inputs (default is defined by the
                operator schema)
            n_outputs: number of outputs (default is defined by the
                operator schema)
            verbose: verbosity
            **kwargs: node attributes

        Returns:
            NodeProto

        Method :meth:`eval <onnx.reference.op_run.OpRun.eval>` creates an onnx node
        returned by method :meth:`make_node <onnx.reference.op_run.OpRun.make_node>`.

        .. exec_code::

            import numpy as np
            from onnx.reference.ops._op_list import Celu

            onnx_node = Celu.make_node(alpha=0.5)
            print(onnx_node)
        Nc                ó   — g | ]}d |› �‘ŒS )r  r   rn   s     r   ra   z#OpRun.make_node.<locals>.<listcomp>  s   € Ð5Ð5Ð5 �G˜�G�GÐ5Ð5Ð5r   c                ó   — g | ]}d |› �‘ŒS )Úyr   rn   s     r   ra   z#OpRun.make_node.<locals>.<listcomp>   s   € Ð7Ð7Ð7 �W˜�W�WÐ7Ð7Ð7r   )
r.  Ú	op_domainr+   r,   Ú
get_schemaÚ	min_inputÚ
min_outputÚrangeÚhelperÚ	make_node)
r+  r/  r1  r
  r°   Úopsetr.   r2   Únames_inÚ	names_outs
             r   r<  zOpRun.make_nodeô  sÎ   € ð> ŸšÑ)Ô)‰ˆ�Ø”ˆØˆØÐØˆ~Ýœ×-Ò-¨g°u¸fÑEÔE�ØÔ'ˆHØÐØˆ~Ýœ×-Ò-¨g°u¸fÑEÔE�ØÔ)ˆIà5Ð5¥U¨8¡_¤_Ð5Ñ5Ô5ˆØ7Ð7¥e¨IÑ&6Ô&6Ð7Ñ7Ô7ˆ	ÝŒ{Ô$ W¨h¸	ÐLÐLÀVÐLÐLÐLr   r   r¼   rj   c                ó�   ‡— dˆfd„} | j         ||fi |¤Ž}‰|dd	t          j                             ¦   «         id
œ} | ||¦  «        S )a„  Instantiates this class based on the given information.

        Args:
            n_inputs: number of inputs (default is defined by the
                operator schema)
            n_outputs: number of outputs (default is defined by the
                operator schema)
            verbose: verbosity
            **kwargs: node attributes

        Returns:
            NodeProto
        r´   r   rµ   r   r   rE   c                óV   •— ‰dk    r!t          | t          |¦  «        z  ¦  «         d S d S )Nr(  )ÚprintrQ   )r´   rµ   r¼   s     €r   Úlog_functionz"OpRun.create.<locals>.log_function9  s2   ø€ Ø˜Š{ˆ{Ý�g¥ d¡¤Ñ+Ñ,Ô,Ð,Ð,Ð,ð ˆ{r   Nrž   )r¼   r§   r¥   r¤   )r´   r   rµ   r   r   rE   )r<  r+   r,   r)  )r+  r/  r1  r¼   r
  rC  rì   r¡   s      `    r   ÚcreatezOpRun.create#  s}   ø€ ð,	-ð 	-ð 	-ð 	-ð 	-ð 	-ð ˆsŒ}˜X yÐ;Ð;°FÐ;Ð;ˆàØØØ�4œ9×7Ò7Ñ9Ô9Ð:ð	
ð 
ˆ
ð ˆs�4˜Ñ$Ô$Ð$r   ©r1  r¼   rµ   ú	list[Any]c               óŒ   —  | j         t          |¦  «        f||dœ|¤Ž} |j        |Ž }t          |¦  «        dk    r|d         S |S )a  Evaluates this operator.

        Args:
            *args: inputs
            n_outputs: number of outputs (default is defined by the
                operator schema)
            verbose: verbosity
            **kwargs: node attributes

        Returns:
            NodeProto
        rE  r(  r   )rD  r"  rÊ   )r+  r1  r¼   rµ   r
  Úinstr1   s          r   Úevalz
OpRun.evalF  sT   € ð( ˆsŒz�#˜d™)œ)ÐT¨yÀ'ÐTÐTÈVÐTÐTˆØˆdŒh˜ˆoˆÝˆs‰8Œ8�qŠ=ˆ=Ø�q”6ˆMØˆ
r   r   )rŸ   r    r¡   r¢   r2   r   )rJ   rK   r·   r¸   r   r   )r   rE   )rä   r™   r   rå   )r   rõ   r&   )r   rû   )r1   r  r   r  ©NN)r/  r0  r1  r0  r
  r   r   r    )NNr   )
r/  r0  r1  r0  r¼   rj   r
  r   r   r   )
rµ   rF  r1  r0  r¼   rj   r
  r   r   r   )r
   r   r   r   r6  r   r¶   rÅ   ÚstaticmethodrÏ   r²   rô   rI   rë   rí   r°   r.   rý   r  ÚabcÚabstractmethodr  r  rÊ   Úclassmethodr.  r<  rD  rI  r   r   r   r�   r�   �   s‚  € € € € € ðð ð €Ið TXð ð  ð  ð  ð  ð:/ð /ð /ð OSð%
ð %
ð %
ð %
ð %
ðN ð	Sð 	Sð 	Sñ „\ð	Sð+7ð +7ð +7ð +7ðZ ðð ð ñ „\ðð. ð$ð $ð $ñ „Xð$ð ð%ð %ð %ñ „Xð%ð ð&ð &ð &ñ „Xð&ð ð%ð %ð %ñ „Xð%ðð ð ð ðð ð ð ð 	Ôð
ð 
ñ Ôð
ð"ð ð ð ð< ,0¸Èð [0ð [0ð [0ð [0ð [0ðz ð	ð 	ñ „[ð	ð ð  $Ø $ð,Mð ,Mð ,Mð ,Mñ „[ð,Mð\ ð  $Ø $Øð	 %ð  %ð  %ð  %ñ „[ð %ðD ð !%Øð	ð ð ð ð ñ „[ðð ð r   r�   c                  ó   — e Zd ZdZd„ Zd„ ZdS )ÚOpRunExpandz.Class any operator to avoid must inherit from.c                ó(   — t          d| › d�¦  «        ‚©Nz5The reference implementation must not use this node (r!  )rª   )r+  rµ   r
  s      r   Ú__new__zOpRunExpand.__new__d  s"   € ÝØKÀCÐKÐKÐKñ
ô 
ð 	
r   c                óB   — t          dt          | ¦  «        › d�¦  «        ‚rR  )rª   r<   ©r   Úinputsr
  s      r   r  zOpRunExpand._runi  s(   € ÝØRÅDÈÁJÄJÐRÐRÐRñ
ô 
ð 	
r   N)r
   r   r   r   rS  r  r   r   r   rP  rP  a  s8   € € € € € Ø8Ð8ð
ð 
ð 
ð

ð 
ð 
ð 
ð 
r   rP  c                  ó,   — e Zd ZdZ	 	 ddd„Zd„ Zd„ ZdS )r$  zRuns a custom function.NrŸ   r    r¡   údict[str, Any] | NoneÚimplr   rÉ   r   rE   c                óà   ‡ — |€ t          d|j        ›d|j        ›d�¦  «        ‚t                               ‰ ||¦  «         |‰ _        ˆ fd„t          ‰ j        d|¦  «        D ¦   «         ‰ _        d S )Nz"impl cannot be None for node type ú from domain r)   c                ó2   •— i | ]}|t          ‰|¦  «        “ŒS r   )rÝ   )rN   r   r   s     €r   ú
<dictcomp>z'OpFunction.__init__.<locals>.<dictcomp>‚  s5   ø€ ð 
ð 
ð 
àð •'˜$ Ñ%Ô%ð
ð 
ð 
r   Úattributes_)rª   r°   r.   r�   r   Úimpl_rÝ   r^  )r   rŸ   r¡   rY  rÉ   s   `    r   r   zOpFunction.__init__r  s£   ø€ ð ˆ<Ýð5°YÔ5Fð 5ð 5Ø(Ô/ð5ð 5ð 5ñô ð õ 	�Š�t˜Y¨
Ñ3Ô3Ð3ØˆŒ
ð
ð 
ð 
ð 
å ¤
¨M¸:ÑFÔFð
ñ 
ô 
ˆÔÐÐr   c                ó.   —  | j         | j        g|¢R i |¤ŽS r   )Ú	_run_implr_  rU  s      r   r  zOpFunction._run‡  s&   € ØˆtŒ~˜dœjÐ<¨6Ð<Ð<Ð<°VÐ<Ð<Ð<r   c                óÖ  — t          |j        ¦  «        t          |¦  «        k    rEt          dt          |¦  «        › dt          |j        ¦  «        › d| j        ›d| j        ›d�	¦  «        ‚|                     dd ¦  «        }t          t          |j        |d¬¦  «        ¦  «        }| j         	                    ¦   «         }| 
                    |¦  «         i }|�
d	|d
<   ||d<    |j        d |fd|i|¤Ž}t          |j        ¦  «        t          |¦  «        k    rEt          dt          |¦  «        › dt          |j        ¦  «        › d| j        ›d| j        ›d�	¦  «        ‚t          |¦  «        S )Nz.Mismatch lengths between the number of inputs z# and the expected number of inputs z
 for node r[  r)   rÍ   F)ÚstrictTrÇ   rÈ   rÉ   z/Mismatch lengths between the number of outputs z$ and the expected number of outputs )r"  Úinput_namesrª   r°   r.   Úpopr©   Úzipr^  ÚcopyÚupdaterÊ   Úoutput_namesrQ   )	r   rY  rV  r
  rÍ   ÚfeedsrÉ   rÎ   Úresultss	            r   ra  zOpFunction._run_implŠ  sÂ  € ÝˆtÔÑ Ô ¥C¨¡K¤KÒ/Ð/ÝðJÅÀVÁÄð Jð JÝ58¸Ô9IÑ5JÔ5JðJð Jà œLðJð Jà9=¼ðJð Jð Jñô ð ð
 —:’:˜j¨$Ñ/Ô/ˆÝ•S˜Ô)¨6¸%Ð@Ñ@Ô@ÑAÔAˆØÔ%×*Ò*Ñ,Ô,ˆ
Ø×Ò˜&Ñ!Ô!Ð!Ø%'ˆ
ØÐð 59ˆJÐ0Ñ1Ø&.ˆJ�{Ñ#Ø�$”(˜4 ÐLÐL°:ÐLÀÐLÐLˆÝˆtÔ Ñ!Ô!¥S¨¡\¤\Ò1Ð1ÝðJÅ#ÀgÁ,Ä,ð Jð JÝ69¸$Ô:KÑ6LÔ6LðJð Jà œLðJð Jà9=¼ðJð Jð Jñô ð õ
 �W‰~Œ~Ðr   rJ  )
rŸ   r    r¡   rX  rY  r   rÉ   rX  r   rE   )r
   r   r   r   r   r  ra  r   r   r   r$  r$  o  sY   € € € € € Ø!Ð!ð Ø,0ð
ð 
ð 
ð 
ð 
ð*=ð =ð =ðð ð ð ð r   r$  c                  ó$   — e Zd ZdZ	 ddd	„Zd
„ ZdS )ÚOpFunctionContextDependantzáThe function can be instantiated but only at execution time.
    An instance of OpFunction is created everytime to node is executed.
    This is needed when the schema of an operator defines a context dependent function.
    NrŸ   r    r¡   rX  Úparentr   c                óÖ   — t                                | ||| i ¬¦  «         || _        |j        |j                 }t
          j                             |j        ||j        ¦  «        | _	        d S )N)rY  rÉ   )
r$  r   rn  r¤   r.   r+   r,   r7  r°   Úschema_)r   rŸ   r¡   rn  Úversions        r   r   z#OpFunctionContextDependant.__init__¬  sc   € õ 	×Ò˜D )¨Z¸dÈrÐÑRÔRÐRØˆŒØ”- 	Ô 0Ô1ˆÝ”y×+Ò+ØÔ˜w¨	Ô(8ñ
ô 
ˆŒˆˆr   c                ó`  — g }|D ]^}t           j                             |j        ¦  «        }|                     t           j                             ||j        ¦  «        ¦  «         Œ_| j                             | j	        |¦  «        } || j	        | j
        ¦  «        } | j        |j        g|¢R i |¤ŽS r   )r+   r;  Únp_dtype_to_tensor_dtyperH   rÛ   Úmake_tensor_type_protorC   rn  Ú
_load_implrŸ   r¡   ra  r_  )r   rV  r
  Útypesru   rH   ÚclrH  s           r   r  zOpFunctionContextDependant._run¹  s¬   € ð ˆØð 	Mð 	MˆAÝ”K×8Ò8¸¼ÑAÔAˆEØ�LŠL�œ×;Ò;¸EÀ1Ä7ÑKÔKÑLÔLÐLÐLØŒ[×#Ò# D¤N°EÑ:Ô:ˆØˆr�$”. $¤/Ñ2Ô2ˆØˆtŒ~˜dœjÐ<¨6Ð<Ð<Ð<°VÐ<Ð<Ð<r   r   )rŸ   r    r¡   rX  rn  r   )r
   r   r   r   r   r  r   r   r   rm  rm  ¦  sK   € € € € € ðð ð ð	
ð 
ð 
ð 
ð 
ð	=ð 	=ð 	=ð 	=ð 	=r   rm  )r   r'   )rJ   rK   r   r?   )rV   rW   )Ú
__future__r   rL  Útypingr   r   ÚnumpyrZ   r+   Úcollections.abcr   rª   r   r   r/   r   r   r   r3   r¯   r5   r?   rU   r–   rd   ÚABCr�   rP  r$  rm  r   r   r   ú<module>r}     sÑ  ðð #Ð "Ð "Ð "Ð "Ð "à 
€
€
€
Ø %Ð %Ð %Ð %Ð %Ð %Ð %Ð %à Ð Ð Ð à €€€àð )Ø(Ð(Ð(Ð(Ð(Ð(ð:ð :ð :ð :ð :�|ñ :ô :ð :ðqð qð qð qð q˜,ñ qô qð qðCð Cð Cð Cð CÐ!4ñ Cô Cð Cðuð uð uð uð uñ uô uð uð;ð ;ð ;ð ;ð ;ñ ;ô ;ð ;ðð ð ð ð& ˆ>ÑÔ€ð	0ð 	0ð 	0ð 	0ð 	0ñ 	0ô 	0ð 	0ð!ð !ð !ð !ð !ñ !ô !ð !ð"ð ð ð ðð ð ð ð:ð ð ð ð ñ ô ð ðNð Nð Nð Nð NˆCŒGñ Nô Nð Nðb
ð 
ð 
ð 
ð 
�%ñ 
ô 
ð 
ð4ð 4ð 4ð 4ð 4�ñ 4ô 4ð 4ðn=ð =ð =ð =ð = ñ =ô =ð =ð =ð =r   