U
    9%ek
                     @   sF  d dl Z d dlZd dlmZ d dlZedddZe rJej sJe	d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% ej&dkrd d	lm'Z'm(Z( d
dl)T d
dl)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/ d
dl0m0Z0m1Z1m2Z2 d
dl3m4Z4 e$  nG dd dZ5e5ej6d _dS )    N)Enum)returnc                   C   s   t tjdS )a  
    Returns ``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 r   r   Y/var/www/html/Darija-Ai-API/env/lib/python3.8/site-packages/torch/distributed/__init__.pyis_available   s    	r
   z&Failed to initialize torch.distributed)Store	FileStoreTCPStoreProcessGroupBackendPrefixStoreReducerLoggerBuiltinCommHookType
GradBucketWork_DEFAULT_FIRST_BUCKET_BYTES_register_comm_hook_register_builtin_comm_hook_broadcast_coalesced"_compute_bucket_assignment_by_size_verify_params_across_processes_test_python_store
DebugLevelget_debug_levelset_debug_levelset_debug_level_from_env_make_nccl_premul_sumwin32)	HashStore_round_robin_process_groups   )*)_all_gather_base_reduce_scatter_base_create_process_group_wrapper_rank_not_in_group_coalescing_manager_CoalescingManager)
rendezvous_create_store_from_optionsregister_rendezvous_handler)_remote_devicec                   @   s   e Zd ZdS )_ProcessGroupStubN)__name__
__module____qualname__r   r   r   r	   r1   Z   s   r1   ztorch.distributed)7ossysenumr   r   boolr
   r   r   RuntimeErrorZ_DistBackendErrorZDistBackendErrorZtorch._C._distributed_c10dr   r   r   r   r   Z_Backendr   r   r   r   r   r   Z_Workr   r   r   r   r   r   r   r   r   r   r    r!   platformr#   r$   Zdistributed_c10dr'   r(   r)   r*   r+   r,   r-   r.   r/   Zremote_devicer0   r1   modulesr   r   r   r	   <module>   s$   d
 		