+
    –°³jk  ã                   óÆ  a € R& t00 t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	H
t
 ^ RIt^ RIHt ^ RIHt ^ RIHt ^ RIHtHtHtHtHtHt ^RIHtHt  . R'OtRRR	R
/t0 R(mtR tR)R R llt/ t] ^ k  ! R R4      t ]PB                   ! R R4      4       t"R R lt#R R lt$R R lt%R R lt&R R lt'R R lt(R R lt)R R  lt*R! t+R" t,R*R# lt-R$ t.R+R% lt/R# ),é    N)Úinfer_schema)Úget_ctx)ÚBaseTyÚBaseTypeÚFunctionSchemaÚListTypeÚOperatorNameÚ
SchemaKind)Úautograd_kernel_indirectionÚconstruct_autograd_kernelÚCustomOpÚcpuÚCPUÚcudaÚCUDAc                  ó@   € \         P                  ! R \        ^R7       R# )zwtorch._custom_op is deprecated and will be removed in PyTorch 2.6, please use the equivalent torch.library API instead.©Ú
stacklevelN)ÚwarningsÚwarnÚDeprecationWarning© ó    ÚV/home/luca/screen-checking/.venv/lib/python3.14/site-packages/torch/_custom_op/impl.pyÚwarn_deprecatedr   5   s   € Ü‡M‚Mð	8äØ÷	r   c                ó^   € V ^8„  d   QhR\         R\         R,          R\        P                  /# )é   ÚqualnameÚmanual_schemaNÚreturn)ÚstrÚtypingÚCallable)Úformats   "r   Ú__annotate__r%   >   s)   € ÷ 7ñ 7œð 7¬C°$­Jð 7Ä&Ç/Á/ñ 7r   c                ó,   a a€ \        4        VV 3R lpV# )úD
This API is deprecated, please use torch.library.custom_op instead
c           	      ó°  <€ \         P                  ! V 4      '       g   \        R \        V 4       24      h\	        S
4      w  r\        V4       V P                  V8w  d    \        RS
 RV RV P                   R24      hS	f   \        V R
R7      MS	pV V 2p\        P                  ! V4      p\        V4       S	e   \        WP4       \        P                  ! VR4      pVP                  V4       \        WP                   4      p\#        WaWRVRR7      pV P                  Vn        V P$                  Vn        V P&                  Vn        \        P(                  ! WhP*                  R	4      ! \-        \.        P0                  ! V4      4      4       \2        P4                  P7                  V\8        P:                  ! \<        \.        P0                  ! V4      4      4       V# )zDcustom_op(...)(func): Expected `func` to be a Python function, got: zcustom_op(qualname='z-', ...)(func): expected `func` to have name 'z' but got 'zX'. Please either change the name of `func` or the qualname that is passed to `custom_op`)Úmutates_argsÚFRAGMENTT©Ú_private_accessÚAutogradr   )ÚinspectÚ
isfunctionÚ
ValueErrorÚtypeÚparse_qualnameÚvalidate_namespaceÚ__name__r   r   ÚparseÚvalidate_schemaÚ validate_function_matches_schemaÚlibraryÚLibraryÚdefineÚfind_ophandle_or_throwÚnamer   Ú
__module__Ú__doc__ÚimplÚ_opnamer   ÚweakrefÚproxyÚtorchÚ_CÚ#_dispatch_set_report_error_callbackÚ	functoolsÚpartialÚreport_error_callback)ÚfuncÚnsr<   ÚschemaÚ
schema_strÚfunction_schemaÚlibÚophandleÚresultr   r   s   &        €€r   ÚinnerÚcustom_op.<locals>.innerD   s�  ø€ Ü×!Ò! $×'Ò'Üð"Ü"& t£* ð/óð ô
 " (Ó+‰ˆÜ˜2ÔØ�=‰=˜DÔ ÜØ& x jð 1!Ø!%  k°$·-±-°ð A+ð,óð ð Ò$ô ˜¨BÕ/àð 	ð
 �v˜f˜XÐ&ˆ
Ü(×.Ò.¨zÓ:ˆÜ˜Ô(ØÒ$Ü,¨_ÔCä�oŠo˜b *Ó-ˆØ�
‰
�:ÔÜ)¨"×.BÑ.BÓCˆÜØ�_¨HÀdô
ˆð Ÿ-™-ˆŒØ ŸO™OˆÔØŸ™ˆŒä�Š�SŸ.™.¨*Ô5Ü'¬¯ª°fÓ(=Ó>ô	
ô 	�‰×4Ñ4Ø”i×'Ò'Ô(=¼w¿}º}ÈVÓ?TÓUô	
ð ˆr   )r   )r   r   rQ   s   ff r   Ú	custom_oprS   >   s   ù€ ô Ôö/ðb €Lr   c                   óÜ   a a€ ] tR t^�t oRtRR/V 3R lltR tRR ltR tR t	R	 t
R
 tR tRV3R lR lltR tV3R lR ltRV3R lR lltR tR tR tR tRR ltRR ltRtVtV ;t# )r   r'   r,   Fc               ó  <€ \         SV `  4        \        4        V'       g   \        R 4      hV RV 2pW0n        W n        Wn        WPn        W@n        Wpn	        RV n
        / V n        RV n        V \        V P                  &   R# )z|The CustomOp constructor is private and we do not guarantee BC for it. Please use custom_op(...) to create a CustomOp objectú::NF)ÚsuperÚ__init__r   ÚRuntimeErrorÚ_schemaÚ_cpp_nsÚ_libÚ	_ophandler@   Ú	_qualnamer4   Ú_implsÚ'_registered_autograd_kernel_indirectionÚglobal_registry)	ÚselfrN   Úcpp_nsrK   Úoperator_namerO   r,   r<   Ú	__class__s	   &&&&&&$ €r   rX   ÚCustomOp.__init__†   s‚   ø€ ô 	‰ÑÔÜÔßÜðSóð ð �˜˜M˜?Ð+ˆØŒØŒØ%(Œ	Ø5=Œà)Œà"ŒØˆŒð :<ˆŒà7<ˆÔ4à*.Œ˜Ÿ™Ó'r   c                óÖ   € V P                   '       d   \        R 4      hV P                  P                  V P                  \        \        P                  ! V 4      4      R4       RV n         R# )z.autograd kernel indirection already registeredr-   TN)r`   ÚAssertionErrorr\   r?   r@   r   rA   rB   ©rb   s   &r   Ú%_register_autograd_kernel_indirectionÚ.CustomOp._register_autograd_kernel_indirection¢   sN   € Ø×7×7Ð7Ü Ð!QÓRÐRØ�	‰	�‰Ø�L‰LÔ5´g·m²mÀDÓ6IÓJÈJô	
