o
    Hh`                     @   s<   d dl Z d dlmZ dedefddZdedefdd	ZdS )
    N)Argumentvreturnc                 C   s2   t | tjrd| j d| j d| j dS t| S )zD
    Helper function to print out debug info in a friendly way.
    zTensor(z, grad=z, dtype=))
isinstancetorchTensorshaperequires_graddtypestr)r    r   W/var/www/vscode/kcb/lib/python3.10/site-packages/torch/distributed/pipelining/_debug.pyfriendly_debug_info   s   r   ac                 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   fxnodemap_aggregater   )r   r   r   r   map_debug_info   s   r   )r   torch.fx.noder   objectr   r   r   r   r   r   <module>   s   
