+
    –°³jk&  ã                   óø   € ^ RI t ^ RIt^ RIHt ^ RIHt ^ RIt. ROt]'       d   ^ RIH	t	 ^ RI
H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s] P(                  RR R ll4       tR R ltR# )é    N©Ú	Generator)ÚTYPE_CHECKING)Ú
WorkerInfo)Údefault_generatorc                ó<   € V ^8„  d   QhR\         P                  RR/# )é   Ú	new_stateÚreturnN©ÚtorchÚTensor)Úformats   "ÚM/home/luca/screen-checking/.venv/lib/python3.14/site-packages/torch/random.pyÚ__annotate__r      s   € ÷ 	+ñ 	+œUŸ\™\ð 	+¨dñ 	+ó    c                ó2   € \         P                  ! V 4       R# )zçSets the random number generator state.

.. note:: This function only works for CPU. For CUDA, please use
    :func:`torch.manual_seed`, which works for both CPU and CUDA.

Args:
    new_state (torch.ByteTensor): The desired state
N)r   Ú	set_state)r
   s   &r   Úset_rng_stater      s   € ô ×Ò 	Ö*r   c                ó8   € V ^8„  d   QhR\         P                  /# ©r	   r   r   )r   s   "r   r   r   '   s   € ÷ )ñ )”u—|‘|ñ )r   c                 ó,   € \         P                  ! 4       # )zµReturns the random number generator state as a `torch.ByteTensor`.

.. note:: The returned state is for the default generator on CPU only.

See also: :func:`torch.random.fork_rng`.
)r   Ú	get_state© r   r   Úget_rng_stater   '   s   € ô ×&Ò&Ó(Ð(r   c                óL   € V ^8„  d   QhR\         P                  P                  /# r   ©r   Ú_Cr   )r   s   "r   r   r   1   s   € ÷ 
#ñ 
#œŸ™×+Ñ+ñ 
#r   c                ó   € \        V 4      # )aƒ  Sets the seed for generating random numbers on all devices. Returns a
`torch.Generator` object.

