+
    –°³jÁ  ã                   ó"   € ^ RI t  ! R R4      tR# )é    Nc                   óŽ   a € ] tR t^t o RtV 3R lR lt]R 4       tV 3R lR ltV 3R lR lt	V 3R	 lR
 lt
R tR tR tRtV tR# )Ú_remote_devicea  
Represents a device on a remote worker.

Args:
    remote_device (str or torch.device): Represents a device on a remote worker.
        The string format should be one of the following:

            1. "<workername>/<device>", where the device field can be parsed as torch.device type.
               E.g., "trainer0/cpu", "trainer0", "ps0/cuda:0".
               In addition, the device field can be optional and the default value is "cpu".
            2. "rank:<rank>/<device>", where <rank> is the rank of the
               process and device can be parsed as torch.device type.
               E.g., "rank:0/cpu", "rank:0", "rank:0/cuda:0"
            3. <workername> and <rank> are optional and formats like "cpu"
                and "cuda:1", just represent local devices.
c                óD   <€ V ^8„  d   QhRS[ S[P                  ,          /# )é   Úremote_device)ÚstrÚtorchÚdevice)ÚformatÚ__classdict__s   "€Ú`/home/luca/screen-checking/.venv/lib/python3.14/site-packages/torch/distributed/remote_device.pyÚ__annotate__Ú_remote_device.__annotate__   s   ø€ ÷ -.ñ -.¡c©E¯L©LÕ&8ñ -.ó    c                ó  € R V R2pRV n         RV n        RV n        \        V\        P
                  4      '       d   Wn        MÀ\        V\        4      '       d”   VP                  R4      p\        V4      ^8X  d   Vw  V n         V n        My\        V4      ^8X  dH   \        P                  V^ ,          4      '       d   V^ ,          V n        M8V^ ,          V n         RV n        M"\        V4      h\        R\        V4       24      hV P                   e   V P                   '       g   \        V4      h\        P
                  ! V P                  4      V n        V P                   eŸ   V P                   P                  R4      p\        V4      ^8X  dW   V^ ,          R8X  d>   V^,          P                  4       '       d!   \        V^,          4      V n        RV n         R# \        V4      h\        V4      ^8”  d   \        V4      hR# R# )zCould not parse remote_device: zU. The valid format is '<workername>/<device>' or 'rank:<rank>/<device>' or '<device>'NÚ/Úcpuz Invalid type for remote_device: Ú:Úrank)Ú_worker_nameÚ_rankÚ_deviceÚ
isinstancer	   r
   r   ÚsplitÚlenr   Ú_is_valid_local_deviceÚ
ValueErrorÚ	TypeErrorÚtypeÚisdigitÚint)Úselfr   ÚPARSE_ERRORÚfieldss   &&  r   Ú__init__Ú_remote_device.__init__   s­  € à-¨m¨_ð =Nð Nð 	ð !ˆÔØˆŒ
Ø8<ˆŒä�m¤U§\¡\×2Ò2Ø(�LÜ˜¤s×+Ò+Ø"×(Ñ(¨Ó-ˆFÜ�6‹{˜aÔØ28Ñ/�Ô! 4¥<Ü�V“ Ô!ä!×8Ñ8¸À½×CÒCØ#)¨!¥9�D•Là(.¨q­	�DÔ%Ø#(�D•Lä  Ó-Ð-äÐ>¼tÀMÓ?RÐ>SÐTÓUÐUð ×ÑÒ(°×1B×1BÐ1BÜ˜[Ó)Ð)ô —|’| D§L¡LÓ1ˆŒð ×ÑÒ(Ø×&Ñ&×,Ñ,¨SÓ1ˆFÜ�6‹{˜aÔà˜!•9 Ô&¨6°!­9×+<Ñ+<×+>Ò+>Ü!$ V¨A¥Y£�D”JØ(,�DÖ%ä$ [Ó1Ð1Ü�V“˜q”Ü  Ó-Ð-ñ !ñ )r   c                óX   €  \         P                  ! V 4       R #   \         d     R# i ; i)TF)r	   r
   Ú	Exception)r
   s   &r   r   Ú%_remote_device._is_valid_local_deviceG   s(   € ð	Ü�LŠL˜Ô ÙøÜô 	Úð	ús   ‚ š)¨)c                ó.   <€ V ^8„  d   QhRS[ R,          /# ©r   ÚreturnN)r   )r   r   s   "€r   r   r   P   s   ø€ ÷ !ñ !™S 4�Zñ !r   c                ó   € V P                   # )zlReturn the name of remote worker representing the remote device and ``None`` if no worker name is available.)r   ©r"   s   &r   Úworker_nameÚ_remote_device.worker_nameP   s   € à× Ñ Ð r   c                ó.   <€ V ^8„  d   QhRS[ R,          /# r+   )r!   )r   r   s   "€r   r   r   T   s   ø€ ÷ ñ ‘c˜D•jñ r   c                ó   € V P                   # )zm
Returns the rank of remote worker representing the remote device.
Returns ``None`` if no rank is available.
)r   r.   s   &r   r   Ú_remote_device.rankT   s   € ð
 �z‰zÐr   c                ó4   <€ V ^8„  d   QhRS[ P                  /# )r   r,   )r	   r
   )r   r   s   "€r   r   r   [   s   ø€ ÷ ñ ™Ÿ™ñ r   c                ó   € V P                   # )z-Return the local device on the remote worker.)r   r.   s   &r   r
   Ú_remote_device.device[   s   € à�|‰|Ðr   c                óp  € V P                   ei   V P                  e   V P                   RV P                    2# V P                  e   RV P                   RV P                    2# \        V P                   4      # V P                  e   V P                   # V P                  e   V P                   # \	        R4      h)Nr   zrank:zInvalid state!)r   r   r   r   ÚRuntimeErrorr.   s   &r   Ú__repr__Ú_remote_device.__repr___   s¥   € Ø�<‰<Ò#Ø× Ñ Ò,Ø×+Ñ+Ð,¨A¨d¯l©l¨^Ð<Ð<Ø—‘Ò'Ø˜tŸz™z˜l¨!¨D¯L©L¨>Ð:Ð:ä˜4Ÿ<™<Ó(Ð(à× Ñ Ò,Ø×+Ñ+Ð,Ð-Ø—‘Ò'ØŸ*™*˜Ð&ä"Ð#3Ó4Ð4r   c                óè   € \        V\        4      ;'       d\    V P                  VP                  8H  ;'       d;    V P                  VP                  8H  ;'       d    V P                  VP                  8H  # ©N)r   r   r   r   r   )r"   Úothers   &&r   Ú__eq__Ú_remote_device.__eq__o   sc   € Ü˜%¤Ó0÷ 
ð 
Ø×Ñ ×!3Ñ!3Ñ3÷ *ð *Ø—‘ §¡Ñ-÷*ð *à—
‘
˜eŸk™kÑ)ð	
r   c                ó”   € \        V P                  4      \        V P                  4      ,          \        V P                  4      ,          # r<   )Úhashr   r   r   r.   s   &r   Ú__hash__Ú_remote_device.__hash__v   s/   € Ü�D×%Ñ%Ó&¬¨d¯l©lÓ);Õ;¼dÀ4Ç:Á:Ó>NÕNÐNr   )r   r   r   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r%   Ústaticmethodr   r/   r   r
   r9   r>   rB   Ú__static_attributes__Ú__classdictcell__)r   s   @r   r   r      s]   ø‡ € ñ÷"-.ð -.ð^ ñó ð÷!ð !÷ð ÷ð ò5ò 
÷Oð Or   r   )r	   r   © r   r   Ú<module>rM      s   ðó ÷qOó qOr   