
    l
qi                     ~   d Z ddlZddlmZ ddlmZmZ ddlmZ  ed          Z	 ed          Z
e	 dd	ee
e	f         d
edee
e	f         fd            Ze	 dd	dd
edeee
e	f         gee
e	f         f         fd            Z	 dd	ee
e	f         dz  d
edee
e	f         eee
e	f         gee
e	f         f         z  fdZdS )za
APIs related to torch.compile which lazily import torch._dynamo to avoid
circular dependencies.
    N)Callable)overloadTypeVar)	ParamSpec_T_PTfn	recursivereturnc                     d S N r	   r
   s     n/var/www/html/bestrading.cuttalo.com/services/ml-inference/venv/lib/python3.11/site-packages/torch/_compile.py_disable_dynamor      s	     s    c                     d S r   r   r   s     r   r   r      s	     69Sr   c                       Bt          j                   dt          j        dt          j        dt
          f fd            }|S t          j        t                    S )au  
    This API should be only used inside torch, external users should still use
    torch._dynamo.disable. The main goal of this API is to avoid circular
    imports issues that is common while using _dynamo.disable inside torch
    itself.

    This API avoids it by lazily importing torch._dynamo from the import time to
    the invocation of the decorated function.
    Nargskwargsr   c                      t          dd           }|(dd l}|j                            d          }|_         || i |S )N__dynamo_disabler   F)wrapping)getattrtorch._dynamo_dynamodisabler   )r   r   
disable_fntorchr	   r
   s       r   innerz_disable_dynamo.<locals>.inner*   sd     !%7>>J!$$$$ #]222y52QQ
&0#:t.v...r   )r
   )	functoolswrapsr   r   r   r   partialr   )r	   r
   r    s   `` r   r   r      s{     
~				/ 	/BI 	/" 	/ 	/ 	/ 	/ 	/ 	/ 
		/   IFFFFr   )T)NT)__doc__r!   collections.abcr   typingr   r   typing_extensionsr   r   r   boolr   r   r   r   <module>r)      s   
     $ $ $ $ $ $ $ $ $ $ $ $ $ $ ' ' ' ' ' ' WT]]Yt__ 
,0 R%)b"f   

 
'+9 99 $9xB (2r6"2239 9 9 
9 ;? G  GR4 G37 Gb"f(2r6"2!3Xb"f5E!EFF G  G  G  G  G  Gr   