Args:
    seed (int): The desired seed. Value must be within the inclusive range
        `[-0x8000_0000_0000_0000, 0xffff_ffff_ffff_ffff]`. Otherwise, a RuntimeError
        is raised. Negative inputs are remapped to positive values with the formula
        `0xffff_ffff_ffff_ffff + seed`.
)Ú_manual_seed_impl)Úseeds   &r   Úmanual_seedr"   1   s   € ô ˜TÓ"Ð"r   c                óL   € V ^8„  d   QhR\         P                  P                  /# r   r   )r   s   "r   r   r   >   s   € ÷ /ñ /œuŸx™x×1Ñ1ñ /r   c                 óR  € \        V 4      p ^ RIpVP                  P                  4       '       g   VP                  P	                  V 4       ^ RIpVP                  P                  4       '       g   VP                  P                  V 4       ^ RIpVP                  P                  4       '       g   VP                  P	                  V 4       ^ RI
pVP                  P                  4       '       g   VP                  P	                  V 4       \        V 4       \        P                  ! V 4      # )r   N)ÚintÚ
torch.cudaÚcudaÚ_is_in_bad_forkÚmanual_seed_allÚ	torch.mpsÚmpsr"   Ú	torch.xpuÚxpuÚ
torch.mtiaÚmtiaÚ_seed_custom_devicer   ©r!   r   s   & r   r    r    >   sÄ   € Üˆt‹9€DÛà�:‰:×%Ñ%×'Ò'Ø�
‰
×"Ñ" 4Ô(ãà�9‰9×$Ñ$×&Ò&Ø�	‰	×Ñ˜dÔ#ãà�9‰9×$Ñ$×&Ò&Ø�	‰	×!Ñ! $Ô'ãà�:‰:×%Ñ%×'Ò'Ø�
‰
×"Ñ" 4Ô(ä˜Ôä×(Ò(¨Ó.Ð.r   c                ó$   € V ^8„  d   QhR\         /# r   ©r%   )r   s   "r   r   r   Y   s   € ÷ ñ Œcñ r   c                 ó>  € \         P                  ! 4       p ^ RIpVP                  P	                  4       '       g   VP                  P                  V 4       ^ RIpVP                  P	                  4       '       g   VP                  P                  V 4       ^ RI	pVP                  P	                  4       '       g   VP                  P                  V 4       ^ RIpVP                  P	                  4       '       g   VP                  P                  V 4       \        V 4       V # )z�Sets the seed for generating random numbers to a non-deterministic
random number on all devices. Returns a 64 bit number used to seed the RNG.
N)r   r!   r&   r'   r(   r)   r*   r+   r"   r,   r-   r.   r/   r0   r1   s     r   r!   r!   Y   s¿   € ô ×!Ò!Ó#€DÛà�:‰:×%Ñ%×'Ò'Ø�
‰
×"Ñ" 4Ô(ãà�9‰9×$Ñ$×&Ò&Ø�	‰	×Ñ˜dÔ#ãà�9‰9×$Ñ$×&Ò&Ø�	‰	×!Ñ! $Ô'ãà�:‰:×%Ñ%×'Ò'Ø�
‰
×"Ñ" 4Ô(ä˜Ôà€Kr   c                ó   € V ^8„  d   QhRR/# ©r	   r   Nr   )r   s   "r   r   r   w   s   € ÷ >ñ > ñ >r   c                ó¶  € \        V 4      p \        P                  P                  4       p\	        \        V4      '       dš   \        \        V4      pRpRp\	        W#4      '       d=   \	        W$4      '       d,   \        W#4      ! 4       '       g   \        W$4      ! V 4       R
# R
# RV R2pVRV RV RV R2,          p\        P                  ! V\        ^R	7       R
# R
# )z�Sets the seed to generate random numbers for custom device.

Args:
    seed (int): The desired seed.

See [Note: support the custom device with privateuse1]
r(   r)   zSet seed for `z0` device does not take effect, please add API's Ú`z` and `z` to `z` device module.©Ú
stacklevelN)	r%   r   r   Ú_get_privateuse1_backend_nameÚhasattrÚgetattrÚwarningsÚwarnÚUserWarning)r!   Úcustom_backend_nameÚcustom_device_modÚ_bad_fork_nameÚ_seed_all_nameÚmessages   &     r   r0   r0   w   sÒ   € ô ˆt‹9€DÜŸ(™(×@Ñ@ÓBÐÜŒuÐ)×*Ò*Ü#¤EÐ+>Ó?ÐØ*ˆØ*ˆÜÐ$×5Ò5¼'Ø÷;
ò ;
ô Ð,Ô=×?Ò?ÜÐ)Ô:¸4Ö@ñ @ð 'Ð':Ð&;Ð;kÐlˆGØ˜˜>Ð*¨'°.Ð1AÀÐH[ÐG\Ð\lÐmÕmˆGÜ�MŠM˜'¤;¸1×=ñ +r   c                ó$   € V ^8„  d   QhR\         /# r   r3   )r   s   "r   r   r   �   s   € ÷ ,ñ ,”cñ ,r   c                 ó,   € \         P                  ! 4       # )z’Returns the initial seed for generating random numbers as a
Python `long`.

.. note:: The returned seed is for the default generator on CPU only.
)r   Úinitial_seedr   r   r   rH   rH   �   s   € ô ×)Ò)Ó+Ð+r   Fc                ó$   € V ^8„  d   QhR\         /# r   r   )r   s   "r   r   r   �   s   € ÷ R?ñ R?ô ñR?r   c              #  ó@  "  € VR8X  d   Rx € R# \         P                  P                  4       pT;'       g    Ve   VP                  MRp\         P                  ! V4      pVf   \        RV R2R,           4      hV'       g   Rx € R# V fÍ   VP                  4       pV^8”  d¡   \        '       g•   VP                  4        RV RV R	VP                  4        R
VP                  4        RVP                  4        RVP                  4        RV RV RVP                  4        RV RV R2p\        P                  ! V^R7       Rs\        \        V4      4      p M\        V 4      p \         P                  ! 4       p	V  U
u. uF  q¦P                  V
4      NK  	  pp
 Rx € \         P                  ! V	4       \        W4       F  w  r¬VP                  WÊ4       K  	  R# u up
i   \         P                  ! T	4       \        Y4       F  w  r¬TP                  YÊ4       K  	  i ; i5i)aè  
Forks the RNG, so that when you return, the RNG is reset
to the state that it was previously in.

Args:
    devices (iterable of Device IDs): devices for which to fork
        the RNG. CPU RNG state is always forked. By default, :meth:`fork_rng` operates
        on all devices, but will emit a warning if your machine has a lot
        of devices, since this function will run very slowly in that case.
        If you explicitly specify devices, this warning will be suppressed
    enabled (bool): if ``False``, the RNG is not forked.  This is a convenience
        argument for easily disabling the context manager without having
        to delete it and unindent your Python code under it.
    device_type (str): device type str, default is ``None``, in which case the type
        is taken from :func:`torch.accelerator.current_accelerator`, falling back
        to ``"cuda"`` when the type cannot be determined. As for supported devices,
        see details in :ref:`accelerator<accelerators>`
