+
    –°³jÏ7  ã            
       óò  € ^ RI t ^ RIt^ RIHt ^ RIHtHt ^ RIHtH	t	H
t
Ht ^ RIt^ RIHt ^ RIHt ^ RIHt . tR R ltR	 R
 ltR R lt]! R]]]4      t]! R]P6                  ]4      t]
R R l4       t]
R R l4       tR tR/R R lltR R ltR R lt ]! R4      t!]! R]]]]"]]]4      t#]
R R l4       t$]
R R l4       t$R  t$R! R" lt%R0R# R$ llt&R/R% R& llt'R' R( lt(R) R* lt)R+ R, lt*R- R. lt+R# )1é    N)ÚOrderedDict)ÚCallableÚ	Container)ÚAnyÚOptionalÚoverloadÚTypeVar)Únn)ÚPackedSequencec          
      ó’   € V ^8„  d   QhR\         R\         R\        \        \         R3,          \        \        R3,          3,          /# )é   ÚargsÚkwargsÚreturn.)r   ÚtupleÚstr)Úformats   "ÚX/home/luca/screen-checking/.venv/lib/python3.14/site-packages/torch/distributed/utils.pyÚ__annotate__r      s<   € ÷ /ñ /œð /¤sð /¬u´U¼3À¸8µ_ÄeÌCÐQTÈHÅoÐ5UÕ/Vñ /ó    c                 ó¾   € . p\        V 4      pVP                  4        F'  w  rEVP                  V4       VP                  V4       K)  	  \        V4      \        V4      3# )aJ  
Turn argument list into separate key list and value list (unpack_kwargs does the opposite).

Inspiration: https://github.com/facebookresearch/fairscale/blob/eeb6684/fairscale/internal/containers.py#L70
Usage::

    kwarg_keys, flat_args = pack_kwargs(1, 2, a=3, b=4)
    assert kwarg_keys == ("a", "b")
    assert flat_args == (1, 2, 3, 4)
    args, kwargs = unpack_kwargs(kwarg_keys, flat_args)
    assert args == (1, 2)
    assert kwargs == {"a": 3, "b": 4}
