U
    yh-                     @   s   d dl Z dd Zdd ZdS )    Nc                 C   s6   t | tjr*d| j d| j d| j dS t| S dS )zD
    Helper function to print out debug info in a friendly way.
    zTensor(z, grad=z, dtype=)N)
isinstancetorchZTensorshapeZrequires_gradZdtypestr)v r   U/var/www/html/venv/lib/python3.8/site-packages/torch/distributed/pipelining/_debug.pyfriendly_debug_info   s    r
   c                 C   s   t jj| tS )zp
    Helper function to apply `friendly_debug_info` to items in `a`.
    `a` may be a list, tuple, or dict.
    )r   ZfxnodeZmap_aggregater
   )ar   r   r	   map_debug_info   s    r   )r   r
   r   r   r   r   r	   <module>   s   