ÚmetaNr'   ztorch has no module of `z`, you should register z,a module by `torch._register_device_module`.z reports that you have z& available devices, and you have used z_ without explicitly specifying which devices are being used. For safety, we initialize *every* zA device by default, which can be quite slow if you have a lot of z5s. If you know that you are only making use of a few z' devices, set the environment variable z_VISIBLE_DEVICES or the 'z' keyword argument of z° with the set of devices you are actually using. For example, if you are using CPU only, set device.upper()_VISIBLE_DEVICES= or devices=[]; if you are using device 0 only, set zb_VISIBLE_DEVICES=0 or devices=[0].  To initialize all devices and suppress this warning, set the 'z#' keyword argument to `range(torch.z.device_count())`.r9   T)r   ÚacceleratorÚcurrent_acceleratorÚtypeÚget_device_moduleÚRuntimeErrorÚdevice_countÚ_fork_rng_warned_alreadyÚupperr>   r?   ÚlistÚranger   r   Úzip)ÚdevicesÚenabledÚ_callerÚ_devices_kwÚdevice_typeÚaccÚ
device_modÚnum_devicesrE   Úcpu_rng_stateÚdeviceÚdevice_rng_statesÚdevice_rng_states   &&&&&        r   Úfork_rngrc   œ   s+  é € ð6 �fÔÛÙä
×
Ñ
×
/Ñ
/Ó
1€Cà×JÐJ¨cªo #§(¢(À6€Kä×(Ò(¨Ó5€JØÒÜØ& { mÐ3JÐKØ<õ=ó
ð 	
÷ ÛÙà‚Ø ×-Ñ-Ó/ˆØ˜Œ?×#;Ó#;à×$Ñ$Ó&Ð'Ð'>¸{¸mð L!Ø!( 	ð *5Ø5@×5FÑ5FÓ5HÐ4Ið J6Ø6A×6GÑ6GÓ6IÐ5Jð K(Ø(3×(9Ñ(9Ó(;Ð'<Ð<cØ×$Ñ$Ó&Ð'Ð'@ÀÀÐMcÐdkÐclð mð #×(Ñ(Ó*Ð+ð ,7Ø7B°mð D Ø +˜}Ð,>ð
@ð ô �MŠM˜'¨aÕ0Ø'+Ð$Ü”u˜[Ó)Ó*‰ô �w“-ˆä×'Ò'Ó)€MÙHOÓPÉ¸f×1Ñ1°&Ö9ÉÐÐPð?Ûä×Ò˜MÔ*Ü(+¨GÖ(GÑ$ˆFØ×$Ñ$Ð%5Ö>ó )Hùò Qøô
 	×Ò˜MÔ*Ü(+¨GÖ(GÑ$ˆFØ×$Ñ$Ð%5Ö>ò )Hüs=   ‚4H·A
HÂ,HÂ/CHÅ<GÆHÆG ÆAHÇ=HÈHc                óF   € V ^8„  d   QhR\         P                  R,          /# r6   )r   r   )r   s   "r   r   r   ò   s   € ÷ !ñ !œuŸ™°Õ5ñ !r   c                 ó’   € ^ RI Hp  V ! 4       pVe6   VP                  R8X  d%   VP                  e   VP                  P                  # R# )a'  Returns a thread-safe random number generator for use in DataLoader workers.
This function provides a convenient way for transforms and user code to use
thread-safe random number generation without manually checking worker context.
When called in a DataLoader thread worker, returns the worker's thread-local
:class:`torch.Generator`. When called in the main process or process workers,
returns ``None`` (which causes PyTorch functions to use the default global RNG).
Returns:
    Optional[torch.Generator]: Thread-local generator in thread workers, None otherwise.
Example::
    >>> from torch.random import thread_safe_generator
    >>> generator = thread_safe_generator()
    >>> torch.randint(0, 10, (5,), generator=generator)
Example with transforms::
    >>> from torch.random import thread_safe_generator
    >>> class MyRandomTransform:
    ...     def __call__(self, img):
    ...         generator = thread_safe_generator()
    ...         offset = torch.randint(0, 10, (2,), generator=generator)
    ...         return img[..., offset[0]:, offset[1]:]
)Úget_worker_infoNÚthread)Útorch.utils.datarf   Úworker_methodÚrngÚtorch_generator)rf   Úworker_infos     r   Úthread_safe_generatorrm   ò   s@   € õ0 1á%4Ó%6€KàÒØ×%Ñ%¨Ô1Ø�O‰OÒ'à�‰×.Ñ.Ð.Ùr   )r   r   r"   r!   rH   rc   rm   )NTrc   rW   N)Ú
contextlibr>   Úcollections.abcr   Útypingr   r   Ú__all__Útorch.utils.data._utils.workerr   Útorch._Cr   r   r   r"   r    r!   r0   rH   rR   Úcontextmanagerrc   rm   r   r   r   Ú<module>ru      ss   ðã Û Ý %Ý  ã ò€÷ Ý9å &õ	+õ)õ
#õ/õ6õ<>õ2,ð !Ð ð ×ÑöR?ó ðR?÷j!r   