Ë
    ýÑPh’  ã                   óÂ   — d dl Z d dlZd„ Z e«       r"ej                  j	                  «       s ed«      ‚ 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  G d„ d«      Zy)é    Nc                  ó6   — t        t        j                  d«      S )NÚ_dist_autograd_init)ÚhasattrÚtorchÚ_C© ó    únC:\Users\daisl\Desktop\realtime-object-detection\venv\Lib\site-packages\torch/distributed/autograd/__init__.pyÚis_availabler      s   € Ü”5—8‘8Ð2Ó3Ð3r	   z/Failed to initialize torch.distributed.autograd)Úget_gradientsÚbackwardÚ_initÚ_new_contextÚ_release_contextÚ_get_max_idÚ_is_valid_contextÚ_retrieve_contextÚ_current_contextÚ_get_debug_infoÚDistAutogradContextc                   ó   — e Zd ZdZd„ Zd„ Zy)Úcontexta!  
    Context object to wrap forward and backward passes when using
    distributed autograd. The ``context_id`` generated in the ``with``
    statement  is required to uniquely identify a distributed backward pass
    on all workers. Each worker stores metadata associated with this
    ``context_id``, which is required to correctly execute a distributed
    autograd pass.

    Example::
        >>> # xdoctest: +SKIP
        >>> import torch.distributed.autograd as dist_autograd
        >>> with dist_autograd.context() as context_id:
        >>>     t1 = torch.rand((3, 3), requires_grad=True)
        >>>     t2 = torch.rand((3, 3), requires_grad=True)
        >>>     loss = rpc.rpc_sync("worker1", torch.add, args=(t1, t2)).sum()
        >>>     dist_autograd.backward(context_id, [loss])
    c                 óT   — t        «       | _        | j                  j                  «       S ©N)r   Úautograd_contextÚ_context_id)Úselfs    r
   Ú	__enter__zcontext.__enter__/   s!   € Ü ,£ˆÔØ×$Ñ$×0Ñ0Ó2Ð2r	   c                 óJ   — t        | j                  j                  «       «       y r   )r   r   r   )r   ÚtypeÚvalueÚ	tracebacks       r
   Ú__exit__zcontext.__exit__3   s   € Ü˜×.Ñ.×:Ñ:Ó<Õ=r	   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r#   r   r	   r
   r   r      s   „ ñò"3ó>r	   r   )Úsysr   r   r   r   ÚRuntimeErrorÚtorch._C._distributed_autogradr   r   r   r   r   r   r   r   r   r   r   r   r   r	   r
   Ú<module>r+      sU   ðã 
Û ò4ñ „>˜%Ÿ(™(×6Ñ6Ô8Ù
ÐHÓ
IÐIá„>÷÷ ÷ ñ ÷>ò >r	   