o
    Hh                     @   sB   d dl mZ d dlZd dlmZmZ dejjdejjfddZ	dS )    )defaultdictN)_ModuleFrame_SubmoduleEntry
orig_graphreturnc                 C   sr   t jt j t j }i }tt}tt}i }t	| t
| j||||d dgdi |d  |j  |  |S )N) Nr   r   )module)torchfxGraphModulennModuleGraphr   listsetr   tuplenodes	run_outergraphlint	recompile)r   
new_module
seen_nodesseen_modules
seen_attrscreated_modules r   [/var/www/vscode/kcb/lib/python3.10/site-packages/torch/distributed/pipelining/_unflatten.py_outline_submodules   s,   
r   )
collectionsr   r	   torch.export.unflattenr   r   r
   r   r   r   r   r   r   r   <module>   s   