
    RЦi                     $    S r SSKrSSKrS rS rg)zOJIT scripting/tracing utils

Hacked together by / Copyright 2020 Ross Wightman
    Nc                  
   [        [        R                  S5      (       d   S5       e[        R                  R                  S5        [        R                  R	                  S5        [        R                  R                  S5        g)zSet JIT executor to legacy w/ support for op fusion
This is hopefully a temporary need in 1.5/1.5.1/1.6 to restore performance due to changes
in the JIT executor. These API are not supported so could change.
_jit_set_profiling_executorzOld JIT behavior doesn't exist!FTN)hasattrtorch_Cr   _jit_set_profiling_mode_jit_override_can_fuse_on_gpu     M/var/www/html/ai-image-ml/venv/lib/python3.13/site-packages/timm/utils/jit.pyset_jit_legacyr   
   sX     588:;;^=^^;	HH((/	HH$$U+	HH**40r   c                    U S:X  a  [         R                  R                  S5        [         R                  R                  S5        [         R                  R	                  S5        [         R                  R                  S5        [         R                  R                  S5         [         R                  R                  S5        g U S:X  d  U S:X  a  [         R                  R                  S5        [         R                  R                  S5        [         R                  R                  S5        [         R                  R                  S5         [         R                  R                  S5        g U S:X  d  U S:X  Ga)  S[        R                  S	'   [         R                  R                  S5        [         R                  R                  S5        [         R                  R                  S5        [         R                  R                  5         [         R                  R                  5         [         R                  R	                  S5        [         R                  R                  S5        [         R                  R                  S5        [         R                  R                  S5        g  S
U  S35       e! [         a     g f = f! [         a     g f = f)NteTFoldlegacynvfusernvf1 PYTORCH_NVFUSER_DISABLE_FALLBACKzInvalid jit fuser ())r   r   r   r   _jit_override_can_fuse_on_cpur	   _jit_set_texpr_fuser_enabled_jit_set_nvfuser_enabled	Exceptionosenviron_jit_can_fuse_on_cpu_jit_can_fuse_on_gpu_jit_set_nvfuser_guard_mode)fusers    r   set_jit_fuserr!      s   },,T2((...u5..t4--d3	HH--e4 
%5H,,,U3((/..t4--e4	HH--e4 
)	u~9<

56 	--e4,,T2((.%%'%%'..u5..u5,,T2))$/4+E7!44u3  		  		s$   #J- J= -
J:9J:=
K
	K
)__doc__r   r   r   r!   r
   r   r   <module>r#      s    
 	1#5r   