ð 8<ˆÖ4r   c                óŽ  € V P                  V4      '       dQ   V P                  V,          pVf   \        R4      hVP                  p\	        RV RV P
                   RV RV R2	4      h\        P                  ! \        P                  ! V4      4      pVP                   RVP                   2p\        W%4      V P                  V&   R # )Nz&func_and_location is unexpectedly NonezAttempting to register a z impl for operator z that already has a z  impl registered from Python at z. This is not supported.Ú:)Ú	_has_implr_   rh   ÚlocationrY   r^   r.   ÚgetframeinfoÚsysÚ	_getframeÚfilenameÚlinenoÚFuncAndLocation)rb   ÚkindrI   r   Úfunc_and_locationro   Úframes   &&&&   r   Ú_register_implÚCustomOp._register_impl­   s¿   € Ø�>‰>˜$×ÒØ $§¡¨DÕ 1ÐØ Ò(Ü$Ð%MÓNÐNØ(×1Ñ1ˆHÜØ+¨D¨6Ð1DÀTÇ^Á^ÐDTð U&Ø&* VÐ+KØ�*Ð4ð6óð ô
 ×$Ò$¤S§]¢]°:Ó%>Ó?ˆØ—n‘nÐ% Q u§|¡| nÐ5ˆÜ+¨DÓ;ˆ�‰�DÓr   c                ó(   € V P                   V,          # ©N©r_   ©rb   rv   s   &&r   Ú	_get_implÚCustomOp._get_impl¼   s   € Ø�{‰{˜4Õ Ð r   c                ó   € WP                   9   # r|   r}   r~   s   &&r   rn   ÚCustomOp._has_impl¿   s   € Ø—{‘{Ñ"Ð"r   c                óÔ   € V = \        \        P                  V P                  4      p\        WP                  4      '       d   \        WP                  4       \        V P                   R # r|   )
r\   ÚgetattrrC   Úopsr[   Úhasattrr@   Údelattrra   r^   )rb   Úopnamespaces   & r   Ú_destroyÚCustomOp._destroyÂ   sD   € ð ˆIäœeŸi™i¨¯©Ó6ˆÜ�;§¡×-Ò-Ü�K§¡Ô.ä˜DŸN™NÒ+r   c                ó"   € R V P                    R2# )z<CustomOp(op="z")>)r^   ri   s   &r   Ú__repr__ÚCustomOp.__repr__Ñ   s   € Ø §¡Ð/¨sÐ3Ð3r   c                óN   € \         P                  ! V P                  .VO5/ VB pV# r|   )rD   Ú_dispatch_call_boxedr]   )rb   ÚargsÚkwargsrP   s   &*, r   Ú__call__ÚCustomOp.__call__Ô   s'   € ô ×(Ò(¨¯©ÐI¸$ÒIÀ&ÑIˆØˆr   c                ón   <€ V ^8„  d   QhRS[ S[P                  S[ ,          ,          RS[P                  /# )r   Údevice_typesr    )r!   r"   ÚIterabler#   )r$   Ú__classdict__s   "€r   r%   ÚCustomOp.__annotate__Û   s1   ø€ ÷ ñ á™FŸO™O©CÕ0Õ0ðñ 
�‰ñ	r   c                óv   a aa€ \        S\        4      '       d   S.oS F  p\        V4       K  	  VVV 3R lpV# )r'   c                 óò   <€ \        S4       Ff  pSP                  V4       SP                  WSR 7       \        V,          p\        P
                  ! SP                  SP                  V4      ! V 4       Kh  	  V # )r   )ÚsetÚ_check_doesnt_have_library_implry   ÚSUPPORTED_DEVICE_TYPE_TO_KEYr8   r?   r\   r@   )ÚfÚdevice_typeÚdispatch_keyÚ_stacklevelr•   rb   s   &  €€€r   rQ   ÚCustomOp.impl.<locals>.innerè   sa   ø€ Ü" <Ö0�Ø×4Ñ4°[ÔAØ×#Ñ# K¸{Ð#ÔKÜ;¸KÕH�Ü—’˜TŸY™Y¨¯©°lÔCÀAÖFñ	  1ð
 ˆHr   )Ú
