
    Ng                     &    d Z ddlZddlZd Zd ZdS )zP JIT scripting/tracing utils

Hacked together by / Copyright 2020 Ross Wightman
    Nc                     t          t          j        d          s
J d            t          j                            d           t          j                            d           t          j                            d           dS )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 exectutor. 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/html/ai-engine/env/lib/python3.11/site-packages/timm/utils/jit.pyset_jit_legacyr   
   sn     58:;;^^=^^^^	H((///	H$$U+++	H**400000r   c                    | dk    rt           j                            d           t           j                            d           t           j                            d           t           j                            d           t           j                            d           	 t           j                            d           d S # t          $ r Y d S w xY w| dk    s| dk    rt           j                            d           t           j                            d           t           j                            d           t           j                            d           	 t           j                            d           d S # t          $ r Y d S w xY w| dk    s| dk    r&dt          j
        d	<   t           j                            d           t           j                            d           t           j                            d           t           j                                         t           j                                         t           j                            d           t           j                            d           t           j                            d           t           j                            d           d S J d
|  d            )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!      sn   }},,T222((.....u555..t444--d333	H--e44444 	 	 	DD		%5H,,,,U333((///..t444--e444	H--e44444 	 	 	DD		)		u~~9<
56 	--e444,,T222((...%%'''%%'''..u555..u555,,T222))$/////44E444444s$   #C 
CCE? ?
FF)__doc__r   r   r   r!   r
   r   r   <module>r#      sK     
			 	1 	1 	1#5 #5 #5 #5 #5r   