L iddlZddlZejdZejdZej j ZdZdZ dZ de e e effdZy) Nc#Ktjj}tjj| dtjj|y#tjj|wxYww)zlContext manager that controls whether the JIT's executor will run optimizations before executing a function.N)torch_C_get_graph_executor_optimize_set_graph_executor_optimize)should_optimize stored_flags V/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/torch/jit/_fuser.pyoptimized_executionr sX((779K HH))/:;  --k:--k:s>B A% B %!BB c#& Ktjj}tjj}tjj }tjj }tjj }|dk(rtjjdtjjdtjjdtjjdtjjdn|dk(rtjjd}tjjd}tjjdtjjdtjjdtjjdtjjdn1|dk(rtjjdtjjdtjjdtjjdtjjdn|dk(rtjjd}tjjd}tjjdtjjdtjjdtjjdtjjdn|dk(rtjjdtjjdtjjdtjjdtjjdntd|d  d |d vr>tjjtjjtjj|tjj|tjj|tjj|tjj|y #|d vr>tjjtjjtjj|tjj|tjj|tjj|tjj|wxYww) zContext manager that facilitates switching between backend fusers. Valid names: * ``fuser0`` - enables only legacy fuser * ``fuser1`` - enables only NNC * ``fuser2`` - enables only nvFuser * ``fuser3`` - enables oneDNN Graph fuser0TFfuser1fuser2fuser3nonez!unrecognized fuser option (name: )N)rr)rr_jit_can_fuse_on_cpu_jit_can_fuse_on_gpu_jit_texpr_fuser_enabled_jit_nvfuser_enabled_jit_llga_enabled_jit_override_can_fuse_on_cpu_jit_override_can_fuse_on_gpu_jit_set_texpr_fuser_enabled_jit_set_nvfuser_enabled_jit_set_llga_enabled_jit_set_profiling_executorr Exception)name old_cpu_fuse old_gpu_fuseold_texpr_fuser_stateold_nvfuser_stateold_llga_stateold_profiling_executorold_profiling_modes r fuserr's88002L88002L!HH==?557XX//1N x ..t4 ..t4 --e4 ))%0 &&u-  !&!E!Ed!K"XXBB4H ..t4 ..t4 --d3 ))%0 &&u-   ..u5 ..u5 --e4 ))$/ &&u-  !&!E!Ed!K"XXBB4H ..t4 ..u5 --d3 ))%0 &&t,  ..u5 ..u5 --e4 ))%0 &&u-;D6CDD 7 ' ' HH 0 01G H HH 1 12D E ..|< ..|< --.CD ))*;< &&~6 ' ' HH 0 01G H HH 1 12D E ..|< ..|< --.CD ))*;< &&~6s Q X T/CX/CXXc|jdk(r|j|y|jD]#}|jD]}t ||%y)Nzprim::DifferentiableGraph)kindappendblocksnodes_get_differentiable_graph_node)node diff_nodeblockns r r-r-VsS yy{11[[] =E[[] =.q)< = =c"t||g|i|S)N)_script_method_graph_for)selfargskwargss r _graph_forr8_s #D$ @ @ @@r2c |j}t|jj}t |dk(sJ|dj j }|djj}g}|jD]} t| |t |t |k(sJt||D]V\} } t| jj} t | dk(s8| jd| dj X|S#t$r||i|tcYSwxYw)NrSubgraph)get_debug_statelistexecution_plansvalueslengraphcopycode!differentiable_op_executor_statesr,r-zipg_rlast_executed_optimized_graph) r5parentr6r7dbsepsrA fw_states diff_nodesr1statefw_execution_planss r r4r4cs4/$$&3&&--/03x1}}A !!#FKKAAC *,  :A *1j 9 :9~Z000J 2 >HAu!%e&;&;&B&B&D!E %&!+Z!3A!6! / df,.. /sCrZs{  ;; =7=7@!& G G=A/>7$uS#X"77r2