Ë
    g^(h—  ã                   óF  — d dl mZ d dlZd dlmc mZ 	 d„ Zd„ Zd„ Z	d„ Z
d„ Zdej                  d	ed
edee   def
d„Zdeej                     d	ed
edee   def
d„Zdej                  deee      deee      d
edee   defd„Zdej                  dej                  fd„Zy)é    )ÚOptionalNc                 ó„   — t        j                  ||«      }t        j                  j                  j                  | ||«      S ©N)Úc10dÚ$_resolve_group_name_by_ranks_and_tagÚtorchÚopsÚ_c10d_functionalÚ	broadcast)ÚinputÚsrcÚtagÚranksÚ
group_sizeÚ
group_names         úl/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/torch/distributed/_functional_collectives_impl.pyÚ
_broadcastr      s:   € Ü×:Ñ:¸5À#ÓF€JÜ�9‰9×%Ñ%×/Ñ/ØØØóð ó    c                 ó„   — t        j                  ||«      }t        j                  j                  j                  | ||«      S r   )r   r   r   r	   r
   Ú
all_reduce©r   Ú	reduce_opr   r   r   r   s         r   Ú_all_reducer      s:   € Ü×:Ñ:¸5À#ÓF€JÜ�9‰9×%Ñ%×0Ñ0ØØØóð r   c                 ó„   — t        j                  ||«      }t        j                  j                  j                  | ||«      S r   )r   r   r   r	   r
   Úall_reduce_coalesced©Úinputsr   r   r   r   r   s         r   Ú_all_reduce_coalescedr       s:   € Ü×:Ñ:¸5À#ÓF€JÜ�9‰9×%Ñ%×:Ñ:ØØØóð r   c                 ó„   — t        j                  ||«      }t        j                  j                  j                  | ||«      S r   )r   r   r   r	   r
   Úall_gather_into_tensor©r   r   r   r   r   s        r   Ú_all_gather_into_tensorr"   )   s:   € Ü×:Ñ:¸5À#ÓF€JÜ�9‰9×%Ñ%×<Ñ<ØØØóð r   c                 ó„   — t        j                  ||«      }t        j                  j                  j                  | ||«      S r   )r   r   r   r	   r
   Ú all_gather_into_tensor_coalescedr!   s        r   Ú!_all_gather_into_tensor_coalescedr%   2   s:   € Ü×:Ñ:¸5À#ÓF€JÜ�9‰9×%Ñ%×FÑFØØØóð r   r   r   r   r   r   c                 ó†   — t        j                  ||«      }t        j                  j                  j                  | |||«      S r   )r   r   r   r	   r
   Úreduce_scatter_tensorr   s         r   Ú_reduce_scatter_tensorr(   ;   s?   € ô ×:Ñ:¸5À#ÓF€JÜ�9‰9×%Ñ%×;Ñ;ØØØØó	ð r   r   c                 ó†   — t        j                  ||«      }t        j                  j                  j                  | |||«      S r   )r   r   r   r	   r
   Úreduce_scatter_tensor_coalescedr   s         r   Ú _reduce_scatter_tensor_coalescedr+   K   s?   € ô ×:Ñ:¸5À#ÓF€JÜ�9‰9×%Ñ%×EÑEØØØØó	ð r   Úoutput_split_sizesÚinput_split_sizesc                 óÔ   — |�|€#|€|�J d«       ‚| j                   d   |z  g|z  }|}t        j                  ||«      }t        j                  j
                  j                  | |||«      S )Nz^output_split_sizes and input_split_sizes must either be specified together or both set to Noner   )Úshaper   r   r   r	   r
   Úall_to_all_single)r   r,   r-   r   r   r   r   s          r   Ú_all_to_all_singler1   [   sŒ   € ð Ð!Ð%6Ð%>Ø!Ð)Ð.?Ð.Gð 	
ð5ó	
ÐGð $Ÿk™k¨!™n°
Ñ:Ð;¸jÑHÐØ.Ðä×:Ñ:¸5À#ÓF€JÜ�9‰9×%Ñ%×7Ñ7ØØØØó	ð r   ÚtensorÚreturnc                 óT   — t         j                  j                  j                  | «      S r   )r   r	   r
   Úwait_tensor)r2   s    r   Ú_wait_tensorr6   t   s   € Ü�9‰9×%Ñ%×1Ñ1°&Ó9Ð9r   )Útypingr   r   Ú"torch.distributed.distributed_c10dÚdistributedÚdistributed_c10dr   r   r   r   r"   r%   ÚTensorÚstrÚlistÚintr(   r+   r1   r6   © r   r   ú<module>r@      s  ðå ã ß 1Ð 1ðòòòòòðØ�<‰<ðàðð 
ðð �‰9ð	ð
 óð Ø�—‘Ñðàðð 
ðð �‰9ð	ð
 óð Ø�<‰<ðà   c¡Ñ+ðð    S¡	Ñ*ðð 
ð	ð
 �‰9ðð óð2:˜Ÿ™ð :¨%¯,©,ô :r   