Returns:
    Tuple[Tuple[Any, ...], Tuple[str, ...]]: The first tuple element gives
    gives both positional args and kwarg values, where the positional args
    proceed kwarg values and kwarg values are ordered consistently with the
    kwarg keys. The second tuple element gives the kwarg keys.
    The second tuple element's length is at most the first tuple element's length.
)ÚlistÚitemsÚappendr   )r   r   Ú
kwarg_keysÚ	flat_argsÚkÚvs   *,    r   Ú_pack_kwargsr      sW   € ð( €JÜ ›:€IØ—‘–‰ˆØ×Ñ˜!ÔØ×Ñ˜Öñ ô �ÓœU :Ó.Ð.Ð.r   c          
      óŒ   € V ^8„  d   QhR\         P                  R,          R\        R\        R\        \        \        3,          /# )r   ÚdtypeNr   r   r   )Útorchr!   r   r   )r   s   "r   r   r   .   sG   € ÷ Rñ RÜ�;‰;˜ÕðRäðRô ðRô Œ3”ˆ8…_ñ	Rr   c                óP   a € S f   W3# R V 3R llp\        W14      \        W24      3# )zŠ
Cast floating point tensors in ``args`` and ``kwargs`` to ``input_dtype``.

This respects the existing ``requires_grad`` on the tensors.
c                óX   € V ^8„  d   QhR\         P                  R\         P                  /# )r   Úxr   ©r"   ÚTensor)r   s   "r   r   Ú*_cast_forward_inputs.<locals>.__annotate__;   s"   € ÷ ñ ”5—<‘<ð ¤E§L¡Lñ r   c                 ó„   <€ \         P                  ! V 4      '       d   V P                  S8X  d   V # V P                  S4      # ©N)r"   Úis_floating_pointr!   Úto)r%   r!   s   &€r   Úcast_fnÚ%_cast_forward_inputs.<locals>.cast_fn;   s2   ø€ Ü×&Ò& q×)Ò)¨Q¯W©W¸Ô-=ØˆHà�t‰t�E‹{Ðr   )Ú_apply_to_tensors)r!   r   r   r-   s   f*, r   Ú_cast_forward_inputsr0   .   s4   ø€ ð ‚}Øˆ|Ð÷ð ô ˜gÓ,Ô.?ÀÓ.PÐQÐQr   c          
      óÎ   € V ^8„  d   QhR\         \        R3,          R\         \        R3,          R\         \         \        R3,          \        \        \        3,          3,          /# )r   r   .r   r   )r   r   r   Údict)r   s   "r   r   r   D   sN   € ÷ 
ñ 
Ü”S˜#�X�ð
Ü,1´#°s°(­Oð
ä
Œ5”�c��?œD¤¤c �NÐ*Õ+ñ
r   c           	     ó  € \        V4      \        V 4      8”  d$   \        R\        V4       R\        V 4       24      h\        V4      ^ 8X  d   V / 3# V R\        V4      )  p\        \        W\        V4      ) R 4      4      pW#3# )zSee _pack_kwargs.ztoo many keys z vs. N)ÚlenÚAssertionErrorr2   Úzip)r   r   r   r   s   &&  r   Ú_unpack_kwargsr7   D   s†   € ô ˆ:ƒœ˜Y›Ô'Ü˜~¬c°*«oÐ->¸eÄCÈ	ÃNÐCSÐTÓUÐUÜ
ˆ:ƒ˜!ÔØ˜"ˆ}ÐØÐ'œ˜J›Ð'Ð(€DÜ”#�j¬S°«_Ð,<Ð,>Ð"?Ó@ÓA€FØˆ<Ðr   ÚSÚTc          	      ór   € V ^8„  d   QhR\         R\        P                  R\        R\        \         ,          /# ©r   ÚinputsÚtarget_deviceÚ!use_side_stream_for_tensor_copiesr   )r8   r"   ÚdeviceÚboolr   )r   s   "r   r   r   V   s4   € ÷ ñ ÜðÜ#Ÿl™lðÜOSðä	Œ!…Wñr   c                 ó   € R # r*   © ©r<   r=   r>   s   &&&r   Ú_recursive_torD   U   s   € ñ r   c          	      ór   € V ^8„  d   QhR\         R\        P                  R\        R\        \         ,          /# r;   )r9   r"   r?   r@   r   )r   s   "r   r   r   \   s4   € ÷ ñ ÜðÜ#Ÿl™lðÜOSðä
Œ1…Xñr   c                 ó   € R # r*   rB   rC   s   &&&r   rD   rD   [   s   € ñ r   c                ó@   aaa€ VVV3R lo S! V 4      pRoV#   Roi ; i)z-Recursively moves input to the target_device.c                 óœ  <a a€ \        S \        P                  \        34      '       EdŒ   \        S \        4      '       d   S P                  P
                  MS P
                  pVS	8X  d   S 3# S'       g   S P                  S	4      3# VP                  R 8X  d   S P                  S	4      3# ^ RIH	p V! S	4      pV;_uu_ 4        S P                  S	4      pRRR4       \        P                  P                  S	P                  4      ;_uu_ 4        \        P                  P                  4       pVP                  V4       \        S \        4      '       d   XP                  P                  V4       M<\        X\        P                  4      '       g   \!        R4      hVP                  V4       RRR4       V3# ^ RIHp V
3R lpV! S 4      '       d   V! S S V 3R l4      # \        S \&        4      '       d   \)        S 4      ^ 8”  d   V! S S \&        4      # \        S \*        4      '       d   \)        S 4      ^ 8”  d   V! S S \*        4      # \        S \,        4      '       dG   \)        S 4      ^ 8”  d7   \+        S P/                  4       4      oV! S S P1                  4       VV 3R l4      # S .#   + '       g   i     ELÚ; i  + '       g   i     X3# ; i)Úcpu)Ú_get_streamNzoutput must be a torch.Tensor©Ú_is_namedtuplec                óÐ  <€ \        \        SV4      4      p\        ;QJ d    R V 4       F  '       d   K   RM	  RM! R V 4       4      '       dp   V Uu. uF  qD^ ,          NK  	  pp\        ;QJ d%    R \        WQ4       4       F  '       d   K   RM	  RM! R \        WQ4       4       4      '       d   V .# V! V4      .# \        V!   Uu. uF
  qb! V4      NK  	  up# u upi u upi )z9Handle container types with object identity preservation.c              3   ó>   "  € T F  p\        V4      ^8H  x € K  	  R# 5i)é   N)r4   )Ú.0Úms   & r   Ú	<genexpr>ÚK_recursive_to.<locals>.to_map.<locals>._handle_container.<locals>.<genexpr>�   s   é € Ð/© 1”3�q“6˜Q–;«ùs   ‚FTc              3   ó,   "  € T F
  w  rWJ x € K  	  R # 5ir*   rB   )rP   ÚtÚos   &  r   rR   rS   �   s   é € ÐEÑ*D¡$ !�q•vÓ*Dùs   ‚)r   ÚmapÚallr6   )ÚobjÚelementsÚmake_containerÚmappedrQ   Útransformedr   Úto_maps   &&&    €r   Ú_handle_containerÚ8_recursive_to.<locals>.to_map.<locals>._handle_containerˆ   s¸   ø€ ô œ#˜f hÓ/Ó0ˆFç‹sÑ/©Ó/�s�sŠsÑ/©Ó/×/Ò/Ù-3Ó4©V¨ Ÿt˜t©V�Ð4ß“3ÑE¬#¨kÔ*DÓE—3—3’3ÑE¬#¨kÔ*DÓE×EÒEØ˜5�Lá& {Ó3Ð4Ð4ä58¸&²\ÓB±\¨T�N 4Ö(±\ÑBÐBùò 5ùò Cs   ÁCÃC#c                 ó"   <€ \        S4      ! V !  # r*   )Útype)r%   rY   s   &€r   Ú<lambda>Ú/_recursive_to.<locals>.to_map.<locals>.<lambda>—   s   ø€ ¼¸c¼ÀAºr   c                 ó:   <€ \        S4      ! \        SV 4      4      # r*   )rb   r6   )r   ÚkeysrY   s   &€€r   rc   rd   Ÿ   s   ø€ ¬T°#¬Y´s¸4À³|Ô-Dr   )Ú
