
    `i                         d dl mZ d dlZd dlmZ d dlmZ d dlmZ dgZ	 G d dej
        j        j                  Z G d	 de          ZdS )
    )CallableN)_FusedModule)Tracer)ScopeQuantizationTracerc                   @     e Zd Zdedej        j        def fdZ xZ	S )ScopeContextManagerscopecurrent_modulecurrent_module_pathc           	          t                                          |t          |t          |                               d S )N)super__init__r   type)selfr
   r   r   	__class__s       s/home/jaya/work/projects/VOICE-AGENT/VIET/agent-env/lib/python3.11/site-packages/torch/ao/quantization/fx/tracer.pyr   zScopeContextManager.__init__   s8     	&94;O;O P PQQQQQ    )
__name__
__module____qualname__r   torchnnModulestrr   __classcell__r   s   @r   r	   r	      sf        RR,1HORRUR R R R R R R R R Rr   r	   c                   h     e Zd Zdee         dee         f fdZdej        j	        dede
fdZ xZS )r   skipped_module_namesskipped_module_classesc                     t                                                       || _        || _        t	          dd           | _        d| _        d S )N T)r   r   r   r    r   r
   record_stack_traces)r   r   r    r   s      r   r   zQuantizationTracer.__init__   sJ     	$8!&<# 2t__
#'   r   mmodule_qualified_namereturnc                    |j                             d          p|j                             d          ot          |t          j        j                   p3|| j        v p*t          |          | j        v pt          |t                    S )Nztorch.nnztorch.ao.nn)
r   
startswith
isinstancer   r   
Sequentialr   r   r    r   )r   r$   r%   s      r   is_leaf_modulez!QuantizationTracer.is_leaf_module$   s     L++J77 >|..}==; #1eh&9:::	+ %(AA	+ Aww$55	+ !\**	
r   )r   r   r   listr   r   r   r   r   r   boolr+   r   r   s   @r   r   r      s        ($(I(GKH~( ( ( ( ( (
 
 
PT 
 
 
 
 
 
 
 
r   )typingr   r   torch.ao.nn.intrinsicr   torch.fx._symbolic_tracer   torch.fx.proxyr   __all__fxproxyr	   r    r   r   <module>r6      s           . . . . . . + + + + + +             
R R R R R%(.< R R R
 
 
 
 
 
 
 
 
 
r   