+
    &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   "h/Users/jameslopez/projects/CWCArchive/cwc-podcast/.venv/lib/python3.14/site-packages/torch/xpu/random.py__annotate__r   
   s'     ) )#)ell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%	FC	 	 eV,
,,C
{		44S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 S3Y-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<    ll; "C!II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     XX''))!e6M6MNI * &#f%	FC	 	 eV,/ / rN *)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# )zSet 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.    !II88=%%d+r   T)r@   Nr   r   r@   r1   s   f r   rF   rF   K   s$     t9D, ,
 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# )zSet 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$     t9D0 0
 rD!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+    !II88= r   Nr   r1   s    r   r@   r@   s   s    !
 rNr   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# )zSet 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    
; rNr   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4S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   