a
    h`                     @   s8   d dl Z d dlmZ eedddZeedddZdS )	    N)Argument)vreturnc                 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)r    r
   Q/var/www/auris/lib/python3.9/site-packages/torch/distributed/pipelining/_debug.pyfriendly_debug_info   s    r   )ar   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   )r   r
   r
   r   map_debug_info   s    r   )r   Ztorch.fx.noder   objectr   r   r
   r
   r
   r   <module>   s   
