§
    Ÿ²Åj  ã                   óâ  — U d dl Z d dlZd dlZd dlZd dlZd dlZ e j        e¦  «        Zde	fd„Z
 e
¦   «         r$ej                             ¦   «         s ed¦  «        ‚ej        j        Zej        j        Zej        j        Zej        j        Z e
¦   «         r¸d dlmZmZmZmZmZmZmZmZmZm Z m!Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z1  G d„ dej2        ¦  «        Z3i Z4ej5        e6ej7        f         e8d<   dd	e6d
e6fd„Z9ej:        dk    rd dlm;Z; ddl<m=Z=m>Z> ddl?T ddl?m@Z@mAZAmBZBmCZCmDZDmEZEmFZFmGZG ddlHmIZI ddlJmKZKmLZLmJZJ  e-¦   «          dS  G d„ d¦  «        ZMeMejN        d         _*        dS )é    NÚreturnc                  ó6   — t          t          j        d¦  «        S )aŸ  
    Return ``True`` if the distributed package is available.

    Otherwise,
    ``torch.distributed`` does not expose any other APIs. Currently,
    ``torch.distributed`` is available on Linux, MacOS and Windows. Set
    ``USE_DISTRIBUTED=1`` to enable it when building PyTorch from source.
    Currently, the default value is ``USE_DISTRIBUTED=1`` for Linux and Windows,
    ``USE_DISTRIBUTED=0`` for MacOS.
    Ú
_c10d_init)ÚhasattrÚtorchÚ_C© ó    úKC:\Projects\Historical\venv\Lib\site-packages\torch/distributed/__init__.pyÚis_availabler      s   € õ •5”8˜\Ñ*Ô*Ð*r
   z&Failed to initialize torch.distributed)Ú_broadcast_coalescedÚ"_compute_bucket_assignment_by_sizeÚ_ControlCollectivesÚ_DEFAULT_FIRST_BUCKET_BYTESÚ_make_nccl_premul_sumÚ_register_builtin_comm_hookÚ_register_comm_hookÚ_StoreCollectivesÚ_test_python_storeÚ_verify_params_across_processesÚBackendÚBuiltinCommHookTypeÚ
DebugLevelÚ	FileStoreÚget_debug_levelÚ
GradBucketÚLoggerÚPrefixStoreÚProcessGroupÚReducerÚset_debug_levelÚset_debug_level_from_envÚStoreÚTCPStoreÚWorkc                   ó   — e Zd ZdZd„ ZdS )Ú_DistributedPdbz‡
        Supports using PDB from inside a multiprocessing child process.

        Usage:
        _DistributedPdb().set_trace()
        c                 óÀ   — t           j        }	 t          d¦  «        t           _        t          j        j        | g|¢R i |¤Ž |t           _        d S # |t           _        w xY w)Nz
/dev/stdin)ÚsysÚstdinÚopenÚpdbÚPdbÚinteraction)ÚselfÚargsÚkwargsÚ_stdins       r   r.   z_DistributedPdb.interactionJ   s^   € Ý”YˆFð#Ý  Ñ.Ô.•”	Ý”Ô# DÐ:¨4Ð:Ð:Ð:°6Ð:Ð:Ð:à"•”	�	�	ø˜F•”	Ð"Ð"Ð"Ð"s   Ž3A ÁAN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r.   r	   r
   r   r'   r'   B   s-   € € € € € ð	ð 	ð	#ð 	#ð 	#ð 	#ð 	#r
   r'   Ú_breakpoint_cacheÚrankÚskipc                 óæ  — |dk    rxt          t          t          j        ¦   «         ¦  «        ¦  «        }t                               |d¦  «        dz   }|t          |<   ||k    rt                               d|¦  «         dS t          ¦   «         | k    r1t          ¦   «         } |j
        d| › d�¦  «          |j        ¦   «          t          j                             ¦   «         }t          j                             ¦   «         }t          j                             d¦  «         	 t#          ¦   «          t          j                             |¦  «         ~dS # t          j                             |¦  «         ~w xY w)aD  
        Set a breakpoint, but only on a single rank.  All other ranks will wait for you to be
        done with the breakpoint before continuing.

        Args:
            rank (int): Which rank to break on.  Default: ``0``
            skip (int): Skip the first ``skip`` calls to this breakpoint. Default: ``0``.
        r   é   zSkip the breakpoint, counter=%dNzS
