ó
    Eñi£  ã                   óB  • S SK r S SKJs  Jr   S rS rS rS rS r	S\ R                  S\S	\S
\\   S\4
S jrS\\ R                     S\S	\S
\\   S\4
S jrS\ R                  S\\   S-  S\\   S-  S	\S
\\   S\4S jrS\ R                  S\ R                  4S jrg)é    Nc                 ó„   • [         R                  " X25      n[        R                  R                  R                  U UU5      $ ©N)Úc10dÚ$_resolve_group_name_by_ranks_and_tagÚtorchÚopsÚ_c10d_functionalÚ	broadcast)ÚinputÚsrcÚtagÚranksÚ
group_sizeÚ
group_names         Úk/home/mande/repo/quber/.venv/lib/python3.13/site-packages/torch/distributed/_functional_collectives_impl.pyÚ
_broadcastr      s8   € Ü×:Ò:¸5ÓF€JÜ�9‰9×%Ñ%×/Ñ/ØØØóð ó    c                 ó„   • [         R                  " X25      n[        R                  R                  R                  U UU5      $ r   )r   r   r   r   r	   Ú
all_reduce©r   Ú	reduce_opr   r   r   r   s         r   Ú_all_reducer      s8   € Ü×:Ò:¸5ÓF€JÜ�9‰9×%Ñ%×0Ñ0ØØØóð r   c                 ó„   • [         R                  " X25      n[        R                  R                  R                  U UU5      $ r   )r   r   r   r   r	   Úall_reduce_coalesced©Úinputsr   r   r   r   r   s         r   Ú_all_reduce_coalescedr      s8   € Ü×:Ò:¸5ÓF€JÜ�9‰9×%Ñ%×:Ñ:ØØØóð r   c                 ó„   • [         R                  " X!5      n[        R                  R                  R                  U UU5      $ r   )r   r   r   r   r	   Úall_gather_into_tensor©r   r   r   r   r   s        r   Ú_all_gather_into_tensorr!   (   s8   € Ü×:Ò:¸5ÓF€JÜ�9‰9×%Ñ%×<Ñ<ØØØóð r   c                 ó„   • [         R                  " X!5      n[        R                  R                  R                  U UU5      $ r   )r   r   r   r   r	   Ú all_gather_into_tensor_coalescedr    s        r   Ú!_all_gather_into_tensor_coalescedr$   1   s8   € Ü×:Ò:¸5ÓF€JÜ�9‰9×%Ñ%×FÑFØØØóð r   r   r   r   r   r   c                 ó†   • [         R                  " X25      n[        R                  R                  R                  U UUU5      $ r   )r   r   r   r   r	   Úreduce_scatter_tensorr   s         r   Ú_reduce_scatter_tensorr'   :   s=   € ô ×:Ò:¸5ÓF€JÜ�9‰9×%Ñ%×;Ñ;ØØØØó	ð r   r   c                 ó†   • [         R                  " X25      n[        R                  R                  R                  U UUU5      $ r   )r   r   r   r   r	   Úreduce_scatter_tensor_coalescedr   s         r   Ú _reduce_scatter_tensor_coalescedr*   J   s=   € ô ×:Ò:¸5ÓF€JÜ�9‰9×%Ñ%×EÑEØØØØó	ð r   Úoutput_split_sizesÚinput_split_sizesc                 óä   • Ub  Uc)  Uc  Ub  [        S5      eU R                  S   U-  /U-  nUn[        R                  " XC5      n[        R
                  R                  R                  U UUU5      $ )Nz^output_split_sizes and input_split_sizes must either be specified together or both set to Noner   )ÚAssertionErrorÚshaper   r   r   r   r	   Úall_to_all_single)r   r+   r,   r   r   r   r   s          r   Ú_all_to_all_singler1   Z   sŠ   € ð Ñ!Ð%6Ñ%>Ø"Ñ*Ð/@Ñ/HÜ ð9óð ð $Ÿk™k¨!™n°
Ñ:Ð;¸jÑHÐØ.Ðä×:Ò:¸5ÓF€JÜ�9‰9×%Ñ%×7Ñ7ØØØØó	ð r   ÚtensorÚreturnc                 óT   • [         R                  R                  R                  U 5      $ r   )r   r   r	   Úwait_tensor)r2   s    r   Ú_wait_tensorr6   t   s   € Ü�9‰9×%Ñ%×1Ñ1°&Ó9Ð9r   )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ð	ð
 ôð Ø�<‰<ðà˜S™	 DÑ(ðð ˜C‘y 4Ñ'ðð 
ð	ð
 �‰9ðð ôð4:˜Ÿ™ð :¨%¯,©,õ :r   