isinstancer!   Úvalidate_device_type)rb   r•   r¡   rŸ   rQ   s   fff  r   r?   ÚCustomOp.implÛ   s7   ú€ ô �l¤C×(Ò(Ø(˜>ˆLÛ'ˆKÜ  Ö-ñ (÷	ð ˆr   c                óØ   € V P                  V4      '       d   R # \        V,          p\        P                  ! V P                  V4      '       d   \        RV RV P                   R24      hR # )Nzimpl(..., device_types=z): the operator zs already has an implementation for this device type via a pre-existing torch.library or TORCH_LIBRARY registration.)rn   r�   rD   Ú._dispatch_has_computed_kernel_for_dispatch_keyr^   rY   )rb   rŸ   Úkeys   && r   rœ   Ú(CustomOp._check_doesnt_have_library_implò   sh   € Ø�>‰>˜+×&Ò&ÙÜ*¨;Õ7ˆÜ×<Ò<¸T¿^¹^ÈS×QÒQÜØ)¨+¨Ð6FÀtÇ~Á~ÐFVð WLð Móð ñ Rr   c                ó4   <€ V ^8„  d   QhRS[ P                  /# ©r   r    ©r"   r#   )r$   r—   s   "€r   r%   r˜   ý   s   ø€ ÷ ñ ™fŸo™oñ r   c                ó   a € V 3R lpV# )z2Register an implementation for a factory function.c                 ó�   <€ SP                  R V 4       \        P                  ! SP                  SP                  R4      ! V 4       V # )ÚfactoryÚBackendSelect)ry   r8   r?   r\   r@   )rž   rb   s   &€r   rQ   Ú$CustomOp.impl_factory.<locals>.inner   s5   ø€ Ø×Ñ 	¨1Ô-Ü�LŠL˜Ÿ™ D§L¡L°/ÔBÀ1ÔEØˆHr   r   )rb   rQ   s   f r   Úimpl_factoryÚCustomOp.impl_factoryý   s   ø€ õ	ð
 ˆr   c                ó4   <€ V ^8„  d   QhRS[ P                  /# r«   r¬   )r$   r—   s   "€r   r%   r˜     s   ø€ ÷ !ñ !©f¯o©oñ !r   c                ó   a a€ VV 3R lpV# )r'   c                 ó4  <a aa€ SP                  4        SP                  R S SR7       SP                  R 4      P                  oSP                  o\
        P                  ! S 4      V VV3R l4       pSP                  P                  SP                  VR4       S # )Úabstractr   c                  óÂ   <€ VV3R  lp\         P                  P                  P                  V4      ;_uu_ 4        S! V / VB uuRRR4       #   + '       g   i     R# ; i)c                  ó&   <€ \        R S RS  24      h)z<Attempted to call get_ctx() for the meta implementation for a  .You have presumably called get_ctx() because the operator has a data-dependent output shape; if so, there is no such meta implementation and this error is the correct behavior. Otherwise, please remove the call to get_ctx() in the implementation registered with impl_abstract at ©rY   )ro   r   s   €€r   Úerror_on_ctxÚOCustomOp.impl_abstract.<locals>.inner.<locals>.f_with_ctx.<locals>.error_on_ctx  s+   ø€ Ü&ðØ'˜jð )ð '˜Zð)ó	ð 	r   N)rC   Ú_libraryÚ	fake_implÚset_ctx_getter)r�   r‘   r»   rž   ro   r   s   *, €€€r   Ú
f_with_ctxÚ9CustomOp.impl_abstract.<locals>.inner.<locals>.f_with_ctx  sB   ø€ ö
ô —^‘^×-Ñ-×<Ñ<¸\×JÕJÙ˜dÐ- fÑ-÷ K×J×JÓJús   ºAÁA	ÚMeta)
Ú$_check_doesnt_have_library_meta_implry   r   ro   r^   rF   Úwrapsr\   r?   r@   )rž   rÀ   ro   r   r¡   rb   s   f @@€€r   rQ   Ú%CustomOp.impl_abstract.<locals>.inner  s}   û€ Ø×5Ñ5Ô7Ø×Ñ 
¨A¸+ÐÔFØ—~‘~ jÓ1×:Ñ:ˆHà—~‘~ˆHô �_Š_˜QÓö.ó  ð.ð  �I‰I�N‰N˜4Ÿ<™<¨°VÔ<ØˆHr   r   ©rb   r¡   rQ   s   ff r   Úimpl_abstractÚCustomOp.impl_abstract  s   ù€ ö
	ð8 ˆr   c                ó˜  a a€ VV 3R  lpS P                   oSP                  4       \        P                  8w  d	   V! R4       SP                  pSP                  '       g	   V! R4       \        V4      ^ 8:  d   \        R\        V4       24      h\        ;QJ d    R V 4       F  '       g   K   RM	  RM! R V 4       4      pV'       d	   V! R4       \        \        P                  4      R\        \        P                  4      R	\        \        P                  4      R
\        \        P                  4      R\        \        P                  4      R\        \        \        P                  4      R4      R/pSP                   FF  pVP                   V9   d   K  V! R\#        VP%                  4       4       RVP                    R24       KH  	  R# )c                 ó@   <€ \        R V  RSP                   RS 24      h)zCCannot use torch._custom_ops APIs to register backward formula for z. Got operator z with schema: )rY   r^   )ÚdetailrK   rb   s   &€€r   ÚerrorÚ4CustomOp._check_can_register_backward.<locals>.error+  s1   ø€ ÜðØ%˜h oØ—>‘>Ð" .°°ð:óð r   znon-functional operatorzoperator with no returnsz"expected at least one return, got c              3   ó‚   "  € T F5  qP                   R J;'       d    VP                   P                  '       * x € K7  	  R # 5ir|   )Ú
annotationÚis_write)Ú.0Úrs   & r   Ú	<genexpr>Ú8CustomOp._check_can_register_backward.<locals>.<genexpr><  s2   é € ð #
ÙLPÀq�L‰L Ð$×BÐB¨Q¯\©\×-BÑ-BÔ)BÔBËDùs   ‚?›$?TFzoperator that returns viewsÚintÚSymIntÚboolÚfloatÚTensorNzList[Tensor]zoperator with return not in z (got Ú))rZ   rv   r
   Ú