!!! ATTENTION !!!

Type 'up' to get to the frame that called dist.breakpoint(rank=z)
F)ÚhashÚstrÚ	tracebackÚ
format_excr7   ÚgetÚlogÚwarningÚget_rankr'   ÚmessageÚ	set_tracer   r   Ú_meta_in_tls_dispatch_includeÚ_DisableTorchDispatchÚ!_set_meta_in_tls_dispatch_includeÚbarrier)r8   r9   ÚkeyÚcounterr,   Úmeta_in_tlsÚguards          r   Ú
breakpointrN   T   sZ  € ð �!Š8ˆ8Ý•s�9Ô/Ñ1Ô1Ñ2Ô2Ñ3Ô3ˆCÝ'×+Ò+¨C°Ñ3Ô3°aÑ7ˆGØ%,Õ˜cÑ"Ø˜$ŠˆÝ—’Ð=¸wÑGÔGÐGØ�å‰:Œ:˜ÒÐÝ!Ñ#Ô#ˆCØˆCŒKð\ØRVð\ð \ð \ñô ð ð ˆCŒM‰OŒOˆOõ ”h×<Ò<Ñ>Ô>ˆÝ”×.Ò.Ñ0Ô0ˆÝŒ×2Ò2°5Ñ9Ô9Ð9ð	Ý‰IŒIˆIåŒH×6Ò6°{ÑCÔCÐCØ��øõ ŒH×6Ò6°{ÑCÔCÐCØˆIˆIˆIˆIs   ÄE Å"E0Úwin32)Ú	HashStorer;   )Ú
DeviceMeshÚinit_device_mesh)Ú*)Ú_all_gather_baseÚ_coalescing_managerÚ_CoalescingManagerÚ_create_process_group_wrapperÚ_get_process_group_nameÚ_rank_not_in_groupÚ_reduce_scatter_baseÚget_node_local_rank)Ú_remote_device)Ú_create_store_from_optionsÚregister_rendezvous_handlerÚ
rendezvousc                   ó   — e Zd ZdS )Ú_ProcessGroupStubN)r3   r4   r5   r	   r
   r   ra   ra   š   s   € € € € € Øˆr
   ra   ztorch.distributed)r   r   )OÚloggingr,   r)   r>   Útypingr   Ú	getLoggerr3   rA   Úboolr   r   r   ÚRuntimeErrorÚ
_DistErrorÚ	DistErrorÚ_DistBackendErrorÚDistBackendErrorÚ_DistNetworkErrorÚDistNetworkErrorÚ_DistStoreErrorÚDistStoreErrorÚtorch._C._distributed_c10dr   r   r   r   r   r   r   r   r   r   r   Ú_Backendr   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   Ú_Workr-   r'   r7   ÚDictÚintÚAnyÚ__annotations__rN   ÚplatformrP   Údevice_meshrQ   rR   Údistributed_c10drT   rU   rV   rW   rX   rY   rZ   r[   Úremote_devicer\   r_   r]   r^   ra   Úmodulesr	   r
   r   ú<module>r{      s®  ðà €€€€Ø 
€
€
€
Ø 
€
€
€
Ø Ð Ð Ð Ø €€€à €€€ð €gÔ˜Ñ!Ô!€ð+�dð +ð +ð +ð +ð €<�>„>ð A˜%œ(×-Ò-Ñ/Ô/ð AØ
ˆ,Ð?Ñ
@Ô
@Ð@ð ŒHÔ€	Ø”8Ô-Ð Ø”8Ô-Ð Ø”Ô)€à€<�>„>ð xFðð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð8#ð #ð #ð #ð #˜#œ'ñ #ô #ð #ð  79Ð�v”{ 3¨¬
 ?Ô3Ð8Ð8Ñ8ð!ð !˜ð !¨ð !ð !ð !ð !ðF „|�wÒÐØ8Ð8Ð8Ð8Ð8Ð8à9Ð9Ð9Ð9Ð9Ð9Ð9Ð9ð
 $Ð#Ð#Ð#ð	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð .Ð-Ð-Ð-Ð-Ð-ðð ð ð ð ð ð ð ð ð ð ÐÑÔÐÐÐðð ð ð ð ñ ô ð ð 5F€C„KÐ#Ô$Ô1Ð1Ð1r
   