
    =Vh&:              
          d Z ddlZddlmZ ddlmZ ddlmZ ddlm	Z
 ddlmZ ddlmZ dd	lmZ dd
lmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZm Z m!Z! ddl"m#Z#  ed Z$ejJ                  ejL                   ed      d!de#e!e$f   de#e!e$f   fd                     Z'  ed       ejP                  e'            Z)e'jT                  jV                  Z,de#e!e$f   de#e!e$f   fdZ-ejJ                  ejL                   ed      d!de#e e!   ej\                  f   fd                     Z/  ed       ejP                  e/            Z0e/jT                  jV                  Z1de#e e!   ej\                  f   fdZ2ejJ                  ejL                   ed      d!d                     Z3  ed       ejP                  e3            Z4e3jT                  jV                  Z5d  Z6y)"zUPython wrappers around TensorFlow ops.

This file is MACHINE GENERATED! Do not edit.
    N)
pywrap_tfe)context)core)execute)dtypes)annotation_types)op_def_registry)ops)op_def_library)deprecated_endpoints)dispatch)	tf_export)TypeVarListAny)	Annotated) TV_XlaClusterOutput_Tz_atypes.BFloat16z_atypes.Boolz_atypes.Complex128z_atypes.Complex64z_atypes.Float16z_atypes.Float32z_atypes.Float64z_atypes.Float8e4m3b11fnuzz_atypes.Float8e4m3fnz_atypes.Float8e4m3fnuzz_atypes.Float8e5m2z_atypes.Float8e5m2fnuzz_atypes.Halfz_atypes.Int16z_atypes.Int32z_atypes.Int4z_atypes.Int64z_atypes.Int8z_atypes.QInt16z_atypes.QInt32z_atypes.QInt8z_atypes.QUInt16z_atypes.QUInt8z_atypes.Resourcez_atypes.Stringz_atypes.UInt16z_atypes.UInt32z_atypes.UInt4z_atypes.UInt64z_atypes.UInt8z_atypes.Variantxla_cluster_outputinputreturnc           	      >   t         j                   xs t        j                         }|j                  }|j                  r	 t	        j
                  |d||       }|S t        | |fd      }|t        ur|S 	 t/        j0                  d| |      \  }}}}|dd }t3        j4                         r7d|j7                  d      f}	|j8                  }
t3        j:                  d|
|	|       |\  }|S # t        j                  $ r }t        j                  ||       Y d}~nd}~wt        j                  $ r Y nw xY w	 t        | |fd      }|t        ur|S t        | ||      S # t        j                  $ r Y t        t         f$ rH t#        j$                  t&        dt)        | |            }|t"        j*                  j,                  ur|cY S  w xY w# t        t         f$ rH t#        j$                  t&        dt)        | |            }|t"        j*                  j,                  ur|cY S  w xY w)zOperator that connects the output of an XLA computation to other consumer graph nodes.

  Args:
    input: A `Tensor`.
    name: A name for the operation (optional).

  Returns:
    A `Tensor`. Has the same type as `input`.
  XlaClusterOutputN)namectx )r   r   T)_contextr   _thread_local_datais_eagerr   TFE_Py_FastPathExecute_core_NotOkStatusException_opsraise_from_not_ok_status_FallbackException"_dispatcher_for_xla_cluster_outputNotImplemented!xla_cluster_output_eager_fallback_SymbolicException	TypeError
ValueError	_dispatchr   r   dictOpDispatcherNOT_SUPPORTED_op_def_library_apply_op_helper_executemust_record_gradient_get_attr_typeinputsrecord_gradient)r   r   _ctxtld_resulte__op_outputs_attrs_inputs_flats              S/home/dcms/DCMS/lib/python3.12/site-packages/tensorflow/compiler/jit/ops/xla_ops.pyr   r      s    
			0h..0$#\\11 $/gn, 1	Gn$n	
)::%d4Aq#x QK'""$3%%c*+F::LL&';('	.W && -
##At,,## 
2$.$ g		&.
d& &## 
z" ""Du4$@g 
	..<<	<  Z	  
  
