o
    Zh                     @   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nodesZ	run_outergraphZlintZ	recompile)r   Z
new_moduleZ
seen_nodesZseen_modulesZ
seen_attrsZcreated_modules r   V/var/www/auris/lib/python3.10/site-packages/torch/distributed/pipelining/_unflatten.py_outline_submodules   s,   
r   )
collectionsr   r	   Ztorch.export.unflattenr   r   r
   r   r   r   r   r   r   r   <module>   s   