isinstancer"   r'   r   Údatar?   r,   rb   Útorch.nn.parallel._functionsrJ   ÚacceleratorÚdevice_indexÚindexÚcurrent_streamÚwait_streamÚrecord_streamr5   Ú torch.nn.parallel.scatter_gatherrL   r   r4   r   r2   rf   Úvalues)rY   r?   rJ   ÚstreamÚoutputrm   rL   r_   rf   r=   r^   r>   s   f       @€€€r   r^   Ú_recursive_to.<locals>.to_mapd   s  ú€ Ü�cœEŸL™L¬.Ð9×:Ó:Ü(2°3¼×(GÒ(G�S—X‘X—_’_ÈSÏZÉZˆFØ˜Ô&Ø�v�ß4ØŸ™˜}Ó-Ð/Ð/ð —;‘; %Ô'ØŸF™F =Ó1Ð3Ð3åDñ % ]Ó3�ß’VØ ŸV™V MÓ2�F÷ ô ×&Ñ&×3Ñ3°M×4GÑ4G×HÕHÜ%*×%6Ñ%6×%EÑ%EÓ%G�Nà"×.Ñ.¨vÔ6ô " #¤~×6Ò6ØŸ™×1Ñ1°.ÕAä)¨&´%·,±,×?Ò?Ü"0Ð1PÓ"QÐQØ×,Ñ,¨^Ô<÷ Ið �yÐ åCõ	Cñ ˜#×ÒÙ$ S¨#Ô/FÓGÐGÜ�cœ5×!Ò!¤c¨#£h°¤lÙ$ S¨#¬uÓ5Ð5Ü�cœ4× Ò ¤S¨£X°¤\Ù$ S¨#¬tÓ4Ð4Ü�cœ4× Ò ¤S¨£X°¤\Ü˜Ÿ™›
Ó#ˆDÙ$Ø�S—Z‘Z“\Õ#Dóð ð ˆuˆ÷Y —V�Vú÷ IÖHð �yÐ ús   ÃJ%ÄBJ9Ê%J6	Ê9K	NrB   )r<   r=   r>   Úresr^   s   &ff @r   rD   rD   a   s*   ú€ ÷=ð@Ù�V‹nˆàˆØ€Jøð ‰ús   � ™c                ó@   € V ^8„  d   QhR\         R\        R\        RR/# )r   ÚcondÚsÚraise_assertion_errorr   N)r   r   r@   )r   s   "r   r   r   «   s(   € ÷ $ñ $”Cð $œCð $¼ð $Èñ $r   c                ó€   € V '       g6   \        V4       \        P                  ! 4        V'       d   \        V4      hR# R# )zwAlternate to ``assert`` when in the backward context to print the error message ``s`` since otherwise, it is swallowed.N)ÚprintÚ	tracebackÚprint_stackr5   )rw   rx   ry   s   &&&r   Ú	_p_assertr~   «   s0   € çÜˆaŒÜ×ÒÔß Ü  Ó#Ð#ñ !ñ r   c                ó\   € V ^8„  d   QhR\         P                  R\         P                  RR/# )r   ÚtensorÚsizer   N)r"   r'   ÚSize)r   s   "r   r   r   ´   s)   € ÷ ?ñ ?œ5Ÿ<™<ð ?¬u¯z©zð ?¸dñ ?r   c                óø  € \         P                  ! 4       ;_uu_ 4        \         P                  P                  P	                  4       '       g’   V P                  4       P                  4       VP                  4       8H  pV'       g[   V P                  4       P                  4       p\        V^ 8H  R4       V P                  4       P                  VP                  4       4       RRR4       R#   + '       g   i     R# ; i)z¬
Allocate storage for ``tensor`` with the given size.