b$U">
G i,,:::n	
sP    C& 3G &D-9DD-,D-1E 	E G,AG GAHHzraw_ops.XlaClusterOutputc                     t        j                  | g|g       \  }\  } | g}d|f}t        j                  dd||||      }t        j                         rt        j                  d|||       |\  }|S )Nr   s   XlaClusterOutput   r5   attrsr   r   r   )r2   args_to_matching_eagerr   r3   r6   )r   r   r   _attr_Tr?   r>   r9   s          r@   r(   r(   `   s|    55ugsBG'8E,>&0!L#)s?'""$L&';('	.    
xla_launch	resourcesc                    t         j                   xs t        j                         }|j                  }|j                  r!	 t	        j
                  |d|| ||d|d|
      }|S t        | |||||fd      }|t        ur|S t/        |t0        t2        f      st        d|z        t5        |      }
t/        |t0        t2        f      st        d	|z        |D cg c]  }t7        j8                  |d       }}	 t;        j<                  d| |||||      \  }}}}|dd }|s|S t7        j>                         r{d
|jA                  d
      d|jA                  d      d|jC                  d      d|jA                  d      d|jA                  d      f
}|jD                  }t7        jF                  d|||       |S # t        j                  $ r }	t        j                  |	|       Y d}	~	nd}	~	wt        j                  $ r Y nw xY w	 t        | |||||fd      }|t        ur|S t        | ||||||      S # t        j                  $ r Y t        t         f$ rL t#        j$                  t&        dt)        | |||||            }|t"        j*                  j,                  ur|cY S  w xY wc c}w # t        t         f$ rL t#        j$                  t&        dt)        | |||||            }|t"        j*                  j,                  ur|cY S  w xY w)a  XLA Launch Op. For use by the XLA JIT only.

  Args:
    constants: A list of `Tensor` objects.
    args: A list of `Tensor` objects.
    resources: A list of `Tensor` objects with type `resource`.
    Tresults: A list of `tf.DTypes`.
    function: A function decorated with @Defun.
    name: A name for the operation (optional).

  Returns:
    A list of `Tensor` objects of type `Tresults`.
  	XlaLaunchTresultsfunctionN)rL   rM   r   r   r   )	constantsargsrI   rL   rM   r   BExpected list for 'resources' argument to 'xla_launch' Op, not %r.AExpected list for 'Tresults' argument to 'xla_launch' Op, not %r.
TconstantsTargs
Nresources)$r   r   r   r   r   r    r!   r"   r#   r$   r%   _dispatcher_for_xla_launchr'   xla_launch_eager_fallbackr)   r*   r+   r,   r   rH   r-   r.   r/   
isinstancelisttuplelenr2   	make_typer0   r1   r3   get_attr_get_attr_intr5   r6   )rN   rO   rI   rL   rM   r   r7   r8   r9   r:   _attr_Nresources_tr;   r<   r=   r>   r?   s                    r@   rH   rH   m   s+   " 
			0h..0$#\\11k4D)Z*h(g n2 )	D)Xx?GGn$n	Ie}	-
	#%.	/0 0 ^	HtUm	,
	#%-	./ / <DDRh  Z0D(D
)::yty&FAq#x QK'	J""$CLL6ll7#\-zll:&
CLL4LNF ::L\674	. && -
##At,,## 
*dIx4
A4Ig		&&
T9x(  ## 
z" ""D94+4x*2?g
 
	..<<	<0 E
 Z	  
  
b$)2X(0t=
G
 i,,:::n	
sV    F. J3!J .G5GG54G59H' H' 'J=AJJAK:8K:zraw_ops.XlaLaunchc           
         t        |t        t        f      st        d|z        t	        |      }t        |t        t        f      st        d|z        |D cg c]  }t        j                  |d       }}t        j                  | |      \  }	} t        j                  ||      \  }
}t        j                  |t        j                        }t        |       t        |      z   t        |      z   }d|	d|
d|d|d|f
}t        j                  dt	        |      ||||	      }t        j                         rt        j                  d
|||       |S c c}w )NrP   rQ   rL   rR   rS   rT   rM   s	   XlaLaunchrC   rK   )rW   rX   rY   r*   rZ   r2   r[   convert_to_mixed_eager_tensorsr#   convert_n_to_tensor_dtypesresourcer   r3   r6   )rN   rO   rI   rL   rM   r   r   r^   r_   _attr_Tconstants_attr_Targsr?   r>   r9   s                 r@   rV   rV      sS   	Ie}	-
	#%.	/0 0 ^	HtUm	,
	#%-	./ / <DDRh  Z0D(D ( G G	SV WI==dCH+t&&y'2B2BC)i4:-Y?,*G[ *h
HN&\3x=#)s?'""$\674	. Es   Exla_launch_v2c                    t         j                   xs t        j                         }|j                  }|j                  r#	 t	        j
                  |d|| d|d|d|d|      }|S t        | |||||fd      }|t        ur|S t/        |t0        t2        f      st        d
|z        |D 
cg c]  }
t5        j6                  |
d       }}
t/        |t0        t2        f      st        d|z        |D cg c]  }t5        j8                  |d       }}t/        |t0        t2        f      st        d|z        |D cg c]  }t5        j8                  |d       }}	 t;        j<                  d| |||||	      \  }}}}|dd }t5        j>                         r{d|jA                  d      d|jA                  d      d|jA                  d      d|jA                  d      d|jA                  d      f
}|jB                  }t5        jD                  d|||       |S # t        j                  $ r }	t        j                  |	|       Y d}	~	nd}	~	wt        j                  $ r Y nw xY w	 t        | |||||fd      }|t        ur|S t        | ||||||      S # t        j                  $ r Y t        t         f$ rL t#        j$                  t&        dt)        | |||||	            }|t"        j*                  j,                  ur|cY S  w xY wc c}
w c c}w c c}w # t        t         f$ rL t#        j$                  t&        dt)        | |||||	            }|t"        j*                  j,                  ur|cY S  w xY w)ab  XLA Launch Op. For use by the XLA JIT only.

  Args:
    args: A list of `Tensor` objects.
    Tresults: A list of `tf.DTypes`.
    constants: A list of `ints`.
    resources: A list of `ints`.
    function: A function decorated with @Defun.
    name: A name for the operation (optional).

  Returns:
    A list of `Tensor` objects of type `Tresults`.
  XlaLaunchV2rL   rN   rI   rM   N)rL   rN   rI   rM   r   r   r   )rO   rL   rN   rI   rM   r   DExpected list for 'Tresults' argument to 'xla_launch_v2' Op, not %r.EExpected list for 'constants' argument to 'xla_launch_v2' Op, not %r.EExpected list for 'resources' argument to 'xla_launch_v2' Op, not %r.rS   )#r   r   r   r   r   r    r!   r"   r#   r$   r%   _dispatcher_for_xla_launch_v2r'   xla_launch_v2_eager_fallbackr)   r*   r+   r,   r   rg   r-   r.   r/   rW   rX   rY   r2   r[   make_intr0   r1   r3   r\   r5   r6   )rO   rL   rN   rI   rM   r   r7   r8   r9   r:   r_   _ir;   r<   r=   r>   r?   s                    r@   rg   rg      s   " 
			0h..0$#\\11mT4X{;	:xAg n2 ,	xIx?GGn$n	HtUm	,
	&(0	12 2 <DDRh  Z0D(D	Ie}	-
	&(1	23 3 =FFbx  [1F)F	Ie}	-
	&(1	23 3 =FFbx  [1F)F
)::D8y!*XDJAq#x QK'""$s||G,jll:&ll;'ll;'S\\*5MOF ::L|VW6	.E && -
##At,,## 
-9i4
A4Ig		&)
Y)$D2 2 ## 
z" ""2t.79-5D Bg
 
	..<<	<& E
 G
 G
 Z	  
  
Tth,5+3$@
G
 i,,:::n	
sb    !H &K7-K<4L!L IH99IIJ 2J K4AK42K4AM!M!zraw_ops.XlaLaunchV2c           
         t        |t        t        f      st        d|z        |D cg c]  }t	        j
                  |d       }}t        |t        t        f      st        d|z        |D cg c]  }t	        j                  |d       }}t        |t        t        f      st        d|z        |D cg c]  }t	        j                  |d       }}t	        j                  | |      \  }	} t        |       }
d|	d|d|d|d|f
}t	        j                  d	t        |      |
|||
      }t	        j                         rt	        j                  d|
||       |S c c}w c c}w c c}w )Nrj   rL   rk   rN   rl   rI   rS   rM   s   XlaLaunchV2rC   ri   )rW   rX   rY   r*   r2   r[   ro   ra   r   rZ   r3   r6   )rO   rL   rN   rI   rM   r   r   r_   rp   rf   r?   r>   r9   s                r@   rn   rn   E  s~   	HtUm	,
	&(0	12 2 <DDRh  Z0D(D	Ie}	-
	&(1	23 3 =FFbx  [1F)F	Ie}	-
	&(1	23 3 =FFbx  [1F)F==dCH+td,[*h[)Z;&^S]$0C"&(' ""$|VW6	.+ E
 G
 Gs   E0E7E")N)7__doc__collectionstensorflow.pythonr   tensorflow.python.eagerr   r   r   r!   r   r2   tensorflow.python.frameworkr   rc   tensorflow.security.fuzzing.pyr   _atypesr	   _op_def_registryr
   r#   r   r0   "tensorflow.python.util.deprecationr   tensorflow.python.utilr   r,    tensorflow.python.util.tf_exportr   typingr   r   r   typing_extensionsr   r   add_fallback_dispatch_listadd_type_based_api_dispatcherr   	to_raw_opr   _tf_type_based_dispatcherDispatchr&   r(   ResourcerH   rK   rU   rV   rg   ri   rm   rn   r   rG   r@   <module>r      s   
  6 7 1 7 9 F K 3 I C 8 6 % % '  N
 
%%
((
 <i-B(BC <S\]`bw]wSx < ! ) &<| 9978HZ9[\ %7%Q%Q%Z%Z "
Ys<Q7Q-R 
bklo  rG  mG  cH 
 %%
((
<U9T#Y@P@P5P+Q U  ) &Un +I)*>4>>*+EF	'AAJJ )DIwO_O_D_:` 2 %%
((
?X  ) &Xt /i-.~t~~m/LM - G G P P rG   