functionalÚreturnsÚlenrh   Úanyr   r   rÕ   rÖ   r×   rØ   rÙ   r   r1   ÚlistÚvalues)rb   rÌ   ÚretsÚis_non_mutating_viewÚallowed_return_typesÚretrK   s   f     @r   Ú_check_can_register_backwardÚ%CustomOp._check_can_register_backward*  sa  ù€ ö	ð —‘ˆØ�;‰;‹=œJ×1Ñ1Ô1ÙÐ+Ô,à�~‰~ˆØ�~�~ˆ~ÙÐ,Ô-äˆt‹9˜Œ>Ü Ð#EÄcÈ$ÃiÀ[Ð!QÓRÐRß"›sñ #
ÙLPó#
ŸsŸsšsñ #
ÙLPó#
ó  
Ð÷  ÙÐ/Ô0ô ”V—Z‘ZÓ  %Ü”V—]‘]Ó# XÜ”V—[‘[Ó! 6Ü”V—\‘\Ó" GÜ”V—]‘]Ó# XÜ”XœfŸm™mÓ,¨dÓ3°^ð 
Ðð —>”>ˆCØ�x‰xÐ/Ô/ÙÙØ.¬tÐ4H×4OÑ4OÓ4QÓ/RÐ.SÐSYÐZ]×ZbÑZbÐYcÐcdÐeöó "r   c                óF  € V P                   '       d   R # \        P                  ! V P                  R4      '       d   \	        RV P                   R24      hR FF  p\        P                  ! V P                  V4      '       g   K,  \	        RV P                   RV R24      h	  R # )NÚCompositeImplicitAutogradz3impl_backward/impl_save_for_backward: the operator a3   already has an implementation for this device type via a pre-existing registration to DispatchKey::CompositeImplicitAutograd.CompositeImplicitAutograd operators do not need an autograd formula; instead, the operator will decompose into its constituents and those can have autograd formulas defined on them.z; already has an Autograd kernel registered to DispatchKey::z‘ via a pre-existing torch.library or TORCH_LIBRARY registration. Please either remove those registrations or don't use the torch._custom_ops APIs)r-   ÚAutogradCPUÚAutogradCUDA)r`   rD   Ú%_dispatch_has_kernel_for_dispatch_keyr^   rY   )rb   r¨   s   & r   Ú(_check_doesnt_have_library_autograd_implÚ1CustomOp._check_doesnt_have_library_autograd_implR  s©   € Ø×7×7Ð7Ùä×3Ò3Ø�N‰NÐ7÷
ò 
ô ØEÀdÇnÁnÐEUð V>ð ?óð ó ?ˆCÜ×7Ò7¸¿¹È×LÔLÜ"ð$Ø$(§N¡NÐ#3ð 42Ø25°ð 7YðZóð ó ?r   c                óØ  € V P                  R 4      '       d   R# \        P                  ! V P                  R4      '       d*   \        P                  ! V P                  R4      '       g   R# \        P                  ! V P                  R4      '       d   \	        RV P                   R24      h\        P                  ! V P                  R4      '       d   \	        RV P                   R24      hR# )r·   NÚCompositeExplicitAutogradrÂ   rè   z!impl_abstract(...): the operator a-   already has an implementation for this device type via a pre-existing registration to DispatchKey::CompositeImplicitAutograd.CompositeImplicitAutograd operators do not need an abstract impl; instead, the operator will decompose into its constituents and those can have abstract impls defined on them.z³ already has a DispatchKey::Meta implementation via a pre-existing torch.library or TORCH_LIBRARY registration. Please either remove that registration or don't call impl_abstract.)rn   rD   rë   r^   rY   ri   s   &r   rÃ   Ú-CustomOp._check_doesnt_have_library_meta_impln  s×   € Ø�>‰>˜*×%Ò%Ùô ×3Ò3Ø�N‰NÐ7÷
ò 
ä×:Ò:¸4¿>¹>È6×RÒRÙô ×3Ò3Ø�N‰NÐ7÷
ò 
ô Ø3°D·N±NÐ3Cð D;ð <óð ô ×3Ò3°D·N±NÀF×KÒKÜØ3°D·N±NÐ3Cð DVð Wóð ñ Lr   c           
     ó„  € V P                  R 4      '       g   \        R4      hV P                  R4      '       g   \        R4      h\        V P                  V P                  V \        V P                  4      V P                  R4      P                  V P                  R 4      P                  4      pV P                  RV4       R# )Úbackwardz&backward impl must be registered firstÚsave_for_backwardz/save_for_backward impl must be registered firstÚautogradN)
