o
    -i                     @   s,   d dl mZ d dlmZ G dd deZdS )    )fx)VllmInductorPassc                   @   s*   e Zd ZdZejdejddfddZdS )PostCleanupPassa  
    This pass performs cleanup after custom passes.
    It topologically sorts the graph and removes unused nodes.
    This is needed because the pattern matcher does not guarantee producing
    a topologically sorted graph, and there may be unused nodes left around.
    graphreturnNc                 C   s    ddl m} || |  d S )Nr   )stable_topological_sort)torch._inductor.pattern_matcherr   eliminate_dead_code)selfr   r    r   Z/home/ubuntu/veenaModal/venv/lib/python3.10/site-packages/vllm/compilation/post_cleanup.py__call__   s   zPostCleanupPass.__call__)	__name__
__module____qualname____doc__r   time_and_logr   Graphr   r   r   r   r   r      s    r   N)torchr   #vllm.compilation.vllm_inductor_passr   r   r   r   r   r   <module>   s   