Returns:
    bool: ``True`` if this method allocated storage and ``False`` if the
    storage was already allocated.
zCTensor storage should have been resized to be 0 but got PLACEHOLDERN)
r"   Úno_gradÚdistributedÚ_functional_collectivesÚis_torchdynamo_compilingÚ_typed_storageÚ_sizeÚnumelr~   Ú_resize_)r€   r�   Úalready_allocatedÚtensor_storage_sizes   &&  r   Ú_alloc_storagerŽ   ´   s¦   € ô 
�Š��Ü× Ñ ×8Ñ8×QÑQ×SÒSØ &× 5Ñ 5Ó 7× =Ñ =Ó ?À4Ç:Á:Ã<Ñ OÐß$Ø&,×&;Ñ&;Ó&=×&CÑ&CÓ&EÐ#ÜØ'¨1Ñ,ØYôð ×%Ñ%Ó'×0Ñ0°·±³Ô>÷ 
��Šús   žA%C(ÂAC(Ã(C9	c                ó8   € V ^8„  d   QhR\         P                  /# )r   r€   r&   )r   s   "r   r   r   È   s   € ÷ 4ñ 4œ%Ÿ,™,ñ 4r   c                ó  € \         P                  ! 4       ;_uu_ 4        \         P                  P                  P	                  4       '       g£   V P                  4       P                  4       ^ 8H  pV'       gz   \        V P                  4       ^ 8H  RV P                  4        RV P                  4       P                  4        RV P                   24       V P                  4       P                  ^ 4       RRR4       R#   + '       g   i     R# ; i)zž
Frees the underlying storage of ``tensor``.

Returns:
    bool: ``True`` if the method freed the storage and ``False`` if the
    storage was already freed.
zVFreeing a tensor's storage is unsafe when it is not the sole occupant
storage offset: z
storage size: z
tensor shape: N)r"   r„   r…   r†   r‡   rˆ   r‰   r~   Ústorage_offsetÚshaper‹   )r€   Úalready_freeds   & r   Ú_free_storager”   È   sÍ   € ô 
�Š��Ü× Ñ ×8Ñ8×QÑQ×SÒSØ"×1Ñ1Ó3×9Ñ9Ó;¸qÑ@ˆMß ÜØ×)Ñ)Ó+¨qÑ0ð'Ø'-×'<Ñ'<Ó'>Ð&?ð @%Ø%+×%:Ñ%:Ó%<×%BÑ%BÓ%DÐ$Eð F%Ø%+§\¡\ Nð4ôð ×%Ñ%Ó'×0Ñ0°Ô3÷ 
��Šús   žAC9Á6A9C9Ã9D
	ÚQÚRc                óˆ   € V ^8„  d   QhR\         \        P                  .\        3,          R\        P                  R\        /# ©r   ÚfnÚ	containerr   )r   r"   r'   r•   )r   s   "r   r   r   ã   s8   € ÷ ñ Ü”%—,‘,�¤Ð"Õ#ðÜ05·±ðäñr   c                 ó   € R # r*   rB   ©r™   rš   s   &&r   r/   r/   â   s   € ñ 	r   c                ót   € V ^8„  d   QhR\         \        P                  .\        3,          R\        R\        /# r˜   )r   r"   r'   r   r–   )r   s   "r   r   r   é   s'   € × PÑ Pœ(¤E§L¡L >´3Ð#6Õ7Ð PÄAÐ PÌ!Ñ Pr   c                 ó   € R # r*   rB   rœ   s   &&r   r/   r/   è   s   € ÙMPr   c                ó$   a a€ VV 3R loS! V4      # )zFRecursively apply to all tensor in different kinds of container types.c           
      ó¾  <€ ^ RI Hp \        V \        P                  4      '       d	   S
! V 4      # \        V R4      '       dv   \        P                  ! V 4      p\        P                  ! V4       Uu/ uF(  q3P                  S	! \        W#P                  4      4      bK*  	  pp\        P                  ! V3/ VB # \        V \        4      '       d6   V P                  4       pV P                  4        F  w  rgS	! V4      WV&   K  	  V# \        V \        4      '       d   S	! V P                  4       V # \        V \         4      '       d,   V P                  4        UUu/ uF  w  rgVS	! V4      bK  	  upp# V! V 4      '       d   V	3R lV  4       p\#        V 4      ! V!  # \        V \$        \&        \(        34      '       d   \#        V 4      ! V	3R lV  4       4      # V # u upi u uppi )r   rK   Ú__dataclass_fields__c              3   ó4   <"  € T F  pS! V4      x € K  	  R # 5ir*   rB   ©rP   ÚelÚapplys   & €r   rR   Ú3_apply_to_tensors.<locals>.apply.<locals>.<genexpr>  s   øé € Ð)¡q ‘5˜—9�9£qùó   ƒc              3   ó4   <"  € T F  pS! V4      x € K  	  R # 5ir*   rB   r£   s   & €r   rR   r¦     s   øé € Ð1©q¨™5 Ÿ9˜9«qùr§   )rp   rL   rg   r"   r'   ÚhasattrÚdataclassesÚreplaceÚfieldsÚnameÚgetattrr   Ú	__class__r   r   rh   r2   rb   r   r   Úset)r%   rL   ÚdcÚfÚchangesÚodÚkeyÚvalueru   r¥   r™   s   &        €€r   r¥   Ú _apply_to_tensors.<locals>.applyï   sy  ø€ ÝCä�aœŸ™×&Ò&Ù�a“5ˆLÜ�QÐ.×/Ò/Ü×$Ò$ QÓ'ˆBä<G×<NÒ<NÈrÔ<RóÙ<R°q—‘™œg b¯&©&Ó1Ó2Ò2Ñ<Rð ð ô ×&Ò& rÑ5¨WÑ5Ð5Ü˜œ;×'Ò'Ø—‘“ˆBØŸg™gži‘
�Ù ›,�“ñ (àˆIÜ˜œ>×*Ò*Ù�!—&‘&ŒMØˆHÜ˜œ4× Ò Ø89¿¹¼	ÔB¹	©*¨#�C™˜u›Ò%¹	ÒBÐBÙ˜A×ÒÜ)¡qÓ)ˆCÜ˜”7˜C‘=Ð Ü˜œD¤%¬Ð-×.Ò.Ü˜”7Ô1©qÓ1Ó1Ð1àˆHùò)ùó Cs   Á0.GÅGrB   )r™   rš   r¥   s   f&@r   r/   r/   ì   s   ù€ öñ: �ÓÐr   c                ó*  € V ^8„  d   QhR\         \        R3,          R\        \        \        3,          R,          R\        P
                  R\        R\         \         \        R3,          \         \        \        \        3,          R3,          3,          /# )r   r<   .r   Nr=   r>   r   )r   r   r2   r   r"   r?   r@   )r   s   "r   r   r     sw   € ÷ 4ñ 4Ü”#�s�(�Oð4ä””c��N˜TÕ!ð4ô —<‘<ð4ô (,ð	4ô
 Œ5”�c��?œE¤$¤s¬C x¥.°#Ð"5Õ6Ð6Õ7ñ4r   c                 ó  € V '       d   \        WV4      M. pV'       d   \        WV4      M. p\        V4      \        V4      8  dE   TP                  \        \        V4      \        V 4      ,
          4       Uu. uF  pRNK  	  up4       M\\        V4      \        V4      8  dD   TP                  \        \        V4      \        V4      ,
          4       Uu. uF  p/ NK  	  up4       \	        V4      \	        V4      3# u upi u upi )NrB   )rD   r4   ÚextendÚranger   )r<   r   r=   r>   Úmoved_inputsÚmoved_kwargsÚ_s   &&&&   r   Ú
_to_kwargsr¿     sß   € ÷ ô 	�fÐ-NÔOàð ÷ ô 	�fÐ-NÔOàð ô
 ˆ<Óœ3˜|Ó,Ô,Ø×Ñ¬¬s°<Ó/@Ä3ÀvÃ;Õ/NÔ)OÓPÑ)O A›RÑ)OÑPÕQÜ	ˆ\Ó	œS Ó.Ô	.Ø×Ñ¬¬s°<Ó/@Ä3À|ÓCTÕ/TÔ)UÓVÑ)U A›RÑ)UÑVÔWÜ�Ó¤ lÓ 3Ð3Ð3ùò QùâVs   Á7C<ÃDc                óˆ   € V ^8„  d   QhR\         P                  R\        \        P                  ,          R\
        R,          /# )r   Úprocess_groupÚtensorsÚloggerzdist.Logger)ÚdistÚProcessGroupr   r"   r'   r   )r   s   "r   r   r   &  s?   € ÷ Pñ PÜ×$Ñ$ðPä”%—,‘,ÕðPô �]Õ#ñPr   c                 ó0   € \         P                  ! WV4      # r*   )rÄ   Ú_verify_params_across_processes)rÁ   rÂ   rÃ   s   &&&r   Ú$_verify_param_shape_across_processesrÈ   &  s   € ô
 ×/Ò/°ÈÓOÐOr   c                ó¢   € V ^8„  d   QhR\         P                  R\        P                  R\        R\        R\
        \        ,          R\        RR/# )	r   ÚmodulerÁ   Úbroadcast_bucket_sizeÚsrcÚparams_and_buffers_to_ignoreÚbroadcast_buffersr   N)r
   ÚModulerÄ   rÅ   Úintr   r   r@   )r   s   "r   r   r   .  se   € ÷ Wñ WÜ�I‰IðWä×$Ñ$ðWô ðWô 