rn   rh   r   rZ   Ú_output_differentiabilityÚget_opr^   r   rI   ry   )rb   Úkernels   & r   Ú_register_autograd_kernelÚ"CustomOp._register_autograd_kernelš  s™   € Ø�~‰~˜j×)Ò)Ü Ð!IÓJÐJØ�~‰~Ð1×2Ò2Ü Ð!RÓSÐSÜ*Ø�L‰LØ×*Ñ*ØÜ�4—>‘>Ó"Ø�N‰NÐ.Ó/×4Ñ4Ø�N‰N˜:Ó&×+Ñ+ó
ˆð 	×Ñ˜J¨Ö/r   c                ó   a a€ VV 3R lpV# )ziRegister a function that tells us what to save for backward.

Please see impl_backward for more details.
c                 ó  <€ SP                  4        SP                  4        SP                  '       g   SP                  4        SP	                  R V SR7       SP                  R4      '       d   SP                  4        R# R# )ró   r   rò   N)rå   rì   r`   rj   ry   rn   rø   )rž   r¡   rb   s   &€€r   rQ   Ú.CustomOp.impl_save_for_backward.<locals>.inner¯  si   ø€ Ø×-Ñ-Ô/Ø×9Ñ9Ô;Ø×?×?Ð?Ø×:Ñ:Ô<Ø×ÑÐ 3°QÀ;ÐÔOØ�~‰~˜j×)Ò)Ø×.Ñ.Ö0ñ *r   r   rÆ   s   ff r   Úimpl_save_for_backwardÚCustomOp.impl_save_for_backward©  s   ù€ ö	1ð ˆr   c                ó"  a aa€ Se€   V3R lp\        S\        4      '       g   V! 4        S F"  p\        V\        4      '       d   K  V! 4        K$  	  \        S P                  P
                  4      \        S4      8w  d   V! 4        VVV 3R lpV# )r'   c                  ó    <€ \        R S  24      h)z¢impl_backward(output_differentiability): expected output_differentiability to be a list of bools with length equal to the number of outputs of this CustomOp got: rº   )Úoutput_differentiabilitys   €r   ÚyellÚ$CustomOp.impl_backward.<locals>.yellÀ  s"   ø€ Ü"ðð 5Ð5ð7óð r   c                 ó  <€ SP                  4        SP                  4        SP                  '       g   SP                  4        SP	                  R V SR7       SSn        SP                  R4      '       d   SP                  4        R# R# )rò   r   ró   N)rå   rì   r`   rj   ry   rõ   rn   rø   )rž   r¡   r  rb   s   &€€€r   rQ   Ú%CustomOp.impl_backward.<locals>.innerÐ  sq   ø€ Ø×-Ñ-Ô/Ø×9Ñ9Ô;Ø×?×?Ð?Ø×:Ñ:Ô<Ø×Ñ 
