+
    9i                     \    ^ RI Ht ^ RIHt ^ RIHt ^ RIHt ]! ]4      t	 ! R R]4      t
R# )    )	getLogger)Fusion)helper	OnnxModelc                   P   a a ] tR t^t oV3R lV 3R lltV3R lR ltRtVtV ;t# )FusionBiasSplitGeluc                    < V ^8  d   QhRS[ /# )   modelr   )format__classdict__s   "k/var/www/html/photoedit/myenv/lib/python3.14/site-packages/onnxruntime/transformers/fusion_biassplitgelu.py__annotate__ FusionBiasSplitGelu.__annotate__   s     9 9i 9    c                *   < \         SV `  VR R4       R# )BiasSplitGeluGeluN)super__init__)selfr   	__class__s   &&r   r   FusionBiasSplitGelu.__init__   s    8r   c                &   < V ^8  d   QhRS[ RS[ /# )r   input_name_to_nodesoutput_name_to_node)dict)r   r   s   "r   r   r      s#     \G \G4 \Gd \Gr   c                    VP                   ^ ,          V9  d   R# W!P                   ^ ,          ,          p\        V4      ^8w  g   V^ ,          P                  R8w  d   R# V^ ,          pV P                  P	                  VR^ V4      pVf   R# V P                  P                  VRRR7      ^8w  d   R# VP                  ^ ,          pV P                  P                  V. RO. ROV4      pVf#   V P                  P                  V. RO. ROV4      pVe    VR,          P                  ^ ,          V8w  d   R# V P                  P                  VRR.^^ .V4      p	V	e   V	^,          V9  d   R# V P                  P	                  VR^ V4      p
V
f   R# V
P                  ^,          VP                  ^,          8w  d   R# . VOV	^ ,          NVNVNV
NVNpVP                   ^ ,          pV P                  P                  W.W#4      '       g   \        P                  R4       R# VR,          pV P                  P                  V4      w  r\        V\        4      '       g   R# V P                  P                  V4       V P                  P!                  RRR	7      p\"        P$                  ! RVP                  ^V,
          ,          VP                  V,          .V.VR
7      pRVn        V P(                  P+                  V4       V P,                  V P.                  V&   R# )aT  
[root] --->Add -------------------->  Slice ---------------> Mul -->
           |                            ^                    ^
           |                            |                    |
           +----------------------------+---Slice --> Gelu---+
           |                            |     ^
           |                            |-----|
           |                            |     |
           |                           Mul   Mul
           |                            ^     ^
           v                            |     |
          Shape ---> Gather --> Add --> Div --+
NMulSlicegMbP?)deltaDivzBSkip fuse BiasSplitGelu since it is not safe to fuse the subgraph.r   )name_prefix)inputsoutputsnamezcom.microsoft)r#   AddGatherShaper)   )   r   r   r   r   )r    r#   r)   r*   r+   r)   )r,   r   r   r   r   r   )outputlenop_typer   match_parentfind_constant_inputinputmatch_parent_pathis_safe_to_fuse_nodesloggerinfoget_constant_input
isinstanceintnodes_to_removeextendcreate_node_namer   	make_nodedomainnodes_to_addappendthis_graph_namenode_name_to_graph_name)r   	gelu_noder   r   childrenmul_after_geluslice_before_gelu
add_outputstart_index_nodesend_index_nodesslice_before_mulsubgraph_nodessubgraph_outputadd_node
bias_index_value	node_name
fused_nodes   &&&&              r   fuseFusionBiasSplitGelu.fuse   s    A&99&'7'7':;x=A!!4!4!=!! JJ33IwK^_$::))*;Ru)MQRR&,,Q/
 JJ884	
 $ $

 < <!?"#	! $(9"(=(C(CA(F*(T**667H5RW.[\^_Z`buv #q'9AR'R::22>7AObc# ""1%):)@)@)CC

A
 
 	

 
 
 )//2zz//-/B
 
 KK\]$R(!ZZ::8D
*c**##N3JJ//_/]	%%NN1z>2HNN:4NO$%	

 ,
  ,262F2F$$Y/r    )	__name__
__module____qualname____firstlineno__r   rS   __static_attributes____classdictcell____classcell__)r   r   s   @@r   r	   r	      s$     9 9\G \G \Gr   r	   N)loggingr   fusion_baser   onnxr   
onnx_modelr   rV   r6   r	   rU   r   r   <module>ra      s-   
     	8	`G& `Gr   