ð	Wô
 #,¬C¥.ðWô ðWð 
ñWr   c                ó2  € . pV P                  4        F,  w  rxWt9  g   K  VP                  VP                  4       4       K.  	  V'       dA   V P                  4        F,  w  ryWt9  g   K  VP                  V	P                  4       4       K.  	  \	        WW#4       R# )aO  
Sync ``module``'s parameters and buffers state.

Syncs ``module``'s parameters and buffers state so that all ranks contain
the same module state across all ranks. Note that this API assumes that all
parameter shapes are consistent before running the synchronization. This can
be checked with ``_verify_param_shape_across_processes``.
N)Únamed_parametersr   ÚdetachÚnamed_buffersÚ_sync_params_and_buffers)
rÊ   rÁ   rË   rÌ   rÍ   rÎ   Úmodule_statesr­   ÚparamÚbuffers
   &&&&&&    r   Ú_sync_module_statesrÙ   .  sy   € ð  )+€MØ×.Ñ.Ö0‰ˆØÖ3Ø× Ñ  §¡£Ö0ñ 1÷ Ø"×0Ñ0Ö2‰LˆDØÖ7Ø×$Ñ$ V§]¡]£_Ö5ñ 3ô ˜]Ð;PÖVr   c          
      óŠ   € V ^8„  d   QhR\         P                  R\        \        P                  ,          R\
        R\
        RR/# )r   rÁ   rÖ   rË   rÌ   r   N)rÄ   rÅ   r   r"   r'   rÐ   )r   s   "r   r   r   K  sI   € ÷ 