¨A¸+ÐÔFØ-EˆDÔ*Ø�~‰~Ð1×2Ò2Ø×.Ñ.Ö0ñ 3r   )r£   rß   r×   rÝ   rZ   rÜ   )rb   r  r¡   r  ÚdiffrQ   s   fff   r   Úimpl_backwardÚCustomOp.impl_backwardº  sq   ú€ ð $Ò/õô Ð6¼×=Ò=Ù”Û0�Ü! $¬×-Ô-Ù–Fñ 1ô �4—<‘<×'Ñ'Ó(¬CÐ0HÓ,IÔIÙ”÷	1ð ˆr   )
r4   r[   r_   r\   r]   r@   rõ   r^   r`   rZ   )r   )Nr   )r4   r=   Ú__qualname__Ú__firstlineno__r>   rX   rj   ry   r   rn   r‰   rŒ   r’   r?   rœ   r²   rÇ   rå   rì   rÃ   rø   rý   r  Ú__static_attributes__Ú__classdictcell__Ú__classcell__)re   r—   s   @@r   r   r   �   sƒ   ù‡ € ñð/ØOT÷/ò8<ô<ò!ò#ò,ò4ò÷ò ò.	÷ð ÷!ò !òF&òPò8%òX0ô÷" ô  r   c                   ó,   a € ] tR tRt o V 3R ltRtV tR# )ru   iÝ  c                óF   <€ V ^8„  d   Qh/ S[ P                  ;R&   S[;R&   # )r   rI   ro   )r"   r#   r!   )r$   r—   s   "€r   r%   ÚFuncAndLocation.__annotate__Ý  s    ø‡ ‚ á
�/‰/Ññ ñ �Mò r   r   N)r4   r=   r	  r
  Ú__annotate_func__r  r  )r—   s   @r   ru   ru   Ý  s   ø‡ ‡ „ r   ru   c                ó0   € V ^8„  d   QhR\         R\        /# )r   rc   rd   )r!   r	   )r$   s   "r   r%   r%   ã  s   € ÷ ñ ¤3ð ´|ñ r   c                 ó˜   € VP                   f   RMVP                   p\        P                  ! V  R\        VP                  4       2V4      # )NÚ rV   )Úoverload_namerD   Ú_dispatch_find_schema_or_throwr!   r<   )rc   rd   r  s   && r   r;   r;   ã  sN   € à×)Ñ)Ò1‰°}×7RÑ7Rð ô ×,Ò,Øˆ(�"”S˜×+Ñ+Ó,Ð-Ð.°óð r   c                ó(   € V ^8„  d   QhR\         RR/# )r   rJ   r    N©r!   )r$   s   "r   r%   r%   ì  s   € ÷ 

ñ 

œ3ð 

 4ñ 

r   c                 ól   € R V 9   d   \        RV  R24      hV \        9   d   \        RV  RV  R24      hR# )Ú.zcustom_op(..., ns="zC"): expected ns to not contain any . (and be a valid variable name)zcustom_op(..., ns='z'): 'z9' is a reserved namespace, please choose something else. N)r0   ÚRESERVED_NS)rJ   s   &r   r3   r3   ì  sZ   € Ø
ˆb„yÜØ! " ð &#ð $ó
ð 	
ð 
Œ[ÔÜØ! "  U¨2¨$ð /-ð .ó
ð 	
ñ r   c                ó(   € V ^8„  d   QhR\         RR/# )r   rK   r    N)r   )r$   s   "r   r%   r%   ù  s   € ÷ 
ñ 
œNð 
¨tñ 
r   c                 óÌ   € \         P                  P                  P                  V 4      '       g   \	        R V  24      hV P
                  P                  e   \	        RV  24      hR# )z»custom_op only supports functional operators (ops that do not mutate any inputs, do not return views of the inputs, and has at least one return). Got the following non-functional schema: NzUcustom_op does not support arguments named 'self'. Please rename your argument. Got: )rC   r½   ÚutilsÚis_functional_schemar0   Ú	argumentsÚself_arg)rK   s   &r   r6   r6   ù  sq   € Ü�>‰>×Ñ×4Ñ4°V×<Ò<Üð8ð 9?°xðAó
ð 	
ð ×Ñ× Ñ Ò,Üð*Ø*0¨ð3ó
ð 	
ñ -r   c                óR   € V ^8„  d   QhR\         R\        \         \         3,          /# )r   r   r    )r!   Útuple)r$   s   "r   r%   r%   
  s"   € ÷ ñ œSð ¤U¬3´¨8¥_ñ r   c                 óÀ   € V P                  R ^4      p\        V4      ^8w  d   \        RV  R24      hRV^,          9   d   \        RV  24      hV^ ,          V^,          3# )rV   z$Expected there to be a namespace in z;, i.e. The operator name should look something like ns::foor  z�The torch.custom_ops APIs do not handle overloads, i.e. operator names with '.' in them. Please name your operator something like ns::foo. Got: )ÚsplitrÝ   r0   )r   Únamess   & r   r2   r2   
  s|   € Ø�N‰N˜4 Ó#€EÜ
ˆ5ƒz�Q„ÜØ2°8°*ð =?ð @ó
ð 	
ð ˆe�A�h„Üðð �:ðó
ð 	
ð ��8�U˜1•XÐÐr   c                ó(   € V ^8„  d   QhR\         RR/# )r   rŸ   r    Nr  )r$   s   "r   r%   r%     s   € ÷ 
ñ 
¤cð 
¨dñ 
r   c                 ód   € V \         9  d%   \        R V  R\         P                  4        R24      hR# )zCustomOp.impl(device_types=[z(, ...]): we only support device_type in r  N)r�   r0   Úkeys)rŸ   s   &r   r¤   r¤     s?   € ØÔ6Ô6ÜØ*¨;¨-ð 8Ü.×3Ñ3Ó5Ð6°að9ó
ð 	
ñ 7r   c                óD   € V ^8„  d   QhR\         P                  R\        /# )r   Úparamr    )r.   Ú	Parameterr×   )r$   s   "r   r%   r%   #  s    € ÷ ñ œ7×,Ñ,ð ´ñ r   c                 ó„   € V P                   \        P                  P                  \        P                  P                  39   # r|   )rv   r.   r,  ÚPOSITIONAL_OR_KEYWORDÚKEYWORD_ONLY)r+  s   &r   Úsupported_paramr0  #  s6   € Ø�:‰:Ü×Ñ×/Ñ/Ü×Ñ×&Ñ&ðñ ð r   c                óH   € V ^8„  d   QhR\         R\        P                  RR/# )r   rK   rI   r    N)r   r"   r#   )r$   s   "r   r%   r%   *  s(   € ÷ =9ñ =9Üð=9Ü"(§/¡/ð=9à	ñ=9r   c                 ó„  a aaa	€ \         P                  ! V4      o	\        ;QJ d4    R  S	P                  P	                  4        4       F  '       d   K   RM)	  RM%! R  S	P                  P	                  4        4       4      '       g   \        RS	 24      h\        ;QJ d4    R S	P                  P	                  4        4       F  '       g   K   RM)	  RM%! R S	P                  P	                  4        4       4      '       g)   S	P                  \         P                  P                  Jd   \        RS	 24      hS	P                  P                  4        UUu. uF3  w  r#VP                  \         P                  P                  8X  g   K0  W#3NK5  	  pppS	P                  P                  4        UUu. uF3  w  r#VP                  \         P                  P                  8X  g   K0  W#3NK5  	  pppV V	3R loV V	3R loVV3R lpV! VS P                  P                   4       V! VS P                  P"                  4       R	# u uppi u uppi )
c              3   ó8   "  € T F  p\        V4      x € K  	  R # 5ir|   )r0  ©rÑ   Úps   & r   rÓ   Ú3validate_function_matches_schema.<locals>.<genexpr>/  s   é € ÐCÑ+B aŒ˜q×!Ð!Ó+Bùs   ‚FTz¥custom_op(..., manual_schema)(func): positional-only args, varargs, and kwargs are not supported. Please rewrite `func` to not have them. Got `func` with signature: c              3   ól   "  € T F*  qP                   \        P                  P                  Jx € K,  	  R # 5ir|   )rÏ   r.   r,  Úemptyr4  s   & r   rÓ   r6  7  s'   é € ð 
ÙAX¸A�L‰L¤× 1Ñ 1× 7Ñ 7Õ7ÓAXùs   ‚24z¢custom_op(..., manual_schema)(func): When passing in a manual schema, we expect `func` to have no type annotations to avoid ambiguity. Got `func` with signature: c                  ó&   <€ \        R S RS  24      h)z­custom_op(..., manual_schema)(func): When passing in a manual schema, we expect `func`'s signature to match `manual_schema` (aside from type annotations). func's signature: ú, manual_schema: ©r0   ©rK   Úsigs   €€r   rÌ   Ú/validate_function_matches_schema.<locals>.errorM  ó)   ø€ Üð!ð "% Ð%6°v°hð@ó
ð 	
r   c                  ó&   <€ \        R S RS  24      h)zycustom_op(..., manual_schema)(func): neither func nor manual_schema should have default arguments. Got func's signature: r:  r;  r<  s   €€r   Úerror_default_argsÚ<validate_function_matches_schema.<locals>.error_default_argsU  r?  r   c                 ó"  <€ \        V 4      \        V4      8w  d   S! 4        \        W4       F^  w  w  r#pW$P                  8w  d   S! 4        VP                  \        P
                  P                  Jg   VP                  f   KW  S! 4        K`  	  R # r|   )rÝ   Úzipr<   Údefaultr.   r,  r8  )Úsig_argsÚschema_argsr<   r+  ÚargrÌ   rA  s   &&   €€r   ÚcompareÚ1validate_function_matches_schema.<locals>.compare]  se   ø€ Üˆx‹=œC Ó,Ô,ÙŒGÜ"% hÖ"<Ñ‰MˆT˜3Ø—x‘xÔÙ”Ø�}‰}¤G×$5Ñ$5×$;Ñ$;Ó;¸s¿{¹{Ô?VÙ"Ö$ó	 #=r   N)r.   Ú	signatureÚallÚ
parametersrà   r0   rÞ   Úreturn_annotationÚ	Signaturer8  Úitemsrv   r,  r.  r/  r   Úflat_positionalÚflat_kwarg_only)
rK   rI   r<   r+  Ú
positionalÚ	kwargonlyrI  rÌ   rA  r=  s
   f&     @@@r   r7   r7   *  sÒ  û€ ô ×
Ò
˜DÓ
!€Cç‹3ÑC¨3¯>©>×+@Ñ+@Ô+BÓC�3�3Š3ÑC¨3¯>©>×+@Ñ+@Ô+BÓC×CÒCÜð<à<?¸5ðBó
ð 	
÷ 	‹ñ 
ØADÇÁ×AVÑAVÔAXó
��Šñ 
ØADÇÁ×AVÑAVÔAXó
÷ 	
ò 	
ð × Ñ ¬×(9Ñ(9×(?Ñ(?Ó?äð5à58°Eð;ó
ð 	
ð Ÿ>™>×/Ñ/Ô1ôá1‰KˆDØ�:‰:œ×*Ñ*×@Ñ@Ñ@ô 	ˆ‹Ù1ð ñ ð Ÿ>™>×/Ñ/Ô1ôá1‰KˆDØ�:‰:œ×*Ñ*×7Ñ7Ñ7ô 	ˆ‹Ù1ð ñ ö
ö
ö%ñ ˆJ˜×(Ñ(×8Ñ8Ô9ÙˆI�v×'Ñ'×7Ñ7Ö8ùóKùó
s   Å-H6ÆH6Æ)-H<ÇH<c                óH   € V ^8„  d   QhR\         P                  R\        RR/# )r   rS   r¨   r    N)r"   ÚAnyr!   )r$   s   "r   r%   r%   j  s%   € ÷ ñ ¤V§Z¡Zð ´cð ¸dñ r   c           
      óÔ   € VR 8X  d   \        V  R24      hVR8X  d   \        V  R24      hVR
9   d(   VP                  4       p\        V  RV RV RV R24      h\        V  RV R	24      h)Ú	Undefineda  : There were no Tensor inputs to this operator (e.g. you passed an empty list of Tensors). If your operator is a factory function (that is, it takes no Tensors and constructs a new one), then please use CustomOp.impl_factory to register an implementation for itrÂ   zÀ: when running with device='Meta' tensors: there is no abstract impl registered for this CustomOp. Please register one via CustomOp.impl_abstract to get this CustomOp to work with Meta tensorsz: when running with device='z' tensors: there is no zW impl registered for this CustomOp. Please register one via CustomOp.impl(device_type='z')z%: No implementation for dispatch key zŸ. It is likely that we have not added this functionality yet, please either open an issue or if you're feeling adventurous, use the low-level torch.library API)r   r   )ÚNotImplementedErrorÚlower)rS   r¨   Údevices   && r   rH   rH   j  sº   € Ø
ˆkÔÜ!Øˆkð 'ð (ó
ð 	
ð ˆf„}Ü!Øˆkð Tð Uó
ð 	
ð
 ˆoÔØ—‘“ˆÜ!ØˆkÐ5°f°XÐ=TØˆhð *Ø*0¨°ð5ó
ð 	
ô
 Øˆ+Ð:¸3¸%ð @ð 	óð r   c           	      óN  € V P                   p\        P                  P                  VR 4      pV P	                  4       P                  R4      R,          p\        V P                  4      pVP                  R^R7      R,          p\        P                  ! V4      p\        W!WSV RR7      # )r*   rV   )ÚmaxsplitTr+   éÿÿÿÿ)Ú	namespacerC   r8   r9   r<   r%  r!   rZ   Úrsplitr   r5   r   )ÚoprJ   rN   r<   rL   rK   s   &     r   Úcustom_op_from_existingrb  ˆ  s‚   € Ø	�‰€BÜ
�-‰-×
Ñ
  JÓ
/€CØ�7‰7‹9�?‰?˜4Ó  Õ$€DÜ�R—Z‘Z“€Jà×"Ñ" 4°!Ð"Ó4°RÕ8€JÜ×!Ò! *Ó-€FÜ�C˜V¨2¸tÔDÐDr   c                 ó<  a € V 3R  lp\        S 4      w  r#\        \        P                  V4      '       g   V! 4        \	        \        P                  V4      p\        WC4      '       g   V! 4        \	        WC4      p\        VR4      '       g   V! 4        VP
                  # )c                  ó"   <€ \        R S  R24      h)zCould not find the operator z~. Please make sure you have already registered the operator and (if registered from C++) loaded it via torch.ops.load_library.r;  )r   s   €r   Úerror_not_foundÚget_op.<locals>.error_not_found”  s!   ø€ ÜØ*¨8¨*ð 54ð 5ó
ð 	
r   rE  )r2   r†   rC   r…   r„   rE  )r   re  rJ   r<   rˆ   Úpackets   f     r   rö   rö   “  su   ø€ õ
ô ˜hÓ'�H€BÜ”5—9‘9˜b×!Ò!ÙÔÜœ%Ÿ)™) RÓ(€KÜ�;×%Ò%ÙÔÜ�[Ó'€FÜ�6˜9×%Ò%ÙÔØ�>‰>Ðr   c                 ó�   € V \         9   d   \         V ,          # V'       g   \        R V  R24      h\        V 4      p\        V4      pV# )zCould not find custom op "z5". Did you register it via the torch._custom_ops API?)ra   rY   rö   rb  )r   Úalso_check_torch_libraryÚoverloadrP   s   &&  r   Ú_find_custom_oprk  §  sQ   € Ø”?Ô"Ü˜xÕ(Ð(ß#ÜØ(¨¨
ð 3)ð *ó
ð 	
ô �hÓ€HÜ$ XÓ.€FØ€Mr   c                 ó"  € V \         P                  P                  P                  9  d   R # \         P                  P                  P                  V ,          pVf   R # VP	                  R4      '       g   R # VP                  R4      P                  # )Nr·   )rC   Ú
_custom_opr?   ra   rn   r   rI   )r   rS   s   & r   Úget_abstract_implrn  ´  so   € Ø”u×'Ñ'×,Ñ,×<Ñ<Ô<ÙÜ× Ñ ×%Ñ%×5Ñ5°hÕ?€IØÒÙØ×Ñ˜z×*Ò*ÙØ×Ñ˜zÓ*×/Ñ/Ð/r   c           	      ó>  € V P                  R 4      w  r4V V 2p\        P                  ! V4      p\        V4       V'       d&   \        P
                  P                  P                  .M. p\        P                  ! VR4      pVP                  WWR7       \        W6P                  4      p	\        WƒWdV	RR7      p
V
P                  4        \        P
                  P                  V	\         P"                  ! \$        \&        P(                  ! V
4      4      4       \+        V 4      # )rV   r*   )ÚtagsTr+   )r%  r   r5   r6   rC   rD   ÚTagÚneeds_fixed_stride_orderr8   r9   r:   r;   r<   r   rj   rE   rF   rG   rH   rA   rB   rö   )r   rK   rr  rJ   r<   rL   rM   rp  rN   rO   rP   s   &&&        r   Ú_custom_op_with_schemars  ¿  sÙ   € Ø�~‰~˜dÓ#�H€BØ�6˜&˜Ð"€JÜ$×*Ò*¨:Ó6€OÜ�OÔ$ß6NŒE�H‰H�L‰L×1Ñ1Ñ2ÐTV€DÜ
�/Š/˜"˜jÓ
)€CØ‡J�Jˆz€JÔ%Ü% b×*>Ñ*>Ó?€HÜ�c˜°hÐPTÔU€FØ
×0Ñ0Ô2ä	‡H�H×0Ñ0Ø”)×#Ò#Ô$9¼7¿=º=ÈÓ;PÓQôô �(ÓÐr   c                óZ   € V ^8„  d   Qh/ ^ \         9   d   \        \        R3,          ;R&   # )r   r   ra   )Ú__conditional_annotations__Údictr!   )r$   s   "r   r%   r%      s%   € × Ñ ÷x ,Ò +””c˜:�oÕ&Ñ +òy r   )rS   r   r   >   ÚatÚatenÚprimÚprimsrC   Úpytorchr|   )F)T)1ru  ÚdataclassesrF   r.   rq   r"   r   rA   rC   Útorch._CrD   Útorch._library.infer_schemaÚtorch.libraryr8   r   r   Útorchgen.modelr   r   r   r   r	   r
   rô   r   r   Ú__all__r�   r  r   rS   ra   r   Ú	dataclassru   r;   r3   r6   r2   r¤   r0  r7   rH   rb  rö   rk  rn  rs  r%   )ru  s   @r   Ú<module>rƒ     së   øðç Ð Û Û Û 
Û Û Û ã Ý Û "Ý Ý 4Ý !÷÷ ÷ Mðò
 /€ð 
ˆ5Ø
ˆFð Ð ò€ò÷7ð@ *,€Ó +÷Yñ Yðx
 ×Ñ÷ð ó ðõ
õ

õ
õ"õ"
õõ=9õ@ò<Eòô(
ò0ör   