
    kh                     $    d Z ddlZddlZd Zd Zy)zP JIT scripting/tracing utils

Hacked together by / Copyright 2020 Ross Wightman
    Nc                      t        t        j                  d      sJ d       t        j                  j                  d       t        j                  j	                  d       t        j                  j                  d       y)z Set 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     J/var/www/teggl/fontify/venv/lib/python3.12/site-packages/timm/utils/jit.pyset_jit_legacyr   
   sU     588:;^=^^;	HH((/	HH$$U+	HH**40r   c                    | dk(  rt         j                  j                  d       t         j                  j                  d       t         j                  j	                  d       t         j                  j                  d       t         j                  j                  d       	 t         j                  j                  d       y | dk(  s| dk(  rt         j                  j                  d       t         j                  j                  d       t         j                  j                  d       t         j                  j                  d       	 t         j                  j                  d       y | dk(  s| dk(  r)dt        j                  d	<   t         j                  j                  d       t         j                  j                  d       t         j                  j                  d       t         j                  j                          t         j                  j                          t         j                  j	                  d       t         j                  j                  d       t         j                  j                  d       t         j                  j                  d       y J d
|  d       # t        $ r Y y w xY w# t        $ r Y y w xY w)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( 	J7 (	J43J47	KK)__doc__r   r   r   r!   r
   r   r   <module>r#      s    
 	1#5r   