ñ 

Ü×$Ñ$ð

äœŸ™Õ%ð

ô ð

ô 
ð	

ð
 
ñ

r   c                óX   € \        V4      ^ 8”  d   \        P                  ! WW#4       R# R# )zfSynchronize ``module_states`` (list of tensors) across all processes by broadcasting them from rank 0.N)r4   rÄ   Ú_broadcast_coalesced)rÁ   rÖ   rË   rÌ   s   &&&&r   rÕ   rÕ   K  s*   € ô ˆ=Ó˜AÔÜ×!Ò!ØÐ*?ö	
ñ r   c                ób   € V ^8„  d   QhR\         \        \        3,          R\        R\        RR/# )r   Ú
state_dictÚ
old_prefixÚ
new_prefixr   N)r2   r   r   )r   s   "r   r   r   X  s8   € ÷ ñ Ü”Sœ#�X•ðäðô ðð 
ñ	r   c                óÚ   € W8X  d   \        R4      h\        V P                  4       4       F<  pVP                  V4      '       g   K  W#\	        V4      R ,           pW,          W&   W K>  	  R# )a  
Replace all keys that match a given old_prefix with a new_prefix (in-place).

Usage::

    state_dict = {"layer.xyz": torch.tensor(1)}
    replace_by_prefix_(state_dict, "layer.", "module.layer.")
    assert state_dict == {"module.layer.xyz": torch.tensor(1)}
z*old_prefix and new_prefix must be distinctN)Ú
ValueErrorr   rf   Ú
startswithr4   )rÞ   rß   rà   rµ   Únew_keys   &&&  r   Ú_replace_by_prefixrå   X  sa   € ð ÔÜÐEÓFÐFÜ�J—O‘OÓ%Ö&ˆØ�~‰~˜j×)Ò)ÙØ¤3 z£?Ð#4Ð5Õ5ˆØ(�oˆ
ÑØŠOó 'r   c                óD   € V ^8„  d   QhR\         P                  R\        /# )r   r€   r   )r"   r'   r@   )r   s   "r   r   r   p  s   € ÷ 3ñ 3¤§¡ð 3´ñ 3r   c                 óD   € V P                  4       P                  4       ^ 8„  # )r   )Úuntyped_storageÚdata_ptr)r€   s   &r   Ú_data_ptr_allocatedrê   p  s   € Ø×!Ñ!Ó#×,Ñ,Ó.°Ñ2Ð2r   c                ó„   € V ^8„  d   QhR\         \        P                  ,          R\         \        P                  ,          /# )r   Úmodulesr   )r   r
   rÏ   )r   s   "r   r   r   t  s*   € ÷ ñ œt¤B§I¡I�ð ´4¼¿	¹	µ?ñ r   c                ó  € . pV  Uu/ uF  q"\        VP                  4       4      bK  	  ppV  FT  pRpVP                  4        F   w  r&WBJ;'       d    WF9   pV'       g   K  Rp M	  V'       g   KC  VP                  V4       KV  	  V# u upi )zâ
Returns the modules in ``modules`` that are root modules (i.e.
parent-less) with respect to the set ``modules``. In other words, these
are the modules in ``modules`` that are the not child of any other
module in ``modules``.
TF)r°   rì   r   r   )rì   Úroot_modulesrÊ   Úmodule_to_modulesÚcandidate_moduleÚis_root_moduleÚ_modulesÚis_child_modules   &       r   Ú_get_root_modulesrô   t  s¥   € ð %'€Lá4;ó:Ù4;¨&”�F—N‘NÓ$Ó%Ò%±Gð ð :ó $ÐØˆØ 1× 7Ñ 7Ö 9ÑˆFà Ð.×OÐOÐ3CÑ3Oð ÷ ‰Ø!&�Ùñ !:÷ ‰>Ø×ÑÐ 0Ö1ñ $ð Ðùò:s   ‡"B)Tr*   ),rª   r|   Úcollectionsr   Úcollections.abcr   r   Útypingr   r   r   r	   r"   Útorch.distributedr…   rÄ   r
   Útorch.nn.utils.rnnr   Ú__all__r   r0   r7   r2   r   r   r8   r'   r9   rD   r~   rŽ   r”   r•   r°   r–   r/   r¿   rÈ   rÙ   rÕ   rå   rê   rô   rB   r   r   Ú<module>rû      s  ðã Û Ý #ß /ß 3Ó 3ã Ý  Ý Ý -ð €õ/õ:Rõ,
ñ ˆC��t˜UÓ#€ÙˆC�—‘˜~Ó.€ð 
ôó 
ðð
 
ôó 
ðò
G÷T$õ?õ(4ñ, ˆCƒL€ÙˆC��t˜U C¨°nÀcÓJ€ð 
ôó 
ðð
 
Ü Pó 
Ø Pò õF4÷.P÷Wõ:

õõ03÷r   