
    -`iT                         U d dl Z d dlmZmZmZ d dlmZ  ee          Zda	da
eed<   deddfdZdeddfd	Zd
aeed<   ddZdeddfdZdS )    N)CompilationConfigCompilationMode
VllmConfig)init_loggerg        torch_compile_start_timevllm_configreturnc                    t          j                     a| j        }|                                 }|j        t
          j        k    rz|rzdd l}|                    dd           t          
                    d|           |                    |                                          at                                           d S d S d S )Nr   T)parentsexist_okzDumping depyf output to %s)timer   compilation_configcompile_debug_dump_pathmoder   VLLM_COMPILEdepyfmkdirloggerdebugprepare_debugas_posixcontext_manager	__enter__)r   r   pathr   s       l/home/jaya/work/projects/VOICE-AGENT/VIET/agent-env/lib/python3.11/site-packages/vllm/compilation/monitor.pystart_monitoring_torch_compiler      s    #y{{,7,J..00D/">>>4>

4$
///14888--dmmoo>>!!##### ?>>>    c                     | j         }|j        t          j        k    rIt                              d|j        d           t          "t                              d d d            d ad S d S d S )Nz#torch.compile takes %.2f s in totallocal)scope)	r   r   r   r   r   	info_oncecompilation_timer   __exit__)r   r   s     r   end_monitoring_torch_compiler$      s~    ,7,J/">>>1/ 	 	
 	
 	
 &$$T4666"OOO ?> '&r   Tcudagraph_capturing_enabledc                  2    t           st          d          d S )Nz]CUDA graph capturing detected at an inappropriate time. This operation is currently disabled.)r%   RuntimeError r   r   $validate_cudagraph_capturing_enabledr)   0   s-    
 ' 
:
 
 	

 
r   enabledc                 
    | a d S )N)r%   )r*   s    r   set_cudagraph_capturing_enabledr,   <   s    ")r   )r	   N)r   vllm.configr   r   r   vllm.loggerr   __name__r   r   r   float__annotations__r   r$   r%   boolr)   r,   r(   r   r   <module>r3      s     F F F F F F F F F F # # # # # #	X		"% % % % %$
 $t $ $ $ $ #j #T # # # # %) T ( ( (	
 	
 	
 	
*T *d * * * * * *r   