+
    ˜°³j¢  ã                   ó¾   € ^ RI Ht ^ RIt^ RIHt ^RIHtHtHtHtH	t	 RR R llt
R R 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 R ltR R lt. ROtR# )é    )ÚIterableN)ÚTensor)Ú
_lazy_callÚ
_lazy_initÚcurrent_deviceÚdevice_countÚis_initializedc                óp   € V ^8„  d   QhR\         \        ,          \        P                  ,          R\        /# )é   ÚdeviceÚreturn)ÚintÚstrÚtorchr   r   )Úformats   "ÚQ/home/luca/screen-checking/.venv/lib/python3.14/site-packages/torch/xpu/random.pyÚ__annotate__r   
   s'   € ÷ )ñ )œ#¤�)¤e§l¡lÕ2ð )¼vñ )ó    c                ó`  € \        4        \        V \        4      '       d   \        P                  ! V 4      p M-\        V \
        4      '       d   \        P                  ! RV 4      p V P                  pVf   \        4       p\        P                  P                  V,          pVP                  4       # )a6  Return the random number generator state of the specified GPU as a ByteTensor.

Args:
    device (torch.device or int, optional): The device to return the RNG state of.
        Default: ``'xpu'`` (i.e., ``torch.device('xpu')``, the current XPU device).

.. warning::
    This function eagerly initializes XPU.
Úxpu)r   Ú
isinstancer   r   r   r   Úindexr   r   Údefault_generatorsÚ	get_state)r   ÚidxÚdefault_generators   &  r   Úget_rng_stater   
   s{   € ô „LÜ�&œ#×ÒÜ—’˜fÓ%‰Ü	�FœC×	 Ò	 Ü—’˜e VÓ,ˆØ
�,‰,€CØ
‚{ÜÓˆÜŸ	™	×4Ñ4°SÕ9ÐØ×&Ñ&Ó(Ð(r   c                ó:   € V ^8„  d   QhR\         \        ,          /# ©r   r   )Úlistr   )r   s   "r   r   r       s   € ÷ ñ œ4¤�<ñ r   c                 óf   € \        \        4       4       U u. uF  p \        V 4      NK  	  pp V# u up i )zQReturn a list of ByteTensor representing the random number states of all devices.)Úranger   r   )ÚiÚresultss     r   Úget_rng_state_allr%       s/   € ä).¬|«~Ô)>Ó?Ñ)> AŒ}˜QÖÑ)>€GÐ?Ø€Nùò @s   –.c                ót   € V ^8„  d   QhR\         R\        \        ,          \        P                  ,          RR/# )r   Ú	new_stater   r   N)r   r   r   r   r   )r   s   "r   r   r   &   s/   € ÷ ñ œVð ¬S´3­Y¼¿¹Õ-Eð ÐRVñ r   c                óÌ  a a€ \        4       '       gP   \        P                  P                  4       ;_uu_ 4        S P	                  \        P
                  R7      o RRR4       \        S\        4      '       d   \        P                  ! S4      oM-\        S\        4      '       d   \        P                  ! RS4      oR VV 3R llp\        V4       R#   + '       g   i     L�; i)a  Set the random number generator state of the specified GPU.

Args:
    new_state (torch.ByteTensor): The desired state
    device (torch.device or int, optional): The device to set the RNG state.
        Default: ``'xpu'`` (i.e., ``torch.device('xpu')``, the current XPU device).
)Úmemory_formatNr   c                ó   € V ^8„  d   QhRR/# ©r   r   N© )r   s   "r   r   Ú#set_rng_state.<locals>.__annotate__7   s   € ÷ /ñ /�ñ /r   c                  ó    <€ SP                   p V f   \        4       p \        P                  P                  V ,          pVP                  S4       R # ©N)r   r   r   r   r   Ú	set_state)r   r   r   r'   s     €€r   ÚcbÚset_rng_state.<locals>.cb7   s<   ø€ Ø�l‰lˆØŠ;Ü Ó"ˆCÜ!ŸI™I×8Ñ8¸Õ=ÐØ×#Ñ# IÖ.r   )r	   r   Ú_CÚ_DisableFuncTorchÚcloneÚcontiguous_formatr   r   r   r   r   )r'   r   r1   s   ff r   Úset_rng_stater7   &   s’   ù€ ô ×ÒÜ�X‰X×'Ñ'×)Õ)Ø!Ÿ™´e×6MÑ6M˜ÓNˆI÷ *ô �&œ#×ÒÜ—’˜fÓ%‰Ü	�FœC×	 Ò	 Ü—’˜e VÓ,ˆ÷/ñ /ô ˆr†N÷ *×)ús   ¹!CÃC#	c                ó>   € V ^8„  d   QhR\         \        ,          RR/# )r   Ú
new_statesr   N)r   r   )r   s   "r   r   r   A   s   € ÷  ñ  ¤(¬6Õ"2ð  °tñ  r   c                óD   € \        V 4       F  w  r\        W!4       K  	  R# )z�Set the random number generator state of all devices.

Args:
    new_states (Iterable of torch.ByteTensor): The desired state for each device.
N)Ú	enumerater7   )r9   r#   Ústates   &  r   Úset_rng_state_allr=   A   s   € ô ˜jÖ)‰ˆÜ�eÖó *r   c                ó(   € V ^8„  d   QhR\         RR/# ©r   Úseedr   N©r   )r   s   "r   r   r   K   s   € ÷ ñ ”cð ˜dñ r   c                óJ   a € \        S 4      o R V 3R llp\        VRR7       R# )al  Set the seed for generating random numbers for the current GPU.

It's safe to call this function if XPU is not available; in that case, it is silently ignored.

Args:
    seed (int): The desired seed.

.. warning::
    If you are working with a multi-GPU model, this function is insufficient
    to get determinism.  To seed all GPUs, use :func:`manual_seed_all`.
c                ó   € V ^8„  d   QhRR/# r+   r,   )r   s   "r   r   Ú!manual_seed.<locals>.__annotate__Y   s   € ÷ ,ñ ,�ñ ,r   c                  ó€   <€ \        4       p \        P                  P                  V ,          pVP	                  S4       R # r/   )r   r   r   r   Úmanual_seed)r   r   r@   s     €r   r1   Úmanual_seed.<locals>.cbY   s.   ø€ ÜÓˆÜ!ŸI™I×8Ñ8¸Õ=ÐØ×%Ñ% dÖ+r   T)r@   N©r   r   ©r@   r1   s   f r   rF   rF   K   s$   ø€ ô ˆt‹9€D÷,ð ,ô
 ˆr˜×r   c                ó(   € V ^8„  d   QhR\         RR/# r?   rA   )r   s   "r   r   r   a   s   € ÷ "ñ "œ#ð " $ñ "r   c                óJ   a € \        S 4      o R V 3R llp\        VRR7       R# )zÁSet the seed for generating random numbers on all GPUs.

It's safe to call this function if XPU is not available; in that case, it is silently ignored.

Args:
    seed (int): The desired seed.
c                ó   € V ^8„  d   QhRR/# r+   r,   )r   s   "r   r   Ú%manual_seed_all.<locals>.__annotate__k   s   € ÷ 0ñ 0�ñ 0r   c                  ó    <€ \        \        4       4       F5  p \        P                  P                  V ,          pVP                  S4       K7  	  R # r/   )r"   r   r   r   r   rF   )r#   r   r@   s     €r   r1   Úmanual_seed_all.<locals>.cbk   s7   ø€ Ü”|“~Ö&ˆAÜ %§	¡	× <Ñ <¸QÕ ?ÐØ×)Ñ)¨$Ö/ó 'r   T)Úseed_allNrH   rI   s   f r   Úmanual_seed_allrQ   a   s$   ø€ ô ˆt‹9€D÷0ð 0ô
 ˆr˜D×!r   c                ó   € V ^8„  d   QhRR/# r+   r,   )r   s   "r   r   r   s   s   € ÷ ñ ˆdñ r   c                 ó(   € R R lp \        V 4       R# )a[  Set the seed for generating random numbers to a random number for the current GPU.

It's safe to call this function if XPU is not available; in that case, it is silently ignored.

.. warning::
    If you are working with a multi-GPU model, this function will only initialize
    the seed on one GPU.  To initialize all GPUs, use :func:`seed_all`.
c                ó   € V ^8„  d   QhRR/# r+   r,   )r   s   "r   r   Úseed.<locals>.__annotate__}   s   € ÷ !ñ !�ñ !r   c                  ó|   € \        4       p \        P                  P                  V ,          pVP	                  4        R # r/   )r   r   r   r   r@   ©r   r   s     r   r1   Úseed.<locals>.cb}   s+   € ÜÓˆÜ!ŸI™I×8Ñ8¸Õ=ÐØ×ÑÖ r   N©r   ©r1   s    r   r@   r@   s   s   € õ!ô
 ˆr†Nr   c                ó   € V ^8„  d   QhRR/# r+   r,   )r   s   "r   r   r   …   s   € ÷ ñ �$ñ r   c                 ó(   € R R lp \        V 4       R# )z«Set the seed for generating random numbers to a random number on all GPUs.

It's safe to call this function if XPU is not available; in that case, it is silently ignored.
c                ó   € V ^8„  d   QhRR/# r+   r,   )r   s   "r   r   Úseed_all.<locals>.__annotate__‹   s   € ÷ 
;ñ 
;�ñ 
;r   c                  óþ   € ^ p Rp\        \        4       4       Fa  p\        P                  P                  V,          pV'       g%   VP                  4        VP                  4       p RpKP  VP                  V 4       Kc  	  R# )r   FTN)r"   r   r   r   r   r@   Úinitial_seedrF   )Úrandom_seedÚseededr#   r   s       r   r1   Úseed_all.<locals>.cb‹   sb   € ØˆØˆÜ”|“~Ö&ˆAÜ %§	¡	× <Ñ <¸QÕ ?ÐßØ!×&Ñ&Ô(Ø/×<Ñ<Ó>�Ø’à!×-Ñ-¨kÖ:ó 'r   NrY   rZ   s    r   rP   rP   …   s   € õ
;ô ˆr†Nr   c                ó$   € V ^8„  d   QhR\         /# r   rA   )r   s   "r   r   r   š   s   € ÷ 	,ñ 	,”cñ 	,r   c                 óŒ   € \        4        \        4       p \        P                  P                  V ,          pVP                  4       # )zlReturn the current random seed of the current GPU.

.. warning::
    This function eagerly initializes XPU.
)r   r   r   r   r   r`   rW   s     r   r`   r`   š   s5   € ô „LÜ
Ó
€CÜŸ	™	×4Ñ4°SÕ9ÐØ×)Ñ)Ó+Ð+r   )r   )	r   r%   r7   r=   rF   rQ   r@   rP   r`   )Úcollections.abcr   r   r   Ú r   r   r   r   r	   r   r%   r7   r=   rF   rQ   r@   rP   r`   Ú__all__r,   r   r   Ú<module>ri      sH   ðå $ã Ý ç RÕ R÷)õ,÷õ6 õõ,"õ$õ$õ*	,ò
‚r   