
    =VhC                    9   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ddddd      Z$ejJ                  ejL                   ed      dQde#e!e$f   de#e!ejN                  f   de(de(de#e!e$f   f
d                     Z)  ed       ejT                  e)            Z+e)jX                  jZ                  Z.de#e!e$f   de#e!ejN                  f   de(de(de#e!e$f   f
dZ/ ej`                  d d!d"g      Z1 ed#dd$d%dd&dd'dd(d)d*d+d,d-d.d/dd0d1      Z2 ed2dd(      Z3ejJ                  ejL                   ed3      dQd4e#e!e2f   d5e#e!e2f   d6e#e!e3f   fd7                     Z4  ed8       ejT                  e4            Z5e4jX                  jZ                  Z6d4e#e!e2f   d5e#e!e2f   d6e#e!e3f   fd9Z7ejJ                  ejL                   ed:      g g g d;g dfd<e8d=e(d>e9fd?                     Z:  ed@       ejT                  e:            Z;e:jX                  jZ                  Z<d<e8d=e(d>e9fdAZ= edBdd$d%dd&dd'dd(d)d*d+d,d-d.d/dd0d1      Z> edCdd(      Z?ejJ                  ejL                   edD      dQd4e#e!e>f   d5e#e!e>f   dEe#e!e?f   dFe#e!e?f   dGe#e!e?f   dHe#e!e?f   dIe#e!e?f   dJe(dKe(de#e!e>f   fdL                     Z@  edM       ejT                  e@            ZAe@jX                  jZ                  ZBd4e#e!e>f   d5e#e!e>f   dEe#e!e?f   dFe#e!e?f   dGe#e!e?f   dHe#e!e?f   dIe#e!e?f   dJe(dKe(de#e!e>f   fdNZC edOdd$d%dd&dd'dd(d)d*d+d,d-d.d/dd0d1      ZD edPdd$d%dd&dd'dd(d)d*d+d,d-d.d/dd0d1      ZE edQdd(      ZF edRdd$d%dd&dd'dd(d)d*d+d,d-d.d/dd0d1      ZGejJ                  ejL                   edS      dRd4e#e!eDf   d5e#e!eEf   dEe#e!eFf   dFe#e!eFf   dGe#e!eFf   dHe#e!eFf   dIe#e!eFf   dJe(dKe(dTeGdUe8de#e!eGf   fdV                     ZH  edW       ejT                  eH            ZIeHjX                  jZ                  ZJd4e#e!eDf   d5e#e!eEf   dEe#e!eFf   dFe#e!eFf   dGe#e!eFf   dHe#e!eFf   dIe#e!eFf   dJe(dKe(dTeGdUe8de#e!eGf   fdXZK edY ZLejJ                  ejL                   edZ      dQd[e(d\e(d]eLde#e!eLf   fd^                     ZM  ed_       ejT                  eM            ZNeMjX                  jZ                  ZOd[e(d\e(d]eLde#e!eLf   fd`ZPejJ                  ejL                   eda      dQdbe(d\e(dce9fdd                     ZQ  ede       ejT                  eQ            ZReQjX                  jZ                  ZSdbe(d\e(dce9fdfZTejJ                  ejL                   edg      dQde#e!ej                  f   dheVdieVde(dje9de#e!ej                  f   fdk                     ZX  edl       ejT                  eX            ZYeXjX                  jZ                  ZZde#e!ej                  f   dheVdieVde(dje9de#e!ej                  f   fdmZ[ edndd$d%dd&dd'dd(d)d*d+d,d-d.d/dd0d1      Z\ejJ                  ejL                   edo      dQd4e#e!e\f   d5e#e!e\f   dJe(dKe(de#e!e\f   f
dp                     Z]  edq       ejT                  e]            Z^e]jX                  jZ                  Z_d4e#e!e\f   d5e#e!e\f   dJe(dKe(de#e!e\f   f
drZ` edsdd$d%dd&dd'dd(d)d*d+d,d-d.d/dd0d1      Za edtdd$d%dd&dd'dd(d)d*d+d,d-d.d/dd0d1      Zb edudd$d%dd&dd'dd(d)d*d+d,d-d.d/dd0d1      ZcejJ                  ejL                   edv      dQd4e#e!eaf   d5e#e!ebf   dJe(dKe(dTecde#e!ecf   fdw                     Zd  edx       ejT                  ed            ZeedjX                  jZ                  Zfd4e#e!eaf   d5e#e!ebf   dJe(dKe(dTecde#e!ecf   fdyZg edz Zh ed{dd(      ZiejJ                  ejL                   ed|      dQde#e!ehf   d}e#e!eif   d~e#e!eif   de#e!ehf   fd                     Zj  ed       ejT                  ej            ZkejjX                  jZ                  Zlde#e!ehf   d}e#e!eif   d~e#e!eif   de#e!ehf   fdZm ed Zn eddd(      ZoejJ                  ejL                   ed      dQde#e!enf   de#e!enf   de#e!eof   de#e!enf   fd                     Zp  ed       ejT                  ep            ZqepjX                  jZ                  Zrde#e!enf   de#e!enf   de#e!eof   de#e!enf   fdZs eddd%d      ZtejJ                  ejL                   ed      dQde#e!etf   de#e!etf   de(de#e!etf   fd                     Zu  ed       ejT                  eu            ZveujX                  jZ                  Zwde#e!etf   de#e!etf   de(de#e!etf   fdZx edddd$d%dd&dd'dd(d)d*d+d,d-d.d/dd0d1      Zy eddd(      ZzejJ                  ejL                   ed      dQde#e!eyf   d}e#e!ezf   de#e!ezf   dJe(de9de#e!eyf   fd                     Z{  ed       ejT                  e{            Z|e{jX                  jZ                  Z}de#e!eyf   d}e#e!ezf   de#e!ezf   dJe(de9de#e!eyf   fdZ~ ed ZejJ                  ejL                   ed      dQde#e!ef   fd                     Z  ed       ejT                  e            ZejX                  jZ                  Zde#e!ef   fdZ ej`                  dddg      Z edddd&dd'dd(d)d/dd0d1      Z ed ZejJ                  ejL                   ed      dQde#e!ef   de#e!ef   fd                     Z  ed       ejT                  e            ZejX                  jZ                  Zde#e!ef   de#e!ef   fdZejJ                  ejL                   ed      dQd                     Z  ed       ejT                  e            ZejX                  jZ                  Zd Z ed Z eddd(      ZejJ                  ejL                   ed      dQde#e!ef   de#e!ef   de#e!ef   de#e!ef   de#e!ef   de#e!ef   fd                     Z  ed       ejT                  e            ZejX                  jZ                  Zde#e!ef   de#e!ef   de#e!ef   de#e!ef   de#e!ef   de#e!ef   fdZ ed ZejJ                  ejL                   ed      dQd]ede(de#e!ef   fd                     Z  ed       ejT                  e            ZejX                  jZ                  Zd]ede(de#e!ef   fdZ edddd$d%dd&dd'dd(d)d*d+d,d-d.d/dd0d1      ZejJ                  ejL                   ed«      dQde#e!ef   de#e!ef   de#e!ef   fdĄ                     Z  edū       ejT                  e            ZejX                  jZ                  Zde#e!ef   de#e!ef   de#e!ef   fdƄZ edddd&d      ZejJ                  ejL                   edȫ      dQde#e!ef   de8de8de#e!ef   fd˄                     Z  ed̫       ejT                  e            ZejX                  jZ                  Zde#e!ef   de8de8de#e!ef   fd̈́Z edddddd      ZejJ                  ejL                   edϫ      dQde#e!ef   de#e!ejN                  f   de#e!ejN                  f   de(de#e!ef   f
dф                     Z  edҫ       ejT                  e            ZejX                  jZ                  Zde#e!ef   de#e!ejN                  f   de#e!ejN                  f   de(de#e!ef   f
dӄZ edddd$d%dd&dd'dd(d)d*d+d,d-d.d/dd0d1      Z eddd(      ZejJ                  ejL                   ed֫      dQde#e!ef   de#e!ef   de#e!ef   dEe#e!ef   de#e!ef   de#e!ef   dFe#e!ef   de#e!ef   fdڄ                     Z  ed۫       ejT                  e            ZejX                  jZ                  Zde#e!ef   de#e!ef   de#e!ef   dEe#e!ef   de#e!ef   de#e!ef   dFe#e!ef   de#e!ef   fd܄Z edݎ ZejJ                  ejL                   edޫ      dQde#e!ef   de#e!ejN                  f   de#e!ef   fd                     Z  ed       ejT                  e            ZejX                  jZ                  Zde#e!ef   de#e!ejN                  f   de#e!ef   fdZejJ                  ejL                   ed      dQde#e!ejN                  f   fd                     Z  ed       ejT                  e            ZejX                  jZ                  Zde#e!ejN                  f   fdZ ej`                  dddg      Z eddd(d)dd0d1      Z eddd(      ZejJ                  ejL                   ed      ejv                  dfde#e!ejN                  f   de#e!ejx                  f   de#e!ef   d]efd                     Z  ed       ejT                  e            ZejX                  jZ                  Zde#e!ejN                  f   de#e!ejx                  f   de#e!ef   d]efdZ edddd$d%dd&dd'dd(d)d*d+d,d-d.d/dd0d1      Z eddd(      ZejJ                  ejL                   ed      dQde#e!ef   de#e!ef   de#e!ef   dJe(de9de#e!ef   fd                     Z  ed       ejT                  eë            ZejX                  jZ                  Zde#e!ef   de#e!ef   de#e!ef   dJe(de9de#e!ef   fdZ eddd$d%dd&dd'dd(d)d*d+d,d-d.d/dd0d1      Z eddd(      ZejJ                  ejL                   ed      dQde#e!ef   de#e!ef   dEe#e!ef   dFe#e!ef   de#e!ef   de#e!ef   de#e!ef   fd                     Z  ed        ejT                  eɫ            ZejX                  jZ                  Zde#e!ef   de#e!ef   dEe#e!ef   dFe#e!ef   de#e!ef   de#e!ef   de#e!ef   fdZ ej`                  dddg      Z eddd$d%dd&dd'dd(d)d*d+d,d-d.d/dd0d1      ZejJ                  ejL                   ed      dQde#e!ef   de9de8d	eVfd
                     Z  ed       ejT                  eϫ            ZejX                  jZ                  Zde#e!ef   de9de8d	eVfdZ ed ZejJ                  ejL                   ed      dQde#e!ef   de(fd                     Z  ed       ejT                  eԫ            ZejX                  jZ                  Z֐de#e!ef   de(fdZejJ                  ejL                   ed      dQde#e!ejN                  f   de#e!ejN                  f   de#e!ejN                  f   fd                     Z  ed       ejT                  eث            ZejX                  jZ                  Zde#e!ejN                  f   de#e!ejN                  f   de#e!ejN                  f   fdZ ed ZejJ                  ejL                   ed      dQde#e!ef   de#e!ejN                  f   de#e!ejN                  f   de#e!ef   fd                     Z  ed       ejT                  eݫ            ZejX                  jZ                  Zde#e!ef   de#e!ejN                  f   de#e!ejN                  f   de#e!ef   fdZ ed ZejJ                  ejL                   ed      d g dfde#e!ef   d!e(de#e!ef   fd"                     Z  ed#       ejT                  e            ZejX                  jZ                  Zde#e!ef   d!e(de#e!ef   fd$Z ed% ZejJ                  ejL                   ed&      dQde#e!ef   de#e!ef   fd'                     Z  ed(       ejT                  e            ZejX                  jZ                  Zde#e!ef   de#e!ef   fd)Z ed* ZejJ                  ejL                   ed+      d,g dfde#e!ef   d-e(d.e8de#e!ef   fd/                     Z  ed0       ejT                  e            ZejX                  jZ                  Zde#e!ef   d-e(d.e8de#e!ef   fd1Z ed2 ZejJ                  ejL                   ed3      d,g dfde#e!ef   d-e(d.e8de#e!ef   fd4                     Z  ed5       ejT                  e            ZejX                  jZ                  Zde#e!ef   d-e(d.e8de#e!ef   fd6Z ej`                  d7g d8      Z ed9dd$d%dd&dd'dd(d)d*d+d,d-d.d/dd0d1      ZejJ                  ejL                   ed:      dQde#e!ef   de8d	eVdKe(fd;                     Z  ed<       ejT                  e            ZejX                  jZ                  Zde#e!ef   de8d	eVdKe(fd=Z ed>ddd$d%dd&dd'dd(d)d*d+d,d-d.d/dd0d1      ZejJ                  ejL                   ed?      dQde#e e!   ef   de#e e!   ef   fd@                     Z  edA       ejT                  e            ZejX                  jZ                  Zde#e e!   ef   de#e e!   ef   fdBZejJ                  ejL                   edC      dQdD                     Z   edE       ejT                  e             Ze jX                  jZ                  ZdF ZejJ                  ejL                   edG      dQdHe#e!ejN                  f   dIe9fdJ                     Z  edK       ejT                  e            ZejX                  jZ                  ZdHe#e!ejN                  f   dIe9fdLZejJ                  ejL                   edM      dQdN                     Z  edO       ejT                  e            Z	ejX                  jZ                  Z
dP Zy(S  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_XlaAllReduce_T_atypes.BFloat16_atypes.Float32_atypes.Half_atypes.Int32_atypes.UInt32xla_all_reduceinputgroup_assignment	reduce_opmodereturnc                 
   t         j                   xs t        j                         }|j                  }|j                  r 	 t	        j
                  |d|| |d|d|	      }|S t        | ||||fd      }|t        ur|S t/        j0                  |d      }t/        j0                  |d      }	 t3        j4                  d| ||||      \  }	}	}
}|dd }t/        j6                         rYd|
j9                  d      d|
j;                  d      d|
j;                  d      f}|
j<                  }t/        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 Rt        t         f$ rK t#        j$                  t&        dt)        | ||||            }|t"        j*                  j,                  ur|cY S  w xY w# t        t         f$ rK t#        j$                  t&        dt)        | ||||            }|t"        j*                  j,                  ur|cY S  w xY w)	a  Wraps the XLA AllReduce operator

    documented at https://www.tensorflow.org/xla/operation_semantics#allreduce.

  Args:
    input: A `Tensor`. Must be one of the following types: `half`, `bfloat16`, `float32`, `int32`, `uint32`.
      Array or a non-empty tuple of arrays to reduce across replicas.
    group_assignment: A `Tensor` of type `int32`.
      Groups between which the reductions are performed.
    reduce_op: A `string` from: `"Min", "Max", "Mul", "Add", "Mean"`.
      Reduction computation.
    mode: A `string` from: `"CrossReplica", "CrossReplicaAndPartition"`.
      group mode.
      CrossReplica: group_assignment contains replica_id. Each group contains the
        replicas for the current partition.
      CrossReplicaAndPartition: group_assignment contains replica_id. Each group
        contains the replicas for all partitions.
    name: A name for the operation (optional).

  Returns:
    A `Tensor`. Has the same type as `input`.
  XlaAllReducer   r   N)r   r   namectx )r   r   r   r   r!   T) _contextr   _thread_local_datais_eagerr   TFE_Py_FastPathExecute_core_NotOkStatusException_opsraise_from_not_ok_status_FallbackException_dispatcher_for_xla_all_reduceNotImplementedxla_all_reduce_eager_fallback_SymbolicException	TypeError
ValueError	_dispatchr   r   dictOpDispatcherNOT_SUPPORTED_executemake_str_op_def_library_apply_op_helpermust_record_gradient_get_attr_typeget_attrinputsrecord_gradient)r   r   r   r   r!   _ctxtld_resulte__op_outputs_attrs_inputs_flats                 Z/home/dcms/DCMS/lib/python3.12/site-packages/tensorflow/compiler/tf2xla/ops/gen_xla_ops.pyr   r      s   4 
			0h..0$#\\11ndE+;[64!g n4 -	 )T494AGn$n	;7)			4	($
)::e6F"+$TCAq#x QK'""$3%%c*Kll;'f1EGF::Lfg7('	.k && -
##At,,## 
."ItT
;TCg		&*
!YT  ## 
z" 	""B56F/8t*.!0g 
	..<<	<	, Z	  
  
"d4D-6TN
G
 i,,:::n	
P    D? ' H( ?FE--FF
F6 %F6 6H%AH%#H%(AJ Jzraw_ops.XlaAllReducec           	      $   t        j                  |d      }t        j                  |d      }t        j                  | g|t        j                  t        j
                  t        j                  t        j                  t        j                  g      \  }\  } t        j                  |t        j                        }| |g}d|d|d|f}t        j                  dd||||      }	t        j                         rt        j                  d|||	       |	\  }	|	S )Nr   r   r$   s   XlaAllReduce   r?   attrsr"   r!   r    r8   r9   args_to_matching_eager_dtypeshalfbfloat16float32int32uint32r+   convert_to_tensorr   r<   r@   )
r   r   r   r   r!   r"   _attr_TrI   rH   rC   s
             rJ   r0   r0   x   s
   	;7)			4	($55ugsW\\SZScSceletetv}  wD  wD  FM  FT  FT  EW  X'8E++,<gmmL)*,+y&$?&_a#)s?'""$fg7('	.    XlaBroadcastHelper
lhs_output
rhs_outputTV_XlaBroadcastHelper_T_atypes.Complex128_atypes.Complex64_atypes.Float64_atypes.Int16_atypes.Int64_atypes.Int8_atypes.QInt16_atypes.QInt32_atypes.QInt8_atypes.QUInt16_atypes.QUInt8_atypes.UInt16_atypes.UInt64_atypes.UInt8TV_XlaBroadcastHelper_Tindicesxla_broadcast_helperlhsrhsbroadcast_dimsc                    t         j                   xs t        j                         }|j                  }|j                  r2	 t	        j
                  |d|| ||      }t        j                  |      }|S t        | |||fd      }|t        ur|S 	 t3        j4                  d| |||      \  }}}	}
|
dd }t7        j8                         rHd|	j;                  d      d|	j;                  d      f}|	j<                  }t7        j>                  d|||       t        j                  |      }|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$ rJ t'        j(                  t*        dt-        | |||            }|t&        j.                  j0                  ur|cY S  w xY w# t"        t$        f$ rJ t'        j(                  t*        dt-        | |||            }|t&        j.                  j0                  ur|cY S  w xY w)a   Helper operator for performing XLA-style broadcasts

  Broadcasts `lhs` and `rhs` to the same rank, by adding size 1 dimensions to
  whichever of `lhs` and `rhs` has the lower rank, using XLA's broadcasting rules
  for binary operators.

  Args:
    lhs: A `Tensor`. Must be one of the following types: `float32`, `float64`, `int32`, `uint8`, `int16`, `int8`, `complex64`, `int64`, `qint8`, `quint8`, `qint32`, `bfloat16`, `qint16`, `quint16`, `uint16`, `complex128`, `half`, `uint32`, `uint64`.
      the LHS input tensor
    rhs: A `Tensor`. Must have the same type as `lhs`. the RHS input tensor
    broadcast_dims: A `Tensor`. Must be one of the following types: `int32`, `int64`.
      an XLA-style broadcast dimension specification
    name: A name for the operation (optional).

  Returns:
    A tuple of `Tensor` objects (lhs_output, rhs_output).

    lhs_output: A `Tensor`. Has the same type as `lhs`. the broadcasted LHS tensor
    rhs_output: A `Tensor`. Has the same type as `lhs`. the broadcasted RHS tensor
  r[   Nr!   r"   r#   )ro   rp   rq   r!   r$   Tindices) r%   r   r&   r'   r   r(   _XlaBroadcastHelperOutput_maker)   r*   r+   r,   r-   $_dispatcher_for_xla_broadcast_helperr/   #xla_broadcast_helper_eager_fallbackr1   r2   r3   r4   r   rn   r5   r6   r7   r:   r;   r8   r<   r=   r?   r@   )ro   rp   rq   r!   rA   rB   rC   rD   rE   rF   rG   rH   rI   s                rJ   rn   rn      sm   0 
			0h..0$#\\11"D#sNDg)//8gn0 3	c>4)41Gn$n
)::#3~#')Aq#x QK'""$3%%c*J  ,.F::LlFG=%++G4'	.c && -
##At,,## 
4^T
+T3g		&0
sN49 9## 
z" "" "ds:H04'6g
 
	..<<	<& Z	  
  
DSc8F.2%4
G
 i,,:::n	
sP    0D# H	 #E*6EE*)E*.F F H.AHH	AI" I"zraw_ops.XlaBroadcastHelperc                    t        j                  | |g|t        j                  t        j                  t        j
                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                   t        j"                  t        j$                  t        j&                  t        j(                  t        j*                  g      \  }}|\  } }t        j                  |g|t        j
                  t        j                  g      \  }\  }| ||g}d|d|f}	t        j,                  dd||	||      }
t        j.                         rt        j0                  d||	|
       t2        j5                  |
      }
|
S )Nr$   rt   s   XlaBroadcastHelper   rN   r[   )r8   rQ   rR   rU   float64rV   uint8int16int8	complex64int64qint8quint8qint32rT   qint16quint16uint16
complex128rS   rW   uint64r   r<   r@   ru   rv   )ro   rp   rq   r!   r"   rY   	_inputs_T_attr_TindicesrI   rH   rC   s              rJ   rx   rx      s;   66Sz3ZaZiZikrkxkx  {B  {H  {H  JQ  JW  JW  Y`  Ye  Ye  gn  gx  gx  zA  zG  zG  IP  IV  IV  X_  Xf  Xf  ho  hv  hv  x  xH  xH  JQ  JX  JX  Za  Zi  Zi  kr  ky  ky  {B  {M  {M  OV  O[  O[  ]d  ]k  ]k  mt  m{  m{  I~  '9*3&.&E&E~FVX[^e^k^kmtmzmz]}&~#.#>sN+,*n5&2Al#)s?'""$lFG=%++G4'	.rZ   xla_call_moduleFversionmodulehas_token_input_outputc                 	   t         j                   xs t        j                         }|j                  }|j                  r-	 t	        j
                  |d|
| d|d|d|d|d|d|d|d	|d
|	      }|S t        | |||||||||	|
fd      }|t        ur|S t/        j0                  |d      }t/        j2                  |d      }t5        |t6        t8        f      st        d|z        |D cg c]  }t/        j:                  |d       }}t5        |t6        t8        f      st        d|z        |D cg c]  }t/        j<                  |d       }}|g }t5        |t6        t8        f      st        d|z        |D cg c]  }t/        j2                  |d       }}|g }t5        |t6        t8        f      st        d|z        |D cg c]  }t/        j2                  |d       }}|g }t5        |t6        t8        f      st        d|z        |d}t/        j>                  |d	      }|	g }	t5        |	t6        t8        f      st        d|	z        |	D cg c]  }t/        j2                  |d
       }	}	 tA        jB                  d| |||||||||	|
      \  }}}}|dd }|s|S t/        jD                         rd|jG                  d      d|jI                  d      d|jI                  d      d|jI                  d      d|jI                  d      d|jI                  d      d|jI                  d      d|jI                  d      d	|jK                  d	      d
|jI                  d
      f}|jL                  }t/        jN                  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$ rQ 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 c c}w c c}w # t        t         f$ rQ t#        j$                  t&        dt)        | |||||||||	|
            }|t"        j*                  j,                  ur|cY S  w xY w)a  Invokes a StableHLO module.

  This op is used with JAX native serialization in a TensorFlow context with
  stability guarantees.

  Args:
    args: A list of `Tensor` objects.
      A list of `Tensor` with possibly different types to be passed as arguments
      to the `module`. These are the actual arguments and do not include the
      platform argument (see `platforms`) nor the dimension arguments (see
      `dim_args_spec`).
    version: An `int`.
      Tracks changes the semantics of the op, to support backwards
      compatibility. Minimum supported version is 2. From
      version 2, the op carries a StableHLO text or bytecode `module`. From
      version 3, the op also supports the `platforms` attribute. From version 4,
      the op carries a StableHLO module with compatibility guarantees. From version
      5, XLACallModule can include `stablehlo.custom_call` op to execute tf
      functions. From version 6 the op supports the `disabled_checks` attribute.
      See more versioning details at https://github.com/search?q=repo%3Atensorflow%2Ftensorflow+path%3Axla_call_module+%22int+kVersionMaximumSupported%22&type=code.
    module: A `string`.
      A serialized computation, a text or bytecode representation of
      an mlir.Module. The return type must be a tuple if and only if the `Sout` is
      a list with 0 or more than 1 elements. The length of `Tout` and
      `Sout` must match. This op always returns a tuple of results, even if the
      module returns a single result.
    Sout: A list of shapes (each a `tf.TensorShape` or list of `ints`).
      List of output tensor shapes.
    Tout: A list of `tf.DTypes`. List of output tensor data types.
    dim_args_spec: An optional list of `strings`. Defaults to `[]`.
      this attribute is not supported anymore.
    platforms: An optional list of `strings`. Defaults to `[]`.
      the list of platforms supported by `module`. The list can contain
      the strings "CPU", "CUDA", "ROCM", or "TPU". It is an error to compile
      this op for a platform that does not appear in the list. This check can be
      disabled using `disabled_checks`. If the list contains more than
      one platform, then the `module` takes one additional 0-dimensional
      integer-tensor parameter in the first position, encoding the index in
      `platforms` of the current compilation platform. This parameter has value 0
      if the plaform is not among `platforms` and the check has been disabled.
      The list can be empty in old versions (earlier than 6) to denote that no
      platform checking must be performed at loading time.
    function_list: An optional list of functions decorated with @Defun. Defaults to `[]`.
      This list contains the TensorFlow FunctionDefs that are used by
      the XLACallModule. If the XLACallModule contains `stablehlo.custom_call`
      operations, they can call TensorFlow graph functions outside of the
      XLACallModule. This `function_list` attribute registers the dependency of the
      XLACallModule on those functions. This attribute was added in version 5.
    has_token_input_output: An optional `bool`. Defaults to `False`.
      If true, the embedded StableHLO module's main function
      must take a `!stablehlo.token` as its first argument and returns a token as
      its first result. This can be used in conjunction with the TF2XLA's side
      effect mechanism in order to model side effects. This is used only in versions
      prior to version 9. After that, the number and position of tokens among
      the arguments and results are obtained from the main function type. This
      allows us to support more than one token and not necessarily at the start.
    disabled_checks: An optional list of `strings`. Defaults to `[]`.
      A list of strings describing the safety checks that were
      disabled at serialization time. This attribute was added in version 6.
      For more details see
      https://github.com/search?q=repo%3Agoogle%2Fjax+path%3Ajax_export+%22class+DisabledSafetyCheck%22&type=code.
      This list, supplemented with a comma-separate list of directives specified
      using the flag --tf_xla_call_module_disabled_checks,
      is used at module loading time to skip the corresponding checks.
    name: A name for the operation (optional).

  Returns:
    A list of `Tensor` objects of type `Tout`.
  XlaCallModuler   r   SoutToutdim_args_spec	platformsfunction_listr   disabled_checksN)r   r   r   r   r   r   r   r   r   r!   r"   r#   )argsr   r   r   r   r   r   r   r   r   r!   BExpected list for 'Sout' argument to 'xla_call_module' Op, not %r.BExpected list for 'Tout' argument to 'xla_call_module' Op, not %r.KExpected list for 'dim_args_spec' argument to 'xla_call_module' Op, not %r.GExpected list for 'platforms' argument to 'xla_call_module' Op, not %r.KExpected list for 'function_list' argument to 'xla_call_module' Op, not %r.FMExpected list for 'disabled_checks' argument to 'xla_call_module' Op, not %r.Tin)(r%   r   r&   r'   r   r(   r)   r*   r+   r,   r-   _dispatcher_for_xla_call_moduler/   xla_call_module_eager_fallbackr1   r2   r3   r4   r   r   r5   r6   r7   r8   make_intr9   
isinstancelisttuple
make_shape	make_type	make_boolr:   r;   r<   _get_attr_intr>   _get_attr_boolr?   r@   )r   r   r   r   r   r   r   r   r   r   r!   rA   rB   rC   rD   _s_trE   rF   rG   rH   rI   s                         rJ   r   r      s   R 
			0h..0$#\\11otT9gxfdO]Y "8:Kg nD .	wdM9-	GHLNG n$ngy1'VX.&	D4-	(
	(*.	/0 0 59	9b(

b&
)	9$	9	D4-	(
	(*.	/0 0 48	8R(

R
(	8$	8M	MD%=	1
	(*7	89 9 ERRb8$$R9R-RI	Ie}	-
	(*3	45 5 =FFbx  [1F)FM	MD%=	1
	(*7	89 9 #"#--.DF^_O	OdE]	3
	(*9	:; ; IXX"X&&r+<=X/X
)::dGF"-#,M0F)8tEAq#x( QK'	J""$**95xll8$fcll6.BFll6"E3<<+>s||O<kll;'ll?+-E  !9:<Mll,-/F ::Lvw8	.k && -
##At,,## 
/&$mY
/$IJNPg 
	&+
T%%!7)$@ @ ## 
z" ""R4-3$T4A094A=S6E+/"1	g 
	..<<	<6 
:
 
9 S G  Y Z	  
  
2twv)-D2?.72?;Q4C)- /	
G i,,:::n	
sn    +N  !Q;(R 3R>R
R+&R  ON..OO P ,P Q8AQ86Q8AS42S4zraw_ops.XlaCallModulec                    t        j                  |d      }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       }}|g }t        |t        t
        f      st        d|z        |D cg c]  }t        j                  |d       }}|g }t        |t        t
        f      st        d	|z        |D cg c]  }t        j                  |d
       }}|g }t        |t        t
        f      st        d|z        |d}t        j                  |d      }|	g }	t        |	t        t
        f      st        d|	z        |	D cg c]  }t        j                  |d       }	}t        j                  | |      \  }} t	        |       }d|d|d|d|d|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 c c}w c c}w )Nr   r   r   r   r   r   r   r   r   r   r   Fr   r   r   r   r   s   XlaCallModulerN   r   )r8   r   r9   r   r   r   r2   r   r   r   convert_to_mixed_eager_tensorsr   lenr<   r@   )r   r   r   r   r   r   r   r   r   r   r!   r"   r   r   	_attr_TinrI   rH   rC   s                     rJ   r   r     s   gy1'VX.&	D4-	(
	(*.	/0 0 59	9b(

b&
)	9$	9	D4-	(
	(*.	/0 0 48	8R(

R
(	8$	8M	MD%=	1
	(*7	89 9 ERRb8$$R9R-RI	Ie}	-
	(*3	45 5 =FFbx  [1F)FM	MD%=	1
	(*7	89 9 #"#--.DF^_O	OdE]	3
	(*9	:; ; IXX"X&&r+<=X/X;;D#F/)Td,w&&$O]K=":+_>& -s4y#)s?'""$vw8	._ 
:
 
9 S G  Ys   I*I/'I42I9?I>TV_XlaConv_TTV_XlaConv_Tindicesxla_convwindow_stridespaddinglhs_dilationrhs_dilationfeature_group_countdimension_numbersprecision_configc
                 r   t         j                   xs t        j                         }
|
j                  }|j                  r%	 t	        j
                  |
d|	| ||||||d|d|      }|S t        | |||||||||	f
d      }|t        ur|S t/        j0                  |d      }t/        j0                  |d      }	 t3        j4                  d| |||||||||	      \  }}}}|dd }t/        j6                         rjd|j9                  d      d	|j9                  d	      d|j;                  d      d|j;                  d      f}|j<                  }t/        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 rt        t         f$ rP t#        j$                  t&        dt)        | |||||||||	
            }|t"        j*                  j,                  ur|cY S  w xY w# t        t         f$ rP t#        j$                  t&        dt)        | |||||||||	
            }|t"        j*                  j,                  ur|cY S  w xY w)
a  Wraps the XLA ConvGeneralDilated operator, documented at

   https://www.tensorflow.org/performance/xla/operation_semantics#conv_convolution
  .

  Args:
    lhs: A `Tensor`. Must be one of the following types: `float32`, `float64`, `int32`, `uint8`, `int16`, `int8`, `complex64`, `int64`, `qint8`, `quint8`, `qint32`, `bfloat16`, `qint16`, `quint16`, `uint16`, `complex128`, `half`, `uint32`, `uint64`.
      the input tensor
    rhs: A `Tensor`. Must have the same type as `lhs`. the kernel tensor
    window_strides: A `Tensor`. Must be one of the following types: `int32`, `int64`.
      the inter-window strides
    padding: A `Tensor`. Must have the same type as `window_strides`.
      the padding to apply at the start and end of each input dimensions
    lhs_dilation: A `Tensor`. Must have the same type as `window_strides`.
      dilation to apply between input elements
    rhs_dilation: A `Tensor`. Must have the same type as `window_strides`.
      dilation to apply between kernel elements
    feature_group_count: A `Tensor`. Must have the same type as `window_strides`.
      number of feature groups for grouped convolution.
    dimension_numbers: A `string`.
      a serialized xla::ConvolutionDimensionNumbers proto.
    precision_config: A `string`. a serialized xla::PrecisionConfig proto.
    name: A name for the operation (optional).

  Returns:
    A `Tensor`. Has the same type as `lhs`.
  XlaConvr   r   Nr   r   r!   r"   r#   )
ro   rp   r   r   r   r   r   r   r   r!   r$   rt   ) r%   r   r&   r'   r   r(   r)   r*   r+   r,   r-   _dispatcher_for_xla_convr/   xla_conv_eager_fallbackr1   r2   r3   r4   r   r   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   )ro   rp   r   r   r   r   r   r   r   r!   rA   rB   rC   rD   rE   rF   rG   rH   rI   s                      rJ   r   r      s(   > 
			0h..0$#\\	11isCl$79L-/?Ag n@ '	c>7L,.0@$	IJNPG n$n''(9;NO&&'79KL
)::sN" ,':%6$44AAq#x& QK'""$3%%c*J  ,.All./1Cll-.0F ::L<2('	.K && -
##At,,## 
(^WlL
02BDK
g 
	&$
sNG\<
1B+$DB B ## 
z" ""b$3C.<g,8,83F1B0@tMg 
	..<<	<< Z	  
  
B#n%,<*61D/@.>TK
G i,,:::n	
sP    #E 1%I F&2FF&%F&*G  
G   I6AIIAJ64J6zraw_ops.XlaConvc                     t        j                  |d      }t        j                  |d      }t        j                  | |g|
t        j                  t        j
                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                   t        j"                  t        j$                  t        j&                  t        j(                  t        j*                  t        j,                  g      \  }}|\  } }t        j                  |||||g|
t        j                  t        j                  g      \  }}|\  }}}}}| ||||||g}d|d|d|d|f}t        j.                  dd|||
|	      }t        j0                         rt        j2                  d|||       |\  }|S )	Nr   r   r$   rt   s   XlaConvrM   rN   r   r8   r9   rQ   rR   rU   r{   rV   r|   r}   r~   r   r   r   r   r   rT   r   r   r   r   rS   rW   r   r   r<   r@   )ro   rp   r   r   r   r   r   r   r   r!   r"   rY   r   r   _inputs_TindicesrI   rH   rC   s                     rJ   r   r   s  s   ''(9;NO&&'79KL66Sz3ZaZiZikrkxkx  {B  {H  {H  JQ  JW  JW  Y`  Ye  Ye  gn  gx  gx  zA  zG  zG  IP  IV  IV  X_  Xf  Xf  ho  hv  hv  x  xH  xH  JQ  JX  JX  Za  Zi  Zi  kr  ky  ky  {B  {M  {M  OV  O[  O[  ]d  ]k  ]k  mt  m{  m{  I~  '9*3%-%D%DnV]_kmy  |O  FP  RU  X_  Xe  Xe  gn  gt  gt  Ww  &x"."O_L>7L,8KsNG\<Qde,*n6I')9;&Z<v!$41'""$<2('	.rZ   TV_XlaConvV2_LhsTTV_XlaConvV2_RhsTTV_XlaConvV2_Tindices#TV_XlaConvV2_preferred_element_typexla_conv_v2preferred_element_typebatch_group_countc                 X   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/        j0                  |d      }t/        j0                  |d      }t/        j2                  |	d      }	|
d
}
t/        j4                  |
d      }
	 t7        j8                  d| |||||||||	|
|	      \  }}}}|dd }t/        j:                         rd|j=                  d      d|j=                  d      d|j=                  d      d|j?                  d      d|j?                  d      d|j=                  d      d|jA                  d      f}|jB                  }t/        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$ rR t#        j$                  t&        dt)        | |||||||||	|
|	            }|t"        j*                  j,                  ur|cY S  w xY w# t        t         f$ rR t#        j$                  t&        dt)        | |||||||||	|
|	            }|t"        j*                  j,                  ur|cY S  w xY w)a  Wraps the XLA ConvGeneralDilated operator, documented at

   https://www.tensorflow.org/performance/xla/operation_semantics#conv_convolution
  .

  Args:
    lhs: A `Tensor`. Must be one of the following types: `float32`, `float64`, `int32`, `uint8`, `int16`, `int8`, `complex64`, `int64`, `qint8`, `quint8`, `qint32`, `bfloat16`, `qint16`, `quint16`, `uint16`, `complex128`, `half`, `uint32`, `uint64`.
      input tensor
    rhs: A `Tensor`. Must be one of the following types: `float32`, `float64`, `int32`, `uint8`, `int16`, `int8`, `complex64`, `int64`, `qint8`, `quint8`, `qint32`, `bfloat16`, `qint16`, `quint16`, `uint16`, `complex128`, `half`, `uint32`, `uint64`.
      kernel tensor
    window_strides: A `Tensor`. Must be one of the following types: `int32`, `int64`.
      inter-window strides
    padding: A `Tensor`. Must have the same type as `window_strides`.
      padding to apply at the start and end of each input dimensions
    lhs_dilation: A `Tensor`. Must have the same type as `window_strides`.
      dilation to apply between input elements
    rhs_dilation: A `Tensor`. Must have the same type as `window_strides`.
      dilation to apply between kernel elements
    feature_group_count: A `Tensor`. Must have the same type as `window_strides`.
      number of feature groups for grouped convolution.
    dimension_numbers: A `string`.
      serialized xla::ConvolutionDimensionNumbers proto.
    precision_config: A `string`. serialized xla::PrecisionConfig proto.
    preferred_element_type: A `tf.DType` from: `tf.float32, tf.float64, tf.int32, tf.uint8, tf.int16, tf.int8, tf.complex64, tf.int64, tf.qint8, tf.quint8, tf.qint32, tf.bfloat16, tf.qint16, tf.quint16, tf.uint16, tf.complex128, tf.half, tf.uint32, tf.uint64`.
      type of the tensor.
    batch_group_count: An optional `int`. Defaults to `1`.
      number of batch groups or grouped filters.
    name: A name for the operation (optional).

  Returns:
    A `Tensor` of type `preferred_element_type`.
  	XlaConvV2r   r   r   r   N)r   r   r   r   r!   r"   r#   )ro   rp   r   r   r   r   r   r   r   r   r   r!   rM   LhsTRhsTrt   )#r%   r   r&   r'   r   r(   r)   r*   r+   r,   r-   _dispatcher_for_xla_conv_v2r/   xla_conv_v2_eager_fallbackr1   r2   r3   r4   r   r   r5   r6   r7   r8   r9   r   r   r:   r;   r<   r=   r>   r   r?   r@   )ro   rp   r   r   r   r   r   r   r   r   r   r!   rA   rB   rC   rD   rE   rF   rG   rH   rI   s                        rJ   r   r     s   H 
			0h..0$#\\11k4c>7l$79L-/? "8:Mg nJ *	c>7L,.0@ 14	:;?AG n$n''(9;NO&&'79KL#--.DF^_''(9;NO
)::#n$<".)<'8&6,B'8tEAq#x2 QK'""$c((0&  (*  ,.All./1Cll-.0H  !9:!3#4#45H#IKF ::L\674('	.q && -
##At,,## 
+^WlL
02B
 "3T<=ACg 
	&'
sNG\<
1B+!7-DdD D ## 
z" ""Tcs1?*1/;6I4E3C9O4E'+	-g 
	..<<	<P Z	  
  
r4CS/=(/l-94G2C1A7M2C%)	+
G i,,:::n	
sP    'G
 ''K 
HG88HH!I 7I K%AKKAL)'L)zraw_ops.XlaConvV2c                    t        j                  |d      }t        j                  |d      }t        j                  |	d      }	|
d}
t        j                  |
d      }
t        j                  | g|t
        j                  t
        j                  t
        j                  t
        j                  t
        j                  t
        j                  t
        j                  t
        j                  t
        j                  t
        j                  t
        j                   t
        j"                  t
        j$                  t
        j&                  t
        j(                  t
        j*                  t
        j,                  t
        j.                  t
        j0                  g      \  }\  } t        j                  |g|t
        j                  t
        j                  t
        j                  t
        j                  t
        j                  t
        j                  t
        j                  t
        j                  t
        j                  t
        j                  t
        j                   t
        j"                  t
        j$                  t
        j&                  t
        j(                  t
        j*                  t
        j,                  t
        j.                  t
        j0                  g      \  }\  }t        j                  |||||g|t
        j                  t
        j                  g      \  }}|\  }}}}}| ||||||g}d|d|d|d|d|d|	d|
f}t        j2                  d	d||||
      }t        j4                         rt        j6                  d|||       |\  }|S )Nr   r   r   rM   r   r   r   rt   s	   XlaConvV2rN   r   )r8   r9   r   r   rQ   rR   rU   r{   rV   r|   r}   r~   r   r   r   r   r   rT   r   r   r   r   rS   rW   r   r   r<   r@   )ro   rp   r   r   r   r   r   r   r   r   r   r!   r"   
_attr_LhsT
_attr_RhsTr   r   rI   rH   rC   s                       rJ   r   r     s}   ''(9;NO&&'79KL#--.DF^_''(9;NO66ucGOOU\UdUdfmfsfsu|  vC  vC  EL  ER  ER  T[  T`  T`  bi  bs  bs  u|  uB  uB  DK  DQ  DQ  SZ  Sa  Sa  cj  cq  cq  sz  sC  sC  EL  ES  ES  U\  Ud  Ud  fm  ft  ft  v}  vH  vH  JQ  JV  JV  X_  Xf  Xf  ho  hv  hv  Dy  z*fs66ucGOOU\UdUdfmfsfsu|  vC  vC  EL  ER  ER  T[  T`  T`  bi  bs  bs  u|  uB  uB  DK  DQ  DQ  SZ  Sa  Sa  cj  cq  cq  sz  sC  sC  EL  ES  ES  U\  Ud  Ud  fm  ft  ft  v}  vH  vH  JQ  JV  JV  X_  Xf  Xf  ho  hv  hv  Dy  z*fs%-%D%DnV]_kmy  |O  FP  RU  X_  Xe  Xe  gn  gt  gt  Ww  &x"."O_L>7L,8KsNG\<Qde,J
J%'8:L,.D(*& \1\#)s?'""$\674('	.rZ   ) TV_XlaCustomCall_dtyper   _atypes.Boolr_   r`   _atypes.Float16r   ra   _atypes.Float8e4m3b11fnuz_atypes.Float8e4m3fn_atypes.Float8e4m3fnuz_atypes.Float8e5m2_atypes.Float8e5m2fnuzr   rb   r   _atypes.Int4rc   rd   re   rf   rg   rh   ri   _atypes.Resource_atypes.Stringrj   r   _atypes.UInt4rk   rl   _atypes.Variantxla_custom_calltarget_namebackend_configdtypec                    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/        j0                  |d      }t/        j0                  |d      }t/        j2                  |d      }t/        j4                  |d      }	 t7        j8                  d| |||||	      \  }
}
}}|dd }t/        j:                         r{d|j=                  d      d|j=                  d      d
|j=                  d
      d|j?                  d      d|j=                  d      f
}|j@                  }t/        jB                  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# t        t         f$ rL t#        j$                  t&        dt)        | |||||	            }|t"        j*                  j,                  ur|cY S  w xY w)a  Wraps the XLA CustomCall operator

    documented at https://www.tensorflow.org/xla/operation_semantics#customcall.

  Args:
    args: A list of `Tensor` objects.
      A list of `Tensor` with possibly different types.
    target_name: A `string`.
      Name of the function. A call instruction will be emitted which
      targets this symbol name.
    backend_config: A `string`.
      String, used to encode serialized metadata to the backend.
    dtype: A `tf.DType`. Output tensor data type.
    shape: A `tf.TensorShape` or list of `ints`. Output tensor shape.
    name: A name for the operation (optional).

  Returns:
    A `Tensor` of type `dtype`.
  XlaCustomCallr   r   r   shapeN)r   r   r   r   r!   r"   r#   )r   r   r   r   r   r!   r$   )"r%   r   r&   r'   r   r(   r)   r*   r+   r,   r-   _dispatcher_for_xla_custom_callr/   xla_custom_call_eager_fallbackr1   r2   r3   r4   r   r   r5   r6   r7   r8   r9   r   r   r:   r;   r<   r>   r=   r?   r@   )r   r   r   r   r   r!   rA   rB   rC   rD   rE   rF   rG   rH   rI   s                  rJ   r   r   3  s   . 
			0h..0$#\\11otT=+.'5'5Jg n2 .	{NE5$@$HGn$n!!+}=+$$^5EF.


UG
,%


eW
-%
)::d(6e$41Aq#x QK'""$S\\-8:Jll+,c3<<3Dg  )7CLL4IKF ::Lvw8('	.q && -
##At,,## 
/neUD
BDJg		&+
KU49 9 ## 
z" ""R4[5C,1T"Kg
 
	..<<	<0 Z	  
  
2t;3A*/u4 I
G
 i,,:::n	
sP    !F !I> G%G  GGH 9H I;!AI;9I;>AKKzraw_ops.XlaCustomCallc           
         t        j                  |d      }t        j                  |d      }t        j                  |d      }t        j                  |d      }t        j                  | |      \  }} t        |       }d|d|d|d|d|f
}	t        j                  dd||	||      }
t        j                         rt        j                  d	||	|
       |
\  }
|
S )
Nr   r   r   r   r$   s   XlaCustomCallrM   rN   r   )	r8   r9   r   r   r   r   r   r<   r@   )r   r   r   r   r   r!   r"   rY   rI   rH   rC   s              rJ   r   r     s    !!+}=+$$^5EF.


UG
,%


eW
-%99$D-'4d,;(8.#	7E7E+&-q#)s?'""$vw8('	.rZ   xla_custom_call_v2call_target_namehas_side_effectc                    t         j                   xs t        j                         }|j                  }|j                  r%	 t	        j
                  |d|| d|d|d|d|d|      }	|	S t        | ||||||fd      }	|	t        ur|	S t/        j0                  |d      }t/        j0                  |d      }t/        j2                  |d      }t5        |t6        t8        f      st        d|z        |D cg c]  }t/        j:                  |d       }}t5        |t6        t8        f      st        d|z        |D cg c]  }t/        j<                  |d       }}	 t?        j@                  d| ||||||
      \  }}}}|dd }	t/        jB                         rd|jE                  d      d|jE                  d      d|jG                  d      d|jE                  d      d|jE                  d      d|jE                  d      f}|jH                  }t/        jJ                  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$ rM t#        j$                  t&        d	t)        | ||||||
            }	|	t"        j*                  j,                  ur|	cY S  w xY wc c}w c c}w # t        t         f$ rM t#        j$                  t&        d	t)        | ||||||
            }	|	t"        j*                  j,                  ur|	cY S  w xY w)a  Emits an HLO `CustomCall` operation with multiple outputs.

  As opposed to `XlaCustomCall`, this operation supports multiple outputs.

  See `CustomCall` specification at
    https://tensorflow.org/xla/operation_semantics#customcall,
  and `mhlo.custom_call` specification at
    https://tensorflow.org/mlir/hlo_ops#mhlocustom_call_mlirmhlocustomcallop.

  Args:
    operands: A list of `Tensor` objects.
      A sequence of tensors with possibly different types.
    call_target_name: A `string`.
      Name of the user function. The function signature must conform
      to version 3 of the API, see `API_VERSION_STATUS_RETURNING_UNIFIED`. All
      operands and results assumed to be in the default layout.
    backend_config: A `string`.
      A string that encodes a metadata for the backend.
    has_side_effect: A `bool`.
      Indicates whether the custom call has side effects.
    result_dtypes: A list of `tf.DTypes`. Types of all results.
    result_shapes: A list of shapes (each a `tf.TensorShape` or list of `ints`).
      Shapes of all results.
    name: A name for the operation (optional).

  Returns:
    A list of `Tensor` objects of type `result_dtypes`.
  XlaCustomCallV2r   r   r   result_dtypesresult_shapesN)r   r   r   r   r   r!   r"   r#   )operandsr   r   r   r   r   r!   NExpected list for 'result_dtypes' argument to 'xla_custom_call_v2' Op, not %r.NExpected list for 'result_shapes' argument to 'xla_custom_call_v2' Op, not %r.operand_dtypes)&r%   r   r&   r'   r   r(   r)   r*   r+   r,   r-   "_dispatcher_for_xla_custom_call_v2r/   !xla_custom_call_v2_eager_fallbackr1   r2   r3   r4   r   r   r5   r6   r7   r8   r9   r   r   r   r   r   r   r:   r;   r<   r>   r   r?   r@   )r   r   r   r   r   r   r!   rA   rB   rC   rD   r   r   rE   rF   rG   rH   rI   s                     rJ   r   r     s   @ 
			0h..0$#\\
11x1C*N<M-	g
 n@ 1	#^_}d	-.24G n$n&&'79KL$$^5EF.&&8IJ/	MD%=	1
	+-:	;< < FSSr8%%b/:S-S	MD%=	1
	+-:	;< < GTT8&&r?;T-T
)::H,<*8+:)6)6TCAq#x& QK'""$ #,,/A"B-= >!3!34E!F-= >s||O<oll?+-F ::L<:	.c && -
##At,,## 
2%~
/046g 
	&.
%5'%]	 
 ## 
z" ""D(:J8F9H7D7D.2%4g 
	..<<	<6 T
 U Z	  
  
b$8H6D7F5B5B#O
G i,,:::n	
s\    #H +L
2L"L I".I		I"!I"&J J L,ALLAM0.M0zraw_ops.XlaCustomCallV2c                    t        j                  |d      }t        j                  |d      }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|d|f}t        j                  d	t        |      ||||
      }t        j                         rt        j                  d|||       |S c c}w c c}	w )Nr   r   r   r   r   r   r   r   s   XlaCustomCallV2rN   r   )r8   r9   r   r   r   r   r2   r   r   r   r   r   r<   r@   )r   r   r   r   r   r   r!   r"   r   r   _attr_operand_dtypesrI   rH   rC   s                 rJ   r   r   #  sz   &&'79KL$$^5EF.&&8IJ/	MD%=	1
	+-:	;< < FSSr8%%b/:S-S	MD%=	1
	+-:	;< < GTT8&&r?;T-T#+#J#J8UX#Y h, 02B#_6F& /]1C$0C"&(' ""$<:	.% T
 Us   +E2Exla_dequantize	min_range	max_rangetranspose_outputc                    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/        j0                  |d      }t/        j0                  |d      }t/        j2                  |d      }t/        j4                  |d      }	 t7        j8                  d| |||||	      \  }
}
}}|dd }t/        j:                         rjd|j=                  d      d|j=                  d      d|j=                  d      d|j?                  d      f}|j@                  }t/        jB                  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# t        t         f$ rL t#        j$                  t&        dt)        | |||||	            }|t"        j*                  j,                  ur|cY S  w xY w)
a  Takes the packed uint32 input and unpacks the input to uint8 to do

  Dequantization on device.

  Args:
    input: A `Tensor` of type `uint32`.
      Input tensors whose types is uint32, shape is [d0, ..., dn].
    min_range: A `float`.
      The minimum scalar value possibly produced for the input.
    max_range: A `float`.
      The maximum scalar value possibly produced for the input.
    mode: A `string`.
      String to determine the dequantize mode in {"MIN_COMBINED", "MIN_FIRST", "SCALED"}.
    transpose_output: A `bool`.
      Boolean to determine if output is transposed. transpose_output
      is faster when input is large and rank of input is higher than 1.
    name: A name for the operation (optional).

  Returns:
    A `Tensor` of type `bfloat16`.
    Output tensors whose types is bfloat16. If transpose_output is true,
    output shape is [dn * 4, dn-1, ..., d1, d0]. If transpose_output
    is false, output shape is [d0,..., dn * 4].
  XlaDequantizer   r   r   r   N)r   r   r   r   r!   r"   r#   )r   r   r   r   r   r!   )"r%   r   r&   r'   r   r(   r)   r*   r+   r,   r-   _dispatcher_for_xla_dequantizer/   xla_dequantize_eager_fallbackr1   r2   r3   r4   r   r   r5   r6   r7   r8   
make_floatr9   r   r:   r;   r<   r>   r   r?   r@   )r   r   r   r   r   r!   rA   rB   rC   rD   rE   rF   rG   rH   rI   s                  rJ   r   r   @  s   8 
			0h..0$#\\	11otUKY.@g n4 -		9d,<dDdLGn$n!!)[9)!!)[9)			4	($''(8:LM
)::u	#,4*:GAq#x QK'""$3<<4kll;'f1E #"4"45G"HJF ::Lvw8('	.u && -
##At,,## 
.)Y.>
FNg		&*
9	+$DB B ## 
z" 	""B5I/8t6F*.!0g 
	..<<	<	2 Z	  	
  
"d)-6T4D(,.
G i,,:::n		
sP    !F !I- GF//GGG: (G: :I*AI*(I*-AKKzraw_ops.XlaDequantizec                    t        j                  |d      }t        j                  |d      }t        j                  |d      }t        j                  |d      }t	        j
                  | t        j                        } | g}d|d|d|d|f}t        j                  dd||||      }	t        j                         rt        j                  d|||	       |	\  }	|	S )	Nr   r   r   r   s   XlaDequantizerM   rN   r   )r8   r   r9   r   r+   rX   rR   rW   r   r<   r@   )
r   r   r   r   r   r!   r"   rI   rH   rC   s
             rJ   r   r     s    !!)[9)!!)[9)			4	($''(8:LM

 
 
7%,KFD&(&-q#)s?'""$vw8('	.rZ   TV_XlaDot_Txla_dotc                 
   t         j                   xs t        j                         }|j                  }|j                  r 	 t	        j
                  |d|| |d|d|	      }|S t        | ||||fd      }|t        ur|S t/        j0                  |d      }t/        j0                  |d      }	 t3        j4                  d| ||||      \  }	}	}
}|dd }t/        j6                         rYd|
j9                  d      d|
j;                  d      d|
j;                  d      f}|
j<                  }t/        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 Rt        t         f$ rK t#        j$                  t&        dt)        | ||||            }|t"        j*                  j,                  ur|cY S  w xY w# t        t         f$ rK t#        j$                  t&        dt)        | ||||            }|t"        j*                  j,                  ur|cY S  w xY w)	a  Wraps the XLA DotGeneral operator, documented at

   https://www.tensorflow.org/performance/xla/operation_semantics#dotgeneral
  .

  Args:
    lhs: A `Tensor`. Must be one of the following types: `float32`, `float64`, `int32`, `uint8`, `int16`, `int8`, `complex64`, `int64`, `qint8`, `quint8`, `qint32`, `bfloat16`, `qint16`, `quint16`, `uint16`, `complex128`, `half`, `uint32`, `uint64`.
      the LHS tensor
    rhs: A `Tensor`. Must have the same type as `lhs`. the RHS tensor
    dimension_numbers: A `string`.
      a serialized xla::DotDimensionNumbers proto.
    precision_config: A `string`. a serialized xla::PrecisionConfig proto.
    name: A name for the operation (optional).

  Returns:
    A `Tensor`. Has the same type as `lhs`.
  XlaDotr   r   Nr   r#   )ro   rp   r   r   r!   r$   ) r%   r   r&   r'   r   r(   r)   r*   r+   r,   r-   _dispatcher_for_xla_dotr/   xla_dot_eager_fallbackr1   r2   r3   r4   r   r  r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   )ro   rp   r   r   r!   rA   rB   rC   rD   rE   rF   rG   rH   rI   s                 rJ   r  r    s   * 
			0h..0$#\\11hc3(;-/?Ag n2 &	c$&6>FGn$n''(9;NO&&'79KL
)::cs6G#3$@Aq#x QK'""$3%%c*,?ll./1Cll-.0F ::L,1('	.k && -
##At,,## 
'&(8$
@$Hg		&#
s&7+$DB B ## 
z" ""R#30A/?dLg
 
	..<<	<* Z	  
  
2t.?-=DJ
G
 i,,:::n	
rK   zraw_ops.XlaDotc                    t        j                  |d      }t        j                  |d      }t        j                  | |g|t        j                  t        j
                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                   t        j"                  t        j$                  t        j&                  t        j(                  t        j*                  t        j,                  g      \  }}|\  } }| |g}d|d|d|f}	t        j.                  dd||	||      }
t        j0                         rt        j2                  d||	|
       |
\  }
|
S )Nr   r   r$   s   XlaDotrM   rN   r  r   )ro   rp   r   r   r!   r"   rY   r   rI   rH   rC   s              rJ   r  r    s/   ''(9;NO&&'79KL66Sz3ZaZiZikrkxkx  {B  {H  {H  JQ  JW  JW  Y`  Ye  Ye  gn  gx  gx  zA  zG  zG  IP  IV  IV  X_  Xf  Xf  ho  hv  hv  x  xH  xH  JQ  JX  JX  Za  Zi  Zi  kr  ky  ky  {B  {M  {M  OV  O[  O[  ]d  ]k  ]k  mt  m{  m{  I~  '9*3s,-/@&(&Y,f!$41'""$,1('	.rZ   TV_XlaDotV2_LhsTTV_XlaDotV2_RhsT"TV_XlaDotV2_preferred_element_type
xla_dot_v2c                    t         j                   xs t        j                         }|j                  }|j                  r"	 t	        j
                  |d|| |d|d|d|      }|S t        | |||||fd      }|t        ur|S t/        j0                  |d      }t/        j0                  |d      }t/        j2                  |d      }	 t5        j6                  d| |||||      \  }
}
}}|dd }t/        j8                         r{d	|j;                  d	      d
|j;                  d
      d|j=                  d      d|j=                  d      d|j;                  d      f
}|j>                  }t/        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$ rL t#        j$                  t&        dt)        | |||||            }|t"        j*                  j,                  ur|cY S  w xY w# t        t         f$ rL t#        j$                  t&        dt)        | |||||            }|t"        j*                  j,                  ur|cY S  w xY w)a  Wraps the XLA DotGeneral operator, documented at

   https://www.tensorflow.org/performance/xla/operation_semantics#dotgeneral
  .

  Args:
    lhs: A `Tensor`. Must be one of the following types: `float32`, `float64`, `int32`, `uint8`, `int16`, `int8`, `complex64`, `int64`, `qint8`, `quint8`, `qint32`, `bfloat16`, `qint16`, `quint16`, `uint16`, `complex128`, `half`, `uint32`, `uint64`.
      the LHS tensor
    rhs: A `Tensor`. Must be one of the following types: `float32`, `float64`, `int32`, `uint8`, `int16`, `int8`, `complex64`, `int64`, `qint8`, `quint8`, `qint32`, `bfloat16`, `qint16`, `quint16`, `uint16`, `complex128`, `half`, `uint32`, `uint64`.
      the RHS tensor
    dimension_numbers: A `string`.
      a serialized xla::DotDimensionNumbers proto.
    precision_config: A `string`. a serialized xla::PrecisionConfig proto.
    preferred_element_type: A `tf.DType` from: `tf.float32, tf.float64, tf.int32, tf.uint8, tf.int16, tf.int8, tf.complex64, tf.int64, tf.qint8, tf.quint8, tf.qint32, tf.bfloat16, tf.qint16, tf.quint16, tf.uint16, tf.complex128, tf.half, tf.uint32, tf.uint64`.
      The type of the tensor.
    name: A name for the operation (optional).

  Returns:
    A `Tensor` of type `preferred_element_type`.
  XlaDotV2r   r   r   N)r   r   r   r!   r"   r#   )ro   rp   r   r   r   r!   r   r   )!r%   r   r&   r'   r   r(   r)   r*   r+   r,   r-   _dispatcher_for_xla_dot_v2r/   xla_dot_v2_eager_fallbackr1   r2   r3   r4   r   r  r5   r6   r7   r8   r9   r   r:   r;   r<   r=   r>   r?   r@   )ro   rp   r   r   r   r!   rA   rB   rC   rD   rE   rF   rG   rH   rI   s                  rJ   r  r  &  s   0 
			0h..0$#\\	11j$S*=-/? "8:g n: )	c$&6	'(,.G n$n''(9;NO&&'79KL#--.DF^_
)::8I%5+ANAq#x QK'""$c((0&  (*=ll./1Cll-.0H  !9:	<F
 ::LL&'3('	.A && -
##At,,## 
*&(8
 $)*.0g 
	&&
s&7+!7dN N ## 
z" 
""DSc3D2B8N&*	,g 
	..<<	<
4 Z	  

  
b$3C1B0@6L$(	*
G i,,:::n	

sP     E;  !I' ;GF))GGG4 "G4 4I$
AI$"I$'AK Kzraw_ops.XlaDotV2c                 (   t        j                  |d      }t        j                  |d      }t        j                  |d      }t        j                  | g|t        j
                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                   t        j"                  t        j$                  t        j&                  t        j(                  t        j*                  t        j,                  t        j.                  g      \  }\  } t        j                  |g|t        j
                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                   t        j"                  t        j$                  t        j&                  t        j(                  t        j*                  t        j,                  t        j.                  g      \  }\  }| |g}	d|d|d|d|d|f
}
t        j0                  dd|	|
||      }t        j2                         rt        j4                  d	|	|
|       |\  }|S )
Nr   r   r   r   r   s   XlaDotV2rM   rN   r  )r8   r9   r   rQ   rR   rU   r{   rV   r|   r}   r~   r   r   r   r   r   rT   r   r   r   r   rS   rW   r   r   r<   r@   )ro   rp   r   r   r   r!   r"   r   r   rI   rH   rC   s               rJ   r  r    s   ''(9;NO&&'79KL#--.DF^_66ucGOOU\UdUdfmfsfsu|  vC  vC  EL  ER  ER  T[  T`  T`  bi  bs  bs  u|  uB  uB  DK  DQ  DQ  SZ  Sa  Sa  cj  cq  cq  sz  sC  sC  EL  ES  ES  U\  Ud  Ud  fm  ft  ft  v}  vH  vH  JQ  JV  JV  X_  Xf  Xf  ho  hv  hv  Dy  z*fs66ucGOOU\UdUdfmfsfsu|  vC  vC  EL  ER  ER  T[  T`  T`  bi  bs  bs  u|  uB  uB  DK  DQ  DQ  SZ  Sa  Sa  cj  cq  cq  sz  sC  sC  EL  ES  ES  U\  Ud  Ud  fm  ft  ft  v}  vH  vH  JQ  JV  JV  X_  Xf  Xf  ho  hv  hv  Dy  z*fss,J
4G')924& [!L#)s?'""$L&'3('	.rZ   ) TV_XlaDynamicSlice_Tr   r   r_   r`   r   r   ra   r   r   r   r   r   r   rb   r   r   rc   rd   re   rf   rg   rh   ri   r   r   rj   r   r   rk   rl   r   TV_XlaDynamicSlice_Tindicesxla_dynamic_slicestart_indicessize_indicesc                 ~   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                         rHd|	j7                  d      d|	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$ rJ t#        j$                  t&        dt)        | |||            }|t"        j*                  j,                  ur|cY S  w xY w# t        t         f$ rJ t#        j$                  t&        dt)        | |||            }|t"        j*                  j,                  ur|cY S  w xY w)a%  Wraps the XLA DynamicSlice operator, documented at

   https://www.tensorflow.org/performance/xla/operation_semantics#dynamicslice
  .

  DynamicSlice extracts a sub-array from the input array at dynamic
  start_indices. The size of the slice in each dimension is passed in
  size_indices, which specify the end point of exclusive slice intervals in each
  dimension -- [start, start + size). The shape of start_indices must have rank 1,
  with dimension size equal to the rank of operand.

  Args:
    input: A `Tensor`. A `Tensor` of type T.
    start_indices: A `Tensor`. Must be one of the following types: `int32`, `int64`.
      List of N integers containing the slice size for each
      dimension. Each value must be strictly greater than zero, and start + size
      must be less than or equal to the size of the dimension to avoid
      implementation defined behavior.
    size_indices: A `Tensor`. Must have the same type as `start_indices`.
    name: A name for the operation (optional).

  Returns:
    A `Tensor`. Has the same type as `input`.
  XlaDynamicSliceNrs   r#   )r   r  r  r!   r$   rt   )r%   r   r&   r'   r   r(   r)   r*   r+   r,   r-   !_dispatcher_for_xla_dynamic_slicer/    xla_dynamic_slice_eager_fallbackr1   r2   r3   r4   r   r  r5   r6   r7   r:   r;   r8   r<   r=   r?   r@   )r   r  r  r!   rA   rB   rC   rD   rE   rF   rG   rH   rI   s                rJ   r  r    sY   8 
			0h..0$#\\11um\Kgn0 0	|T3T;Gn$n
)::m(44AAq#x QK'""$3%%c*J  ,.F::L<:('	.c && -
##At,,## 
1-t
5t=g		&-
4TC C## 
z" ""r4e6C5A$Ng
 
	..<<	<& Z	  
  
RE4A3?d"L
G
 i,,:::n	
P    C= 7G# =ED++EEE2 "E2 2G AG G #AH<:H<zraw_ops.XlaDynamicSlicec                 j   t        j                  | g|g       \  }\  } t        j                  ||g|t        j                  t        j                  g      \  }}|\  }}| ||g}d|d|f}	t        j
                  dd||	||      }
t        j                         rt        j                  d||	|
       |
\  }
|
S )Nr$   rt   s   XlaDynamicSlicerM   rN   r  r8   rQ   rR   rV   r   r   r<   r@   )r   r  r  r!   r"   rY   r   r   rI   rH   rC   s              rJ   r  r    s    55ugsBG'8E%-%D%DmUaEbdgjqjwjw  zA  zG  zG  jJ  &K".""2=,5,*n5&/<#)s?'""$<:('	.rZ   ) TV_XlaDynamicUpdateSlice_Tr   r   r_   r`   r   r   ra   r   r   r   r   r   r   rb   r   r   rc   rd   re   rf   rg   rh   ri   r   r   rj   r   r   rk   rl   r   !TV_XlaDynamicUpdateSlice_Tindicesxla_dynamic_update_sliceupdateindicesc                 ~   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                         rHd|	j7                  d      d|	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$ rJ t#        j$                  t&        dt)        | |||            }|t"        j*                  j,                  ur|cY S  w xY w# t        t         f$ rJ t#        j$                  t&        dt)        | |||            }|t"        j*                  j,                  ur|cY S  w xY w)a  Wraps the XLA DynamicUpdateSlice operator, documented at

   https://www.tensorflow.org/performance/xla/operation_semantics#dynamicupdateslice
  .

  XlaDynamicUpdateSlice generates a result which is the value of the `input`
  operand, with a slice update overwritten at `indices`. The shape of `update`
  determines the shape of the sub-array of the result which is updated. The shape
  of indices must be rank == 1, with dimension size equal to the rank of `input`.

  Handling of out-of-bounds slice indices is implementation-defined.

  Args:
    input: A `Tensor`. A `Tensor` of type T.
    update: A `Tensor`. Must have the same type as `input`.
      A `Tensor` of type T. Same rank as `input`.
    indices: A `Tensor`. Must be one of the following types: `int32`, `int64`.
      A vector of indices into `input`. Must have length equal to the rank of
      `input`.
    name: A name for the operation (optional).

  Returns:
    A `Tensor`. Has the same type as `input`. A `Tensor` of type T.
  XlaDynamicUpdateSliceNrs   r#   )r   r!  r"  r!   r$   rt   )r%   r   r&   r'   r   r(   r)   r*   r+   r,   r-   (_dispatcher_for_xla_dynamic_update_slicer/   'xla_dynamic_update_slice_eager_fallbackr1   r2   r3   r4   r   r   r5   r6   r7   r:   r;   r8   r<   r=   r?   r@   )r   r!  r"  r!   rA   rB   rC   rD   rE   rF   rG   rH   rI   s                rJ   r   r     sU   8 
			0h..0$#\\11%tUFGEgn. 7	'/Gn$n
)::uVW&*,Aq#x QK'""$3%%c*J  ,.F::Lvw@('	._ && -
##At,,## 
8&'4
)41g		&4
t7 7## 
z" ""$b$U67>T+Kg 
	..<<	<$ Z	  
  
"B55<4)I
G i,,:::n	
r  zraw_ops.XlaDynamicUpdateSlicec                 j   t        j                  | |g|g       \  }}|\  } }t        j                  |g|t        j                  t        j                  g      \  }\  }| ||g}d|d|f}	t        j
                  dd||	||      }
t        j                         rt        j                  d||	|
       |
\  }
|
S )Nr$   rt   s   XlaDynamicUpdateSlicerM   rN   r$  r  )r   r!  r"  r!   r"   rY   r   r   rI   rH   rC   s              rJ   r&  r&  g  s    66vRP'9/5&'>>y#PWP]P]_f_l_lOop.*7),*n5&5q#)s?'""$vw@('	.rZ   TV_XlaEinsum_T
xla_einsumabequationc                    t         j                   xs t        j                         }|j                  }|j                  r	 t	        j
                  |d|| |d|      }|S t        | |||fd      }|t        ur|S t/        j0                  |d      }	 t3        j4                  d| |||      \  }}}	}
|
dd }t/        j6                         rHd|	j9                  d      d|	j;                  d      f}|	j<                  }t/        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$ rJ t#        j$                  t&        dt)        | |||            }|t"        j*                  j,                  ur|cY S  w xY w# t        t         f$ rJ t#        j$                  t&        dt)        | |||            }|t"        j*                  j,                  ur|cY S  w xY w)a  An op which supports basic einsum op with 2 inputs and 1 output.

  This op has better TPU performance since it doesn't have explicitly reshape and
  transpose operations as tf.einsum does.

  Args:
    a: A `Tensor`. Must be one of the following types: `complex64`, `bfloat16`, `float32`.
    b: A `Tensor`. Must have the same type as `a`.
    equation: A `string`.
    name: A name for the operation (optional).

  Returns:
    A `Tensor`. Has the same type as `a`.
  	XlaEinsumr,  N)r,  r!   r"   r#   )r*  r+  r,  r!   r$   ) r%   r   r&   r'   r   r(   r)   r*   r+   r,   r-   _dispatcher_for_xla_einsumr/   xla_einsum_eager_fallbackr1   r2   r3   r4   r   r)  r5   r6   r7   r8   r9   r:   r;   r<   r>   r=   r?   r@   )r*  r+  r,  r!   rA   rB   rC   rD   rE   rF   rG   rH   rI   s                rJ   r)  r)  x  s[   $ 
			0h..0$#\\11k4Az8=gn, )	
Ax'Gn$nx4(	
)::qAt=Aq#x QK'""$#,,z2C  %'F::L\674('	.[ && -
##At,,## 
*a4
!4)g		&&
Q$8 8## 
z" ""D1H4Hg 
	..<<	<" Z	  
  
b$a(F
G i,,:::n	
sP    D G: E'EEEF	 9F	 	G7AG75G7:AIIzraw_ops.XlaEinsumc                 x   t        j                  |d      }t        j                  | |g|t        j                  t        j
                  t        j                  g      \  }}|\  } }| |g}d|d|f}t        j                  dd||||      }	t        j                         rt        j                  d|||	       |	\  }	|	S )Nr,  r$   s	   XlaEinsumrM   rN   r.  )
r8   r9   rQ   rR   r   rT   rU   r   r<   r@   )
r*  r+  r,  r!   r"   rY   r   rI   rH   rC   s
             rJ   r0  r0    s    x4(661vsWEVEVX_XhXhjqjyjyD|}'9&1aQ,#w/&\1\#)s?'""$\674('	.rZ   TV_XlaGather_Tr   TV_XlaGather_Tindices
xla_gatheroperandslice_sizesindices_are_sortedc                 :   t         j                   xs t        j                         }|j                  }|j                  r!	 t	        j
                  |d|| ||d|d|
      }|S t        | |||||fd      }|t        ur|S t/        j0                  |d      }t/        j2                  |d      }	 t5        j6                  d| |||||      \  }
}
}}|dd }t/        j8                         rjd|j;                  d      d|j=                  d      d|j?                  d      d	|j?                  d	      f}|j@                  }t/        jB                  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 ft        t         f$ rL t#        j$                  t&        dt)        | |||||            }|t"        j*                  j,                  ur|cY S  w xY w# t        t         f$ rL t#        j$                  t&        dt)        | |||||            }|t"        j*                  j,                  ur|cY S  w xY w)
a  Wraps the XLA Gather operator documented at

    https://www.tensorflow.org/xla/operation_semantics#gather

  Args:
    operand: A `Tensor`. Must be one of the following types: `float32`, `float64`, `int32`, `uint8`, `int16`, `int8`, `complex64`, `int64`, `qint8`, `quint8`, `qint32`, `bfloat16`, `qint16`, `quint16`, `uint16`, `complex128`, `half`, `uint32`, `uint64`, `bool`.
      The array we're gathering from.
    start_indices: A `Tensor`. Must be one of the following types: `int32`, `int64`.
      Array containing the starting indices of the slices we gather.
    slice_sizes: A `Tensor`. Must have the same type as `start_indices`.
      slice_sizes[i] is the bounds for the slice on dimension i.
    dimension_numbers: A `string`.
      A serialized xla::GatherDimensionNumbers proto.
    indices_are_sorted: A `bool`.
      Boolean indicating if the indices are sorted.
    name: A name for the operation (optional).

  Returns:
    A `Tensor`. Has the same type as `operand`.
  	XlaGatherr   r7  N)r   r7  r!   r"   r#   )r5  r  r6  r   r7  r!   r$   rt   )"r%   r   r&   r'   r   r(   r)   r*   r+   r,   r-   _dispatcher_for_xla_gatherr/   xla_gather_eager_fallbackr1   r2   r3   r4   r   r4  r5   r6   r7   r8   r9   r   r:   r;   r<   r>   r   r=   r?   r@   )r5  r  r6  r   r7  r!   rA   rB   rC   rD   rE   rF   rG   rH   rI   s                  rJ   r4  r4    s   0 
			0h..0$#\\	11k4-.0Dg n: )	-.?D	#$(*G n$n''(9;NO))*<>RS
)::WM!,'8(:	GAq#x  QK'""$!3<<0C#D"C$6$67K$L3%%c*J  ,.F ::L\674('	. && -
##At,,## 
*M;0A
d%&*,g 
	&&
=+-/dF F ## 
z" 
""D-83D4F&*	,g 
	..<<	<
4 Z	  

  
b$wm+61B2D$(	*
G i,,:::n	

sP    E )!H? F&FFFG :G H<"AH<:H<?AJJzraw_ops.XlaGatherc                 "   t        j                  |d      }t        j                  |d      }t        j                  | g|t        j
                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                   t        j"                  t        j$                  t        j&                  t        j(                  t        j*                  t        j,                  t        j.                  t        j0                  g      \  }\  } t        j                  ||g|t        j                  t        j                  g      \  }}	|	\  }}| ||g}
d|d|d|d|f}t        j2                  dd|
|||      }t        j4                         rt        j6                  d|
||       |\  }|S )	Nr   r7  r$   rt   s	   XlaGatherrM   rN   r9  r8   r9   r   rQ   rR   rU   r{   rV   r|   r}   r~   r   r   r   r   r   rT   r   r   r   r   rS   rW   r   boolr   r<   r@   )r5  r  r6  r   r7  r!   r"   rY   r   r   rI   rH   rC   s                rJ   r;  r;  <  s   ''(9;NO))*<>RS 77	3ZaZiZikrkxkx  {B  {H  {H  JQ  JW  JW  Y`  Ye  Ye  gn  gx  gx  zA  zG  zG  IP  IV  IV  X_  Xf  Xf  ho  hv  hv  x  xH  xH  JQ  JX  JX  Za  Zi  Zi  kr  ky  ky  {B  {M  {M  OV  O[  O[  ]d  ]k  ]k  mt  m{  m{  }D  }I  }I  IL  M':G%-%D%DmU`Eacfipivivx  yF  yF  iI  &J"."!1=+=+6,!24Hc7J@&\1\#)s?'""$\674('	.rZ   ) TV_XlaIf_Tcondr   r   r_   r`   r   r   ra   r   r   r   r   r   r   rb   r   r   rc   rd   re   rf   rg   rh   ri   r   r   rj   r   r   rk   rl   r   xla_ifcondc                    t         j                   xs t        j                         }|j                  }|j                  r"	 t	        j
                  |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       }}
	 t9        j:                  d| |||||      \  }}}}|dd }|s|S t5        j<                         r{d
|j?                  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 # t        t         f$ rL t#        j$                  t&        dt)        | |||||            }|t"        j*                  j,                  ur|cY S  w xY w)a3  output = cond ? then_branch(inputs) : else_branch(inputs).

  Args:
    cond: A `Tensor`. A boolean scalar.
    inputs: A list of `Tensor` objects. A list of input tensors.
    then_branch: A function decorated with @Defun.
      A function takes 'inputs' and returns a list of tensors,
      whose types are the same as what else_branch returns.
    else_branch: A function decorated with @Defun.
      A function takes 'inputs' and returns a list of tensors.
      whose types are the same as what then_branch returns.
    Tout: A list of `tf.DTypes`.
    name: A name for the operation (optional).

  Returns:
    A list of `Tensor` objects of type `Tout`.
    A list of tensors returned by either then_branch(inputs) or
    else_branch(inputs). The input shapes of the then_branch and
    else_branch must match.
  XlaIfthen_branchelse_branchr   N)rD  rE  r   r!   r"   r#   )rA  r?   rD  rE  r   r!   9Expected list for 'Tout' argument to 'xla_if' Op, not %r.Tcondr   )#r%   r   r&   r'   r   r(   r)   r*   r+   r,   r-   _dispatcher_for_xla_ifr/   xla_if_eager_fallbackr1   r2   r3   r4   r   r@  r5   r6   r7   r   r   r   r8   r   r:   r;   r<   r=   r>   r?   r@   )rA  r?   rD  rE  r   r!   rA   rB   rC   rD   r   rE   rF   rG   rH   rI   s                   rJ   r@  r@  P  s   0 
			0h..0$#\\11gtT6=+{FD2g n2 %	v{Kt=tEGn$n	D4-	(
	!%	&' ' 48	8R(

R
(	8$	8
)::d6{(t$@Aq#x QK'	J""$s))'2Mll=)=ll=)5#,,u2Evll6"$F ::Lvw0	.s && -
##At,,## 
&k4
?Gg		&"
K[$D* * ## 
z" ""B$v)4+"&T3g
 
	..<<	<& 
9
 Z	  
  
"dV'2DJ
G i,,:::n	
sV     F  %I,!I1  GF..GGG9 'G9 9I)AI)'I)1AK
Kzraw_ops.XlaIfc           
         t        |t        t        f      st        d|z        |D cg c]  }t	        j
                  |d       }}t	        j                  | g|g       \  }\  } t	        j                  ||      \  }	}| gt        |      z   }
d|d|d|d|	d|f
}t	        j                  dt        |      |
|||      }t	        j                         rt	        j                  d	|
||       |S c c}w )
NrF  r   rG  rD  rE  r   s   XlaIfrN   rC  )r   r   r   r2   r8   r   rQ   r   r   r   r<   r@   )rA  r?   rD  rE  r   r!   r"   r   _attr_Tcondr   rI   rH   rC   s                rJ   rI  rI    s    	D4-	(
	!%	&' ' 48	8R(

R
(	8$	8!88$bI+w==fcJ)V$v,&,[-mui/&Xs4y#)s?'""$vw0	. 
9s   C+XlaKeyValueSortsorted_keyssorted_valuesTV_XlaKeyValueSort_K) TV_XlaKeyValueSort_Vr   r   r_   r`   r   r   ra   r   r   r   r   r   r   rb   r   r   rc   rd   re   rf   rg   rh   ri   r   r   rj   r   r   rk   rl   r   xla_key_value_sortkeysvaluesc           
         t         j                   xs t        j                         }|j                  }|j                  r1	 t	        j
                  |d|| |      }t        j                  |      }|S t        | ||fd      }|t        ur|S 	 t3        j4                  d| ||      \  }}}}	|	dd }t7        j8                         rHd|j;                  d      d|j;                  d      f}
|j<                  }t7        j>                  d||
|       t        j                  |      }|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$ rI t'        j(                  t*        dt-        | ||            }|t&        j.                  j0                  ur|cY S  w xY w# t"        t$        f$ rI t'        j(                  t*        dt-        | ||            }|t&        j.                  j0                  ur|cY S  w xY w)a  Wraps the XLA Sort operator, documented at

   https://www.tensorflow.org/performance/xla/operation_semantics#sort
  .

  Sorts a tensor. Currently only sorts in ascending order are supported.

  Args:
    keys: A `Tensor`. Must be one of the following types: `float32`, `float64`, `int32`, `uint8`, `int16`, `int8`, `int64`, `bfloat16`, `uint16`, `half`, `uint32`, `uint64`.
      A `Tensor` of type K.
    values: A `Tensor`. A `Tensor` of type V.
    name: A name for the operation (optional).

  Returns:
    A tuple of `Tensor` objects (sorted_keys, sorted_values).

    sorted_keys: A `Tensor`. Has the same type as `keys`. A `Tensor` of type K.
    sorted_values: A `Tensor`. Has the same type as `values`. A `Tensor` of type V.
  rL  Nrs   r#   )rR  rS  r!   KV) r%   r   r&   r'   r   r(   _XlaKeyValueSortOutputrv   r)   r*   r+   r,   r-   "_dispatcher_for_xla_key_value_sortr/   !xla_key_value_sort_eager_fallbackr1   r2   r3   r4   r   rQ  r5   r6   r7   r:   r;   r8   r<   r=   r?   r@   )rR  rS  r!   rA   rB   rC   rD   rE   rF   rG   rH   rI   s               rJ   rQ  rQ    sS   . 
			0h..0$#\\11tV5g&,,W5gn, 1	vtt%Gn$n	
)::V$@Aq#x QK'""$3%%c*C1C1CC1HIF::L<:"((1'	.W && -
##At,,## 
2
'g		&.
Tt- -## 
z" ""Dd6$Mg 
	..<<	<  Z	  
  
b$Dd"K
G i,,:::n	
sP    /D  
H  E'3EE'&E'+F F H )AH >H AIIzraw_ops.XlaKeyValueSortc                    t        j                  | g|t        j                  t        j                  t        j
                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  g      \  }\  } t        j                  |g|g       \  }\  }| |g}d|d|f}t        j                  dd||||      }t        j                          rt        j"                  d|||       t$        j'                  |      }|S )NrU  rV  s   XlaKeyValueSortrz   rN   rL  )r8   rQ   rR   rU   r{   rV   r|   r}   r~   r   rT   r   rS   rW   r   r   r<   r@   rW  rv   )	rR  rS  r!   r"   _attr_K_attr_VrI   rH   rC   s	            rJ   rY  rY    s   44dVS7??T[TcTcelerert{  uB  uB  DK  DQ  DQ  SZ  S_  S_  ah  an  an  pw  p@  p@  BI  BP  BP  RY  R^  R^  `g  `n  `n  pw  p~  p~  CA  B'7D66xbI'9F,#w'&/<#)s?'""$<:"((1'	.rZ   xla_optimization_barrierc           	      6   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)aO  Wraps the XLA OptimizationBarrier operator.

  Documented at https://www.tensorflow.org/xla/operation_semantics#optimizationbarrier.

  Args:
    input: A list of `Tensor` objects. A Tuple of Arrays of any type.
    name: A name for the operation (optional).

  Returns:
    A list of `Tensor` objects. Has the same type as `input`.
  XlaOptimizationBarrierNrs   r#   r   r!   r$   )r%   r   r&   r'   r   r(   r)   r*   r+   r,   r-   (_dispatcher_for_xla_optimization_barrierr/   'xla_optimization_barrier_eager_fallbackr1   r2   r3   r4   r   r]  r5   r6   r7   r:   r;   r8   r<   r>   r?   r@   r   r!   rA   rB   rC   rD   rE   rF   rG   rH   rI   s              rJ   r]  r]  '  s    
			0h..0$#\\11&e5gn, 7	Gn$n	
):: D:Aq#x QK'""$3<<$%F::L ,A	.U && -
##At,,## 
8$.$ g		&4
d& &## 
z" ""$b$U*Fg 
	..<<	<  Z	  
  
"B5t(D
G i,,:::n	
sP    C" 3G "D)5DD)(D)-E E F>(AF><F>AHHzraw_ops.XlaOptimizationBarrierc                     t        j                  | |      \  }} t        |       }d|f}t        j                  dt	        |       ||||      }t        j
                         rt        j                  d|||       |S )Nr$   s   XlaOptimizationBarrierrN   r_  r8   r   r   r   r   r<   r@   r   r!   r"   rY   rI   rH   rC   s          rJ   rb  rb  m  sx    ::5#F.'5e,>&6E
$0C"&(' ""$ ,A	.rZ   ) TV_XlaPad_Tr   r   r_   r`   r   r   ra   r   r   r   r   r   r   rb   r   r   rc   rd   re   rf   rg   rh   ri   r   r   rj   r   r   rk   rl   r   TV_XlaPad_Tindicesxla_padpadding_valuepadding_lowpadding_highpadding_interiorc                    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                         rHd|j7                  d      d|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$ rL t#        j$                  t&        dt)        | |||||            }|t"        j*                  j,                  ur|cY S  w xY w# t        t         f$ rL t#        j$                  t&        dt)        | |||||            }|t"        j*                  j,                  ur|cY S  w xY w)aR  Wraps the XLA Pad operator, documented at

   https://www.tensorflow.org/performance/xla/operation_semantics#pad
  .

  Args:
    input: A `Tensor`. A `Tensor` of type T.
    padding_value: A `Tensor`. Must have the same type as `input`.
      A scalar `Tensor` of type T.
    padding_low: A `Tensor`. Must be one of the following types: `int32`, `int64`.
      the padding to apply at the start of each input dimensions. Must
      be a compile-time constant 1D tensor of length equal to rank of input.
    padding_high: A `Tensor`. Must have the same type as `padding_low`.
      the padding to apply at the end of each input dimension. Must
      be a compile-time constant 1D tensor of length equal to rank of input.
    padding_interior: A `Tensor`. Must have the same type as `padding_low`.
      the padding to apply between each input element. Must
      be a compile-time constant 1D tensor of length equal to rank of input,
      containing only non-negative values.
    name: A name for the operation (optional).

  Returns:
    A `Tensor`. Has the same type as `input`. A `Tensor` of type T.
  XlaPadNrs   r#   )r   rj  rk  rl  rm  r!   r$   rt   )r%   r   r&   r'   r   r(   r)   r*   r+   r,   r-   _dispatcher_for_xla_padr/   xla_pad_eager_fallbackr1   r2   r3   r4   r   ri  r5   r6   r7   r:   r;   r8   r<   r=   r?   r@   )r   rj  rk  rl  rm  r!   rA   rB   rC   rD   rE   rF   rG   rH   rI   s                  rJ   ri  ri  }  s   8 
			0h..0$#\\11he]Kg n6 &	{L:J	G n$n
)::])#3$@Aq#x QK'""$3%%c*J  ,.F::L,1('	.o && -
##At,,## 
'-l<L
g 
	&#
\;K  ## 
z" 	""RE*5+7/?dLg 
	..<<	<	, Z	  	
  
2t%}(3)5-=DJ
G i,,:::n		
sP    D ;!G/ E
D11E
	E
E< *E< <G,AG,*G,/AI
I
zraw_ops.XlaPadc                 z   t        j                  | |g|g       \  }}|\  } }t        j                  |||g|t        j                  t        j                  g      \  }	}
|
\  }}}| ||||g}d|d|	f}t        j
                  dd||||      }t        j                         rt        j                  d|||       |\  }|S )Nr$   rt   s   XlaPadrM   rN   ro  r  )r   rj  rk  rl  rm  r!   r"   rY   r   r   r   rI   rH   rC   s                 rJ   rq  rq    s    66}7MsTVW'9$5-%-%D%DkS_aqErtw  {B  {H  {H  JQ  JW  JW  zZ  &["."2B/;.\CST,*n5&Y,f!$41'""$,1('	.rZ   ) TV_XlaRecv_dtyper   r   r_   r`   r   r   ra   r   r   r   r   r   r   rb   r   r   rc   rd   re   rf   rg   rh   ri   r   r   rj   r   r   rk   rl   r   xla_recvtensor_namec                 *   t         j                   xs t        j                         }|j                  }|j                  r 	 t	        j
                  |d|d| d|d|	      }|S t        | |||fd      }|t        ur|S t/        j0                  | d      } t/        j2                  |d      }t/        j4                  |d      }	 t7        j8                  d| |||      \  }}}	}
|
dd }t/        j:                         rYd|	j=                  d      d|	j?                  d      d|	j?                  d      f}|	j@                  }t/        jB                  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 et        t         f$ rJ t#        j$                  t&        dt)        | |||            }|t"        j*                  j,                  ur|cY S  w xY w# t        t         f$ rJ t#        j$                  t&        dt)        | |||            }|t"        j*                  j,                  ur|cY S  w xY w)	a  Receives the named tensor from another XLA computation. Wraps the XLA Recv

  operator documented at
   https://www.tensorflow.org/performance/xla/operation_semantics#recv .

  Args:
    dtype: A `tf.DType`. The type of the tensor.
    tensor_name: A `string`. A string key that identifies the channel.
    shape: A `tf.TensorShape` or list of `ints`. The shape of the tensor.
    name: A name for the operation (optional).

  Returns:
    A `Tensor` of type `dtype`. The tensor to receive.
  XlaRecvr   ru  r   N)r   ru  r   r!   r"   r#   )r   ru  r   r!   )"r%   r   r&   r'   r   r(   r)   r*   r+   r,   r-   _dispatcher_for_xla_recvr/   xla_recv_eager_fallbackr1   r2   r3   r4   r   rt  r5   r6   r7   r8   r   r9   r   r:   r;   r<   r=   r>   r?   r@   )r   ru  r   r!   rA   rB   rC   rD   rE   rF   rG   rH   rI   s                rJ   rt  rt    s   $ 
			0h..0$#\\11iw}kg n0 '	UD*D2Gn$n


UG
,%!!+}=+


eW
-%
)::KuAq#x QK'""$s))'2Mll=)7CLL4IKF::L<2('	.g && -
##At,,## 
(+ud
,d4g		&$;e$  ## 
z" ""b$U%*7g 
	..<<	<* Z	  
  
B5k#(t5
G i,,:::n	
sP    E <H9 F&FFFG 8G H6AH64H69AJJzraw_ops.XlaRecvc                 4   t        j                  | d      } t        j                  |d      }t        j                  |d      }g }d| d|d|f}t        j                  dd||||      }t        j
                         rt        j                  d|||       |\  }|S )Nr   ru  r   s   XlaRecvrM   rN   rw  )r8   r   r9   r   r   r<   r@   )r   ru  r   r!   r"   rI   rH   rC   s           rJ   ry  ry  C	  s    


UG
,%!!+}=+


eW
-%,UM;G&Z<v!$41'""$<2('	.rZ   TV_XlaReduce_T
xla_reduce
init_valuec                 J   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        |D 	cg c]  }	t5        j6                  |	d       }}		 t9        j:                  d| ||||      \  }
}
}}|dd }t5        j<                         rYd	|j?                  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 mt        t         f$ rK t#        j$                  t&        dt)        | ||||            }|t"        j*                  j,                  ur|cY S  w xY wc c}	w # t        t         f$ rK t#        j$                  t&        dt)        | ||||            }|t"        j*                  j,                  ur|cY S  w xY w)
a,  Wraps the XLA Reduce operator, documented at

   https://www.tensorflow.org/performance/xla/operation_semantics#reduce .

  Args:
    input: A `Tensor`. Must be one of the following types: `float32`, `float64`, `int32`, `uint8`, `int16`, `int8`, `complex64`, `int64`, `qint8`, `quint8`, `qint32`, `bfloat16`, `qint16`, `quint16`, `uint16`, `complex128`, `half`, `uint32`, `uint64`, `bool`.
      the input tensor
    init_value: A `Tensor`. Must have the same type as `input`.
      a scalar representing the initial value for the reduction
    dimensions_to_reduce: A list of `ints`.
      dimension numbers over which to reduce
    reducer: A function decorated with @Defun. a reducer function to apply
    name: A name for the operation (optional).

  Returns:
    A `Tensor`. Has the same type as `input`.
  	XlaReducedimensions_to_reducereducerNr  r  r!   r"   r#   r   r}  r  r  r!   MExpected list for 'dimensions_to_reduce' argument to 'xla_reduce' Op, not %r.r$   )#r%   r   r&   r'   r   r(   r)   r*   r+   r,   r-   _dispatcher_for_xla_reducer/   xla_reduce_eager_fallbackr1   r2   r3   r4   r   r|  r5   r6   r7   r   r   r   r8   r   r:   r;   r<   r=   r>   r?   r@   )r   r}  r  r  r!   rA   rB   rC   rD   _irE   rF   rG   rH   rI   s                  rJ   r|  r|  T	  s   * 
			0h..0$#\\11k4
4Ji2g n2 )	
0'4A4IGn$n	(4-	8
	#%9	:; ; SggB(++B0FGgg
)::5Z*>$41Aq#x QK'""$3%%c*,Bll12Ill9%'F ::L\674('	.s && -
##At,,## 
**2GT
CTKg		&&
2F$0 0 ## 
z" ""Du6J)0t=g
 
	..<<	<& h Z	  
  
b$Uz4H'.T;
G
 i,,:::n	
sV    E "I I F!-FF! F!%G  G I 'AI >I AJ" J"zraw_ops.XlaReducec                    t        |t        t        f      st        d|z        |D cg c]  }t	        j
                  |d       }}t	        j                  | |g|t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                   t        j"                  t        j$                  t        j&                  t        j(                  t        j*                  t        j,                  t        j.                  t        j0                  t        j2                  t        j4                  t        j6                  g      \  }}|\  } }| |g}	d|d|d|f}
t	        j8                  dd|	|
||      }t	        j:                         rt	        j<                  d|	|
|       |\  }|S c c}w )	Nr  r  r$   r  s	   XlaReducerM   rN   r  )r   r   r   r2   r8   r   rQ   rR   rU   r{   rV   r|   r}   r~   r   r   r   r   r   rT   r   r   r   r   rS   rW   r   r>  r   r<   r@   )r   r}  r  r  r!   r"   r  rY   r   rI   rH   rC   s               rJ   r  r  	  s|   	(4-	8
	#%9	:; ; SggB(++B0FGgg66z7JCRYRaRacjcrcrt{  uB  uB  DK  DQ  DQ  SZ  S`  S`  bi  bn  bn  pw  pA  pA  CJ  CP  CP  RY  R_  R_  ah  ao  ao  qx  q  q  AH  AQ  AQ  SZ  Sa  Sa  cj  cr  cr  t{  tB  tB  DK  DV  DV  X_  Xd  Xd  fm  ft  ft  v}  vD  vD  FM  FR  FR  RU  V'9!5*$,02FW&\1\#)s?'""$\674('	. hs   G.TV_XlaReducePrecision_Txla_reduce_precisionexponent_bitsmantissa_bitsc                    t         j                   xs t        j                         }|j                  }|j                  r	 t	        j
                  |d|| d|d|      }|S t        | |||fd      }|t        ur|S t/        j0                  |d      }t/        j0                  |d      }	 t3        j4                  d| |||      \  }}}	}
|
dd }t/        j6                         rYd|	j9                  d      d|	j;                  d      d|	j;                  d      f}|	j<                  }t/        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 Ot        t         f$ rJ t#        j$                  t&        dt)        | |||            }|t"        j*                  j,                  ur|cY S  w xY w# t        t         f$ rJ t#        j$                  t&        dt)        | |||            }|t"        j*                  j,                  ur|cY S  w xY w)	a  Wraps the XLA ReducePrecision operator

    documented at https://www.tensorflow.org/xla/operation_semantics#reduceprecision.

  Args:
    operand: A `Tensor`. Must be one of the following types: `bfloat16`, `half`, `float32`, `float64`.
      array of floating-point type.
    exponent_bits: An `int`. number of exponent bits in lower-precision format
    mantissa_bits: An `int`. number of mantissa bits in lower-precision format
    name: A name for the operation (optional).

  Returns:
    A `Tensor`. Has the same type as `operand`.
  XlaReducePrecisionr  r  N)r  r  r!   r"   r#   )r5  r  r  r!   r$   ) r%   r   r&   r'   r   r(   r)   r*   r+   r,   r-   $_dispatcher_for_xla_reduce_precisionr/   #xla_reduce_precision_eager_fallbackr1   r2   r3   r4   r   r  r5   r6   r7   r8   r   r:   r;   r<   r=   r   r?   r@   )r5  r  r  r!   rA   rB   rC   rD   rE   rF   rG   rH   rI   s                rJ   r  r  	  s   $ 
			0h..0$#\\11"D'?7g n4 3	-6>Gn$n##M?C-##M?C-
)::g],9FAq#x QK'""$3%%c*O0/02F ::LlFG=('	.o && -
##At,,## 
4M=$
8$@g		&0
m  ## 
z" 	"" "d79F9F04'6g 
	..<<	<	, Z	  	
  
D7D7D.2%4
G i,,:::n		
sP    D< %H" <FE**FFF1 !F1 1HAHH"AI;9I;zraw_ops.XlaReducePrecisionc                    t        j                  |d      }t        j                  |d      }t        j                  | g|t        j                  t        j
                  t        j                  t        j                  g      \  }\  } | g}d|d|d|f}t        j                  dd||||      }t        j                         rt        j                  d|||       |\  }|S )Nr  r  r$   s   XlaReducePrecisionrM   rN   r  )r8   r   rQ   rR   rT   rS   rU   r{   r   r<   r@   )	r5  r  r  r!   r"   rY   rI   rH   rC   s	            rJ   r  r  
  s    ##M?C-##M?C- 77	3IYIY[b[g[gipixix  {B  {J  {J  IM  N':G,/=/&2Al#)s?'""$lFG=('	.rZ   TV_XlaReduceScatter_Txla_reduce_scatterscatter_dimensionc                    t         j                   xs t        j                         }|j                  }|j                  r	 t	        j
                  |d|| ||d|      }|S t        | ||||fd      }|t        ur|S t/        j0                  |d      }	 t3        j4                  d| ||||      \  }	}	}
}|dd }t/        j6                         rHd|
j9                  d      d|
j;                  d      f}|
j<                  }t/        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$ rK t#        j$                  t&        dt)        | ||||            }|t"        j*                  j,                  ur|cY S  w xY w# t        t         f$ rK t#        j$                  t&        dt)        | ||||            }|t"        j*                  j,                  ur|cY S  w xY w)a  Wraps the XLA ReduceScatter operator

    documented at https://www.tensorflow.org/xla/operation_semantics#reducescatter.

  Args:
    input: A `Tensor`. Must be one of the following types: `half`, `bfloat16`, `float32`, `int32`, `uint32`.
      Array or a non-empty tuple of arrays to reduce across replicas.
    group_assignment: A `Tensor` of type `int32`.
      Groups between which the reductions are performed.
    scatter_dimension: A `Tensor` of type `int32`. Dimension to scatter.
    reduce_op: A `string` from: `"Min", "Max", "Mul", "Add", "Mean"`.
      Reduction computation.
    name: A name for the operation (optional).

  Returns:
    A `Tensor`. Has the same type as `input`.
  XlaReduceScatterr   N)r   r!   r"   r#   )r   r   r  r   r!   r$   ) r%   r   r&   r'   r   r(   r)   r*   r+   r,   r-   "_dispatcher_for_xla_reduce_scatterr/   !xla_reduce_scatter_eager_fallbackr1   r2   r3   r4   r   r  r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   )r   r   r  r   r!   rA   rB   rC   rD   rE   rF   rG   rH   rI   s                 rJ   r  r  /
  s   * 
			0h..0$#\\11 $/?;	3g n4 1	 "3YFNGn$n	;7)
)::%:J.?&/d<Aq#x QK'""$3%%c*Kll;')F::LL&';('	.m && -
##At,,## 
2"$5y$
H$Pg		&.
!#4	  ## 
z" 	""Du:J;L3<4%Ig 
	..<<	<	, Z	  	
  
b$U8H9J1:#G
G i,,:::n		
sP    D  H  E*EEE"F =F G=$AG=;G= AIIzraw_ops.XlaReduceScatterc           	      >   t        j                  |d      }t        j                  | g|t        j                  t        j
                  t        j                  t        j                  t        j                  g      \  }\  } t        j                  |t        j                        }t        j                  |t        j                        }| ||g}d|d|f}t        j                  dd||||      }	t        j                         rt        j                  d|||	       |	\  }	|	S )Nr   r$   s   XlaReduceScatterrM   rN   r  rP   )
r   r   r  r   r!   r"   rY   rI   rH   rC   s
             rJ   r  r  
  s   	;7)55ugsW\\SZScSceletetv}  wD  wD  FM  FT  FT  EW  X'8E++,<gmmL,,->N)+<=,+y1&0!L#)s?'""$L&';('	.rZ   TV_XlaReduceWindow_TTV_XlaReduceWindow_Tindicesxla_reduce_windowwindow_dimensionsbase_dilationswindow_dilationsc	                    t         j                   xs t        j                         }	|	j                  }
|
j                  r#	 t	        j
                  |	d|| ||||||d|      }|S t        | ||||||||f	d      }|t        ur|S 	 t/        j0                  d| ||||||||
      \  }}}}|dd }t3        j4                         rYd|j7                  d      d|j7                  d      d|j9                  d      f}|j:                  }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 2t        t         f$ rO t#        j$                  t&        dt)        | ||||||||	            }|t"        j*                  j,                  ur|cY S  w xY w# t        t         f$ rO t#        j$                  t&        dt)        | ||||||||	            }|t"        j*                  j,                  ur|cY S  w xY w)	a  Wraps the XLA ReduceWindow operator, documented at

   https://www.tensorflow.org/performance/xla/operation_semantics#reducewindow .

  Args:
    input: A `Tensor`. Must be one of the following types: `float32`, `float64`, `int32`, `uint8`, `int16`, `int8`, `complex64`, `int64`, `qint8`, `quint8`, `qint32`, `bfloat16`, `qint16`, `quint16`, `uint16`, `complex128`, `half`, `uint32`, `uint64`, `bool`.
      the input tensor
    init_value: A `Tensor`. Must have the same type as `input`.
      a scalar representing the initial value for the reduction
    window_dimensions: A `Tensor`. Must be one of the following types: `int32`, `int64`.
      the shape of the window
    window_strides: A `Tensor`. Must have the same type as `window_dimensions`.
      the inter-window strides
    base_dilations: A `Tensor`. Must have the same type as `window_dimensions`.
    window_dilations: A `Tensor`. Must have the same type as `window_dimensions`.
    padding: A `Tensor`. Must have the same type as `window_dimensions`.
      the padding to apply at the start and end of each input dimensions
    computation: A function decorated with @Defun. a reducer function to apply
    name: A name for the operation (optional).

  Returns:
    A `Tensor`. Has the same type as `input`.
  XlaReduceWindowcomputationN)r  r!   r"   r#   )	r   r}  r  r   r  r  r   r  r!   r$   rt   )r%   r   r&   r'   r   r(   r)   r*   r+   r,   r-   !_dispatcher_for_xla_reduce_windowr/    xla_reduce_window_eager_fallbackr1   r2   r3   r4   r   r  r5   r6   r7   r:   r;   r8   r<   r=   r>   r?   r@   )r   r}  r  r   r  r  r   r  r!   rA   rB   rC   rD   rE   rF   rG   rH   rI   s                     rJ   r  r  
  s   6 
			0h..0$#\\	11uj:K(8'{$g n> 0	
-~~';	78<>G n$n
):::->*8*8,<g'2?Aq#x( QK'""$3%%c*J  ,mll=)+F ::L<:('	.E && -
##At,,## 
1*/
*G[$IJNPg 
	&-
.
*G  ## 
z" ""r4e
:K7E7E9I074?d$Lg 
	..<<	<8 Z	  
  
REj8I5C5C7G.52=D"J
G i,,:::n	
sP    !D $H E%1EE%$E%)F F H3AHHAI1/I1zraw_ops.XlaReduceWindowc
                    t        j                  | |g|	t        j                  t        j                  t        j
                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                   t        j"                  t        j$                  t        j&                  t        j(                  t        j*                  t        j,                  g      \  }
}|\  } }t        j                  |||||g|	t        j
                  t        j                  g      \  }}|\  }}}}}| ||||||g}d|
d|d|f}t        j.                  dd|||	|      }t        j0                         rt        j2                  d|||       |\  }|S )Nr$   rt   r  s   XlaReduceWindowrM   rN   r  )r8   rQ   rR   rU   r{   rV   r|   r}   r~   r   r   r   r   r   rT   r   r   r   r   rS   rW   r   r>  r   r<   r@   )r   r}  r  r   r  r  r   r  r!   r"   rY   r   r   r   rI   rH   rC   s                    rJ   r  r    s   66z7JCRYRaRacjcrcrt{  uB  uB  DK  DQ  DQ  SZ  S`  S`  bi  bn  bn  pw  pA  pA  CJ  CP  CP  RY  R_  R_  ah  ao  ao  qx  q  q  AH  AQ  AQ  SZ  Sa  Sa  cj  cr  cr  t{  tB  tB  DK  DV  DV  X_  Xd  Xd  fm  ft  ft  v}  vD  vD  FM  FR  FR  RU  V'9!5*%-%D%DFWYgiw  zJ  LS  FT  VY  \c  \i  \i  kr  kx  kx  [{  &|"."ScPnn6F%6Xhjqr,*nm&/<#)s?'""$<:('	.rZ   ) "TV_XlaRemoveDynamicDimensionSize_Tr   r   r_   r`   r   r   ra   r   r   r   r   r   r   rb   r   r   rc   rd   re   rf   rg   rh   ri   r   r   rj   r   r   rk   rl   r   !xla_remove_dynamic_dimension_size	dim_indexc           
      L   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$ rI t#        j$                  t&        dt)        | ||            }|t"        j*                  j,                  ur|cY S  w xY w# t        t         f$ rI t#        j$                  t&        dt)        | ||            }|t"        j*                  j,                  ur|cY S  w xY w)as  Inverse of XlaSetDynamicDimensionSize.

  Make an xla bounded dynamic dimension into a static dimension. The bound of the
  size of dimension `dim_index` becomes the static dimension size.

  Args:
    input: A `Tensor`.
    dim_index: A `Tensor` of type `int32`.
    name: A name for the operation (optional).

  Returns:
    A `Tensor`. Has the same type as `input`.
  XlaRemoveDynamicDimensionSizeNrs   r#   )r   r  r!   r$   )r%   r   r&   r'   r   r(   r)   r*   r+   r,   r-   1_dispatcher_for_xla_remove_dynamic_dimension_sizer/   0xla_remove_dynamic_dimension_size_eager_fallbackr1   r2   r3   r4   r   r  r5   r6   r7   r:   r;   r8   r<   r=   r?   r@   )r   r  r!   rA   rB   rC   rD   rE   rF   rG   rH   rI   s               rJ   r  r    s8   " 
			0h..0$#\\11-tUIGgn0 @		4!4)Gn$n
)::'u	.24Aq#x QK'""$3%%c*+F::L'vwH('	.a && -
##At,,## 
A)T
#T+g		&=
41 1## 
z" ""-r4eBK=A4Cg
 
	..<<	<& Z	  
  
+RE@I;?2A
G
 i,,:::n	
sP    C) 5G )D0<DD0/D04E E G1AGGAH#!H#z%raw_ops.XlaRemoveDynamicDimensionSizec                 .   t        j                  | g|g       \  }\  } t        j                  |t        j
                        }| |g}d|f}t        j                  dd||||      }t        j                         rt        j                  d|||       |\  }|S )Nr$   s   XlaRemoveDynamicDimensionSizerM   rN   r  	r8   rQ   r+   rX   rR   rV   r   r<   r@   )r   r  r!   r"   rY   rI   rH   rC   s           rJ   r  r  h  s    55ugsBG'8E$$Y>)#,>&=q$0C"&(' ""$'vwH('	.rZ   xla_replica_idc                    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                         r&d}|j6                  }	t3        j8                  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$ rG t#        j$                  t&        dt)        |             }|t"        j*                  j,                  ur|cY S  w xY w# t        t         f$ rG t#        j$                  t&        dt)        |             }|t"        j*                  j,                  ur|cY S  w xY w)zrReplica ID.

  Args:
    name: A name for the operation (optional).

  Returns:
    A `Tensor` of type `int32`.
  XlaReplicaIdNrs   r#   )r!   )r%   r   r&   r'   r   r(   r)   r*   r+   r,   r-   _dispatcher_for_xla_replica_idr/   xla_replica_id_eager_fallbackr1   r2   r3   r4   r   r  r5   r6   r7   r:   r;   r8   r<   r?   r@   )
r!   rA   rB   rC   rD   rE   rF   rG   rH   rI   s
             rJ   r  r  w  s    
			0h..0$#\\11nd$gn, -	Gn$n	
)::T#Aq#x QK'""$F::Lfg7('	.W && -
##At,,## 
.'4g		&* ## 
z" ""B$g 
	..<<	<  Z	  
  
"do
G i,,:::n	
sP    C 1F. D%D  DDE 4E F+AF+)F+.AHHzraw_ops.XlaReplicaIdc                     g }d }t        j                  dd||||       }t        j                         rt        j                  d|||       |\  }|S )Ns   XlaReplicaIdrM   rN   r  )r8   r   r<   r@   )r!   r"   rI   rH   rC   s        rJ   r  r    sX    ,&_a#)s?'""$fg7('	.rZ   XlaRngBitGenerator
output_keyoutputTV_XlaRngBitGenerator_dtypeTV_XlaRngBitGenerator_Tshapexla_rng_bit_generator	algorithminitial_stater   c                 *   t         j                   xs t        j                         }|j                  }|j                  r4	 t	        j
                  |d|| ||d|      }t        j                  |      }|S t        | ||||fd      }|t        ur|S |t2        j4                  }t7        j8                  |d      }	 t;        j<                  d| ||||      \  }	}	}
}|dd }t7        j>                         rHd|
jA                  d      d|
jA                  d      f}|
jB                  }t7        jD                  d|||       t        j                  |      }|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 Nt"        t$        f$ rK t'        j(                  t*        dt-        | ||||            }|t&        j.                  j0                  ur|cY S  w xY w# t"        t$        f$ rK t'        j(                  t*        dt-        | ||||            }|t&        j.                  j0                  ur|cY S  w xY w)a  Stateless PRNG bit generator.

  Wraps the XLA RngBitGenerator operator, documented at
   https://www.tensorflow.org/performance/xla/operation_semantics#rngbitgenerator.

  Args:
    algorithm: A `Tensor` of type `int32`. The PRNG algorithm to use, one of
      tf.random.Algorithm.{PHILOX, THREEFRY, AUTO_SELECT}.
    initial_state: A `Tensor` of type `uint64`.
      Initial state for the PRNG algorithm. For THREEFRY, it should be
      a u64[2] and for PHILOX a u64[3].
    shape: A `Tensor`. Must be one of the following types: `int32`, `int64`.
      The output shape of the generated data.
    dtype: An optional `tf.DType` from: `tf.uint8, tf.int8, tf.int32, tf.int64, tf.uint32, tf.uint64`. Defaults to `tf.uint64`.
      The type of the tensor.
    name: A name for the operation (optional).

  Returns:
    A tuple of `Tensor` objects (output_key, output).

    output_key: A `Tensor` of type `uint64`.
    output: A `Tensor` of type `dtype`.
  r  r   N)r   r!   r"   r#   )r  r  r   r   r!   Tshape)#r%   r   r&   r'   r   r(   _XlaRngBitGeneratorOutputrv   r)   r*   r+   r,   r-   %_dispatcher_for_xla_rng_bit_generatorr/   $xla_rng_bit_generator_eager_fallbackr1   r2   r3   r4   r   r  r5   r6   r7   rR   r   r8   r   r:   r;   r<   r=   r?   r@   )r  r  r   r   r!   rA   rB   rC   rD   rE   rF   rG   rH   rI   s                 rJ   r  r    s   6 
			0h..0$#\\	11"D)]Eg *//8gn2 4	M5%7?Gn$n
]NNE


UG
,%
)::	,9$)6Aq#x QK'""$s))'2H  *,F::LlFG=%++G4'	.m && -
##At,,## 
5mUE4
94Ag		&1
]ETtM M## 
z" 	""!2ti:G27u15(7g 
	..<<	<	0 Z	  
  
TI8E05U&O
G
 i,,:::n	
sP    2E 7 H8 F"E==FFG 5G H5AH53H58AJJzraw_ops.XlaRngBitGeneratorc                 H   |t         j                  }t        j                  |d      }t        j                  |g|t         j
                  t         j                  gt         j
                        \  }\  }t        j                  | t         j
                        } t        j                  |t         j                        }| ||g}d|d|f}t        j                  dd||||      }	t        j                         rt        j                  d|||	       t        j                  |	      }	|	S )Nr   r  s   XlaRngBitGeneratorrz   rN   r  )rR   r   r8   r   rQ   rV   r   r+   rX   r   r<   r@   r  rv   )
r  r  r   r   r!   r"   _attr_TshaperI   rH   rC   s
             rJ   r  r  .  s    
]NNE


UG
,%#::E7C'--Y`YfYfIikrkxkxy,$$Y>)((G-]E2,UHl3&2Al#)s?'""$lFG=%++G4'	.rZ   TV_XlaScatter_TTV_XlaScatter_Tindicesxla_scatterscatter_indicesupdatesc                 l   t         j                   xs t        j                         }|j                  }|j                  r#	 t	        j
                  |d|| ||d|d|d|      }	|	S t        | ||||||fd      }	|	t        ur|	S t/        j0                  |d      }t/        j2                  |d      }	 t5        j6                  d| ||||||      \  }}}}|dd }	t/        j8                         r{d|j;                  d      d|j;                  d      d|j=                  d      d	|j?                  d	      d
|j?                  d
      f
}|j@                  }t/        jB                  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 zt        t         f$ rM t#        j$                  t&        dt)        | ||||||            }	|	t"        j*                  j,                  ur|	cY S  w xY w# t        t         f$ rM t#        j$                  t&        dt)        | ||||||            }	|	t"        j*                  j,                  ur|	cY S  w xY w)a  Wraps the XLA Scatter operator documented at

    https://www.tensorflow.org/xla/operation_semantics#scatter.

  Args:
    operand: A `Tensor`. Must be one of the following types: `float32`, `float64`, `int32`, `uint8`, `int16`, `int8`, `complex64`, `int64`, `qint8`, `quint8`, `qint32`, `bfloat16`, `qint16`, `quint16`, `uint16`, `complex128`, `half`, `uint32`, `uint64`, `bool`.
      Array to be scattered into.
    scatter_indices: A `Tensor`. Must be one of the following types: `int32`, `int64`.
      Array containing the starting indices of the slices that must
      be scattered to.
    updates: A `Tensor`. Must have the same type as `operand`.
      Array containing the values that must be used for scattering.
    update_computation: A function decorated with @Defun.
      Computation to be used for combining the existing values in
      the input array and the updates during scatter.
    dimension_numbers: A `string`.
      A serialized xla::ScatterDimensionNumbers proto.
    indices_are_sorted: A `bool`.
      Boolean indicating if the indices are sorted.
    name: A name for the operation (optional).

  Returns:
    A `Tensor`. Has the same type as `operand`.
  
XlaScatterupdate_computationr   r7  N)r  r   r7  r!   r"   r#   )r5  r  r  r  r   r7  r!   r$   rt   )"r%   r   r&   r'   r   r(   r)   r*   r+   r,   r-   _dispatcher_for_xla_scatterr/   xla_scatter_eager_fallbackr1   r2   r3   r4   r   r  r5   r6   r7   r8   r9   r   r:   r;   r<   r>   r   r=   r?   r@   )r5  r  r  r  r   r7  r!   rA   rB   rC   rD   rE   rF   rG   rH   rI   s                   rJ   r  r  C  s
   8 
			0h..0$#\\	11lD'?G02E/1CEg n@ *	/7,>-t	67;=G n$n''(9;NO))*<>RS
)::g%:L(9);$	HAq#x$ QK'""$"CLL1E$F!3<<0C#D"C$6$67K$L3%%c*J  ,	.F
 ::LlFG5('	.K && -
##At,,## 
+OW.@
/89=?g 
	&'
?G/-/d	F F
 ## 
z" ""T'2A*15G4E5G'+-g 
	..<<	<8 Z	  
  
r40?(/3E2C3E%)+
G i,,:::n	
sP    !E( ,"I (F/;FF/.F/3G# G# #I9AIIAJ31J3zraw_ops.XlaScatterc                 &   t        j                  |d      }t        j                  |d      }t        j                  | |g|t        j
                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                   t        j"                  t        j$                  t        j&                  t        j(                  t        j*                  t        j,                  t        j.                  t        j0                  g      \  }}	|	\  } }t        j                  |g|t        j                  t        j                  g      \  }
\  }| ||g}d|d|d|d|d|
f
}t        j2                  dd||||      }t        j4                         rt        j6                  d	|||       |\  }|S )
Nr   r7  r  r$   rt   s
   XlaScatterrM   rN   r  r=  )r5  r  r  r  r   r7  r!   r"   rY   r   r   rI   rH   rC   s                 rJ   r  r    s   ''(9;NO))*<>RS667I3QXQ`Q`bibqbqsz  tA  tA  CJ  CP  CP  RY  R_  R_  ah  am  am  ov  o@  o@  BI  BO  BO  QX  Q^  Q^  `g  `n  `n  pw  p~  p~  @G  @P  @P  RY  R`  R`  bi  bq  bq  sz  sA  sA  CJ  CU  CU  W^  Wc  Wc  el  es  es  u|  uC  uC  EL  EQ  EQ  QT  U'9 7G'/'F'FGXZ]`g`m`movo|o|_  (A$.$??G4, "46I)+=sGn& ]Al#)s?'""$lFG5('	.rZ   TV_XlaSelectAndScatter_TTV_XlaSelectAndScatter_Tindicesxla_select_and_scattersourcec	                    t         j                   xs t        j                         }	|	j                  }
|
j                  r$	 t	        j
                  |	d|| |||||d|d|      }|S t        | ||||||||f	d      }|t        ur|S 	 t/        j0                  d| ||||||||
      \  }}}}|dd }t3        j4                         rjd|j7                  d      d	|j7                  d	      d|j9                  d      d|j9                  d      f}|j:                  }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 Ct        t         f$ rO t#        j$                  t&        dt)        | ||||||||	            }|t"        j*                  j,                  ur|cY S  w xY w# t        t         f$ rO t#        j$                  t&        dt)        | ||||||||	            }|t"        j*                  j,                  ur|cY S  w xY w)
a  Wraps the XLA SelectAndScatter operator, documented at

   https://www.tensorflow.org/performance/xla/operation_semantics#selectandscatter
  .

  Args:
    operand: A `Tensor`. Must be one of the following types: `float32`, `float64`, `int32`, `uint8`, `int16`, `int8`, `complex64`, `int64`, `qint8`, `quint8`, `qint32`, `bfloat16`, `qint16`, `quint16`, `uint16`, `complex128`, `half`, `uint32`, `uint64`.
      the input tensor
    window_dimensions: A `Tensor`. Must be one of the following types: `int32`, `int64`.
      the shape of the window
    window_strides: A `Tensor`. Must have the same type as `window_dimensions`.
      the inter-window strides
    padding: A `Tensor`. Must have the same type as `window_dimensions`.
      the padding to apply at the start and end of each input dimensions
    source: A `Tensor`. Must have the same type as `operand`.
      a tensor of values to scatter
    init_value: A `Tensor`. Must have the same type as `operand`.
      a scalar representing the initial value for the output tensor
    select: A function decorated with @Defun. a selection function to apply
    scatter: A function decorated with @Defun. a scatter function to apply
    name: A name for the operation (optional).

  Returns:
    A `Tensor`. Has the same type as `operand`.
  XlaSelectAndScatterselectscatterN)r  r  r!   r"   r#   )	r5  r  r   r   r  r}  r  r  r!   r$   rt   )r%   r   r&   r'   r   r(   r)   r*   r+   r,   r-   &_dispatcher_for_xla_select_and_scatterr/   %xla_select_and_scatter_eager_fallbackr1   r2   r3   r4   r   r  r5   r6   r7   r:   r;   r8   r<   r=   r>   r?   r@   )r5  r  r   r   r  r}  r  r  r!   rA   rB   rC   rD   rE   rF   rG   rH   rI   s                     rJ   r  r    s   : 
			0h..0$#\\	11#T74EXv7g n< 5	#^WfFGT	,-13G n$n
)::w1B.<g&,&,gDJAq#x& QK'""$3%%c*J  ,hll8$ii1HJF ::L|VW>('	.A && -
##At,,## 
6%~w
fgt./35g 
	&2
$ngv
VW4TK K ## 
z" """BW?P<J5<V8B4:G26)8g 
	..<<	<6 Z	  
  
 "d7=N:H3:66@28'04'6
G i,,:::n	
sP    "D0 $H% 0E7EE76E7;F/ F/ /H"AH" H"%AJJzraw_ops.XlaSelectAndScatterc
                    t        j                  | ||g|	t        j                  t        j                  t        j
                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                   t        j"                  t        j$                  t        j&                  t        j(                  t        j*                  g      \  }
}|\  } }}t        j                  |||g|	t        j
                  t        j                  g      \  }}|\  }}}| |||||g}d|
d|d|d|f}t        j,                  dd|||	|      }t        j.                         rt        j0                  d|||       |\  }|S )	Nr$   rt   r  r  s   XlaSelectAndScatterrM   rN   r  )r8   rQ   rR   rU   r{   rV   r|   r}   r~   r   r   r   r   r   rT   r   r   r   r   rS   rW   r   r   r<   r@   )r5  r  r   r   r  r}  r  r  r!   r"   rY   r   r   r   rI   rH   rC   s                    rJ   r  r  5  s   667TVY\c\k\kmtm|m|  F  L  L  NU  N[  N[  ]d  ]j  ]j  ls  lx  lx  zA  zK  zK  MT  MZ  MZ  \c  \i  \i  kr  ky  ky  {B  {I  {I  KR  K[  K[  ]d  ]k  ]k  mt  m|  m|  ~E  ~L  ~L  NU  N`  N`  bi  bn  bn  pw  p~  p~  @G  @N  @N  \Q  R'9"+7FJ%-%D%DFWYgipEqsv  zA  zG  zG  IP  IV  IV  yY  &Z"."1A.ng,ngvzZ,*nhW&3Q|#)s?'""$|VW>('	.rZ   XlaSelfAdjointEigwvTV_XlaSelfAdjointEig_Txla_self_adjoint_eiglowermax_iterepsilonc                    t         j                   xs t        j                         }|j                  }|j                  r6	 t	        j
                  |d|| d|d|d|
      }t        j                  |      }|S t        | ||||fd      }|t        ur|S t3        j4                  |d      }t3        j6                  |d      }t3        j8                  |d      }	 t;        j<                  d| ||||      \  }	}	}
}|dd }t3        j>                         rjd|
jA                  d      d|
jC                  d      d|
jE                  d      d	|
jG                  d	      f}|
jH                  }t3        jJ                  d|||       t        j                  |      }|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$ rK t'        j(                  t*        dt-        | ||||            }|t&        j.                  j0                  ur|cY S  w xY w# t"        t$        f$ rK t'        j(                  t*        dt-        | ||||            }|t&        j.                  j0                  ur|cY S  w xY w)
a  Computes the eigen decomposition of a batch of self-adjoint matrices

  (Note: Only real inputs are supported).

  Computes the eigenvalues and eigenvectors of the innermost N-by-N matrices in
  tensor such that tensor[...,:,:] * v[..., :,i] = e[..., i] * v[...,:,i], for
  i=0...N-1.

  Args:
    a: A `Tensor`. Must be one of the following types: `float32`, `float64`, `int32`, `uint8`, `int16`, `int8`, `complex64`, `int64`, `qint8`, `quint8`, `qint32`, `bfloat16`, `qint16`, `quint16`, `uint16`, `complex128`, `half`, `uint32`, `uint64`.
      the input tensor.
    lower: A `bool`.
      a boolean specifies whether the calculation is done with the lower
      triangular part or the upper triangular part.
    max_iter: An `int`.
      maximum number of sweep update, i.e., the whole lower triangular
      part or upper triangular part based on parameter lower. Heuristically, it has
      been argued that approximately logN sweeps are needed in practice (Ref: Golub &
      van Loan "Matrix Computation").
    epsilon: A `float`. the tolerance ratio.
    name: A name for the operation (optional).

  Returns:
    A tuple of `Tensor` objects (w, v).

    w: A `Tensor`. Has the same type as `a`. The eigenvalues in ascending order, each repeated according to its
      multiplicity.
    v: A `Tensor`. Has the same type as `a`. The column v[..., :, i] is the normalized eigenvector corresponding to the
      eigenvalue w[..., i].
  r  r  r  r  N)r  r  r  r!   r"   r#   )r*  r  r  r  r!   r$   )&r%   r   r&   r'   r   r(   _XlaSelfAdjointEigOutputrv   r)   r*   r+   r,   r-   $_dispatcher_for_xla_self_adjoint_eigr/   #xla_self_adjoint_eig_eager_fallbackr1   r2   r3   r4   r   r  r5   r6   r7   r8   r   r   r   r:   r;   r<   r   r   r>   r=   r?   r@   )r*  r  r  r  r!   rA   rB   rC   rD   rE   rF   rG   rH   rI   s                 rJ   r  r  L  s   D 
			0h..0$#\\	11!4GUJ)W&g )..w7gn2 3	
E8Wd,d4Gn$n


UG
,%x4(3'
)::q%,49Aq#x QK'""$s))'2J
+Yll9%sC,>,>s,CEF ::L\67<$**73'	.k && -
##At,,## 
4eXw
.6g		&0
58W4  ## 
z" "" "dQe4<g04'6g
 
	..<<	<, Z	  
  
D1EH18t%E
G i,,:::n	
P    4F  I6 G F;;GGH 3H I3AI31I36AKKzraw_ops.XlaSelfAdjointEigc                    t        j                  |d      }t        j                  |d      }t        j                  |d      }t        j                  | g|t
        j                  t
        j                  t
        j                  t
        j                  t
        j                  t
        j                  t
        j                  t
        j                  t
        j                  t
        j                  t
        j                   t
        j"                  t
        j$                  t
        j&                  t
        j(                  t
        j*                  t
        j,                  t
        j.                  t
        j0                  g      \  }\  } | g}d|d|d|d|f}t        j2                  dd||||      }	t        j4                         rt        j6                  d|||	       t8        j;                  |	      }	|	S )	Nr  r  r  r$   s   XlaSelfAdjointEigrz   rN   r  )r8   r   r   r   rQ   rR   rU   r{   rV   r|   r}   r~   r   r   r   r   r   rT   r   r   r   r   rS   rW   r   r   r<   r@   r  rv   )
r*  r  r  r  r!   r"   rY   rI   rH   rC   s
             rJ   r  r    s*   


UG
,%x4(3'111#sW__goo_f_l_lnun{n{  ~E  ~K  ~K  MT  MY  MY  [b  [l  [l  nu  n{  n{  }D  }J  }J  LS  LZ  LZ  \c  \j  \j  ls  l|  l|  ~E  ~L  ~L  NU  N]  N]  _f  _m  _m  ov  oA  oA  CJ  CO  CO  QX  Q_  Q_  ah  ao  ao  =r  s-'4A,UJ)Wc	&11\#)s?'""$\67<$**73'	.rZ   ) TV_XlaSend_Tr   r   r_   r`   r   r   ra   r   r   r   r   r   r   rb   r   r   rc   rd   re   rf   rg   rh   ri   r   r   rj   r   r   rk   rl   r   xla_sendtensorc           
         t         j                   xs t        j                         }|j                  }|j                  r	 t	        j
                  |d|| d|      }|S t        | ||fd      }|t        ur|S t/        j0                  |d      }	 t3        j4                  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$ rI t#        j$                  t&        dt)        | ||            }|t"        j*                  j,                  ur|cY S  w xY w# t        t         f$ rI t#        j$                  t&        dt)        | ||            }|t"        j*                  j,                  ur|cY S  w xY w)a}  Sends the named tensor to another XLA computation. Wraps the XLA Send operator

  documented at
   https://www.tensorflow.org/performance/xla/operation_semantics#send .

  Args:
    tensor: A `Tensor`. The tensor to send.
    tensor_name: A `string`. A string key that identifies the channel.
    name: A name for the operation (optional).

  Returns:
    The created Operation.
  XlaSendru  N)ru  r!   r"   r#   )r  ru  r!   )r%   r   r&   r'   r   r(   r)   r*   r+   r,   r-   _dispatcher_for_xla_sendr/   xla_send_eager_fallbackr1   r2   r3   r4   r   r  r5   r6   r7   r8   r9   r:   r;   )
r  ru  r!   rA   rB   rC   rD   rE   rF   rG   s
             rJ   r  r    s   " 
			0h..0$#\\11iv}kCgn. '	d$d,Gn$n!!+}=+

)::&kFAq#x 
*O && -
##At,,## 
(;
&.g		&$
k$@ @## 
z" ""b$f+$(*g 
	..<<	<$ Z	  
  
BF"&(
G i,,:::n	
sP    B, F ,C3?CC32C37D D F4AF	FAG&$G&zraw_ops.XlaSendc                     t        j                  |d      }t        j                  | g|g       \  }\  } | g}d|d|f}t        j                  dd||||      }d }|S )Nru  r$   s   XlaSendr   rN   )r8   r9   rQ   r   )r  ru  r!   r"   rY   rI   rH   rC   s           rJ   r  r  	  sm    !!+}=+66xbI'9F,-5&Z<v!$41''	.rZ   xla_set_boundboundc           
      *   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                         r&d}
|j6                  }t3        j8                  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$ rI t#        j$                  t&        dt)        | ||            }|t"        j*                  j,                  ur|cY S  w xY w# t        t         f$ rI t#        j$                  t&        dt)        | ||            }|t"        j*                  j,                  ur|cY S  w xY w)a  Set a bound for the given input value as a hint to Xla compiler,

          returns the same value.

  Args:
    input: A `Tensor` of type `int32`.
    bound: A `Tensor` of type `int32`.
    name: A name for the operation (optional).

  Returns:
    A `Tensor` of type `int32`.
  XlaSetBoundNrs   r#   )r   r  r!   )r%   r   r&   r'   r   r(   r)   r*   r+   r,   r-   _dispatcher_for_xla_set_boundr/   xla_set_bound_eager_fallbackr1   r2   r3   r4   r   r  r5   r6   r7   r:   r;   r8   r<   r?   r@   )r   r  r!   rA   rB   rC   rD   rE   rF   rG   rH   rI   s               rJ   r  r    s     
			0h..0$#\\11mT5%1gn, ,	tt%Gn$n	
)::U%d<Aq#x QK'""$F::L|VW6('	.W && -
##At,,## 
-%
'g		&)
Tt- -## 
z" ""2t%u4Hg 
	..<<	<  Z	  
  
TUF
G i,,:::n	
sP    C 5F: D+DDD#E <E F7 AF75F7:AHHzraw_ops.XlaSetBoundc                 8   t        j                  | t        j                        } t        j                  |t        j                        }| |g}d }t	        j
                  dd||||      }t	        j                         rt	        j                  d|||       |\  }|S )Ns   XlaSetBoundrM   rN   r  )r+   rX   rR   rV   r8   r   r<   r@   )r   r  r!   r"   rI   rH   rC   s          rJ   r  r  \  s    

 
 
6%

 
 
6%,&^Q|#)s?'""$|VW6('	.rZ   ) TV_XlaSetDynamicDimensionSize_Tr   r   r_   r`   r   r   ra   r   r   r   r   r   r   rb   r   r   rc   rd   re   rf   rg   rh   ri   r   r   rj   r   r   rk   rl   r   xla_set_dynamic_dimension_sizesizec                 \   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$ rJ t#        j$                  t&        dt)        | |||            }|t"        j*                  j,                  ur|cY S  w xY w# t        t         f$ rJ t#        j$                  t&        dt)        | |||            }|t"        j*                  j,                  ur|cY S  w xY w)a  Make a static dimension into a xla bounded dynamic dimension.

          The current static dimension size will become the bound and the second
          operand becomes the dynamic size of the dimension.

  Args:
    input: A `Tensor`.
    dim_index: A `Tensor` of type `int32`.
    size: A `Tensor` of type `int32`.
    name: A name for the operation (optional).

  Returns:
    A `Tensor`. Has the same type as `input`.
  XlaSetDynamicDimensionSizeNrs   r#   )r   r  r  r!   r$   )r%   r   r&   r'   r   r(   r)   r*   r+   r,   r-   ._dispatcher_for_xla_set_dynamic_dimension_sizer/   -xla_set_dynamic_dimension_size_eager_fallbackr1   r2   r3   r4   r   r  r5   r6   r7   r:   r;   r8   r<   r=   r?   r@   )r   r  r  r!   rA   rB   rC   rD   rE   rF   rG   rH   rI   s                rJ   r  r  l  sE   $ 
			0h..0$#\\11*D%DJgn0 =		4'/Gn$n
)::$EY+/d<Aq#x QK'""$3%%c*+F::L$lFGE('	.a && -
##At,,## 
>)T4
)41g		&:
Dt7 7## 
z" ""*B5?H:>T1Kg
 
	..<<	<& Z	  
  
("d=F8<4/I
G
 i,,:::n	
sP    C, 7G ,D3?DD32D37E! E! !G7AGGAH+)H+z"raw_ops.XlaSetDynamicDimensionSizec                 x   t        j                  | g|g       \  }\  } t        j                  |t        j
                        }t        j                  |t        j
                        }| ||g}d|f}t        j                  dd||||      }t        j                         rt        j                  d|||       |\  }|S )Nr$   s   XlaSetDynamicDimensionSizerM   rN   r  r  )	r   r  r  r!   r"   rY   rI   rH   rC   s	            rJ   r  r    s    55ugsBG'8E$$Y>)			gmm	4$D),>&:A$0C"&(' ""$$lFGE('	.rZ   ) TV_XlaSharding_Tr   r   r_   r`   r   r   ra   r   r   r   r   r   r   rb   r   r   rc   rd   re   rf   rg   rh   ri   r   r   rj   r   r   rk   rl   r   xla_sharding shardingc                 x   t         j                   xs t        j                         }|j                  }|j                  r	 t	        j
                  |d|| d|d|      }|S t        | |||fd      }|t        ur|S |d}t/        j0                  |d      }|g }t3        |t4        t6        f      st        d	|z        |D cg c]  }t/        j8                  |d       }}	 t;        j<                  d| |||      \  }	}	}
}|dd }t/        j>                         rYd
|
jA                  d
      d|
jC                  d      d|
jC                  d      f}|
jD                  }t/        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$ rJ t#        j$                  t&        dt)        | |||            }|t"        j*                  j,                  ur|cY S  w xY wc c}w # t        t         f$ rJ t#        j$                  t&        dt)        | |||            }|t"        j*                  j,                  ur|cY S  w xY w)a  An op which shards the input based on the given sharding attribute. It can

  selectively annotate a subset of tensor dimensions by skipping unspecified_dims,
  and the sharding annotation should be replicated in those dims.

  Args:
    input: A `Tensor`.
    sharding: An optional `string`. Defaults to `""`.
    unspecified_dims: An optional list of `ints`. Defaults to `[]`.
    name: A name for the operation (optional).

  Returns:
    A `Tensor`. Has the same type as `input`.
  XlaShardingr  unspecified_dimsN)r  r  r!   r"   r#   )r   r  r  r!   r  KExpected list for 'unspecified_dims' argument to 'xla_sharding' Op, not %r.r$   )$r%   r   r&   r'   r   r(   r)   r*   r+   r,   r-   _dispatcher_for_xla_shardingr/   xla_sharding_eager_fallbackr1   r2   r3   r4   r   r   r5   r6   r7   r8   r9   r   r   r   r   r:   r;   r<   r=   r>   r?   r@   )r   r  r  r!   rA   rB   rC   rD   r  rE   rF   rG   rH   rI   s                 rJ   r   r     s   $ 
			0h..0$#\\11mT5*h,.g n2 +	*D2D:Gn$nHx4(	$tUm	4
	%'7	89 9 K[[Bh'',>?[[
)::UX(8tEAq#x QK'""$3%%c*Jll:&(:ll-.0F ::L|VW6('	.y && -
##At,,## 
,(,d
4d<g		&(
(5E  ## 
z" """d4D(,.g
 
	..<<	<0 \
 Z	  
  
Dux2BO
G i,,:::n	
sV    E5 >II  5F<F##F<;F< G* G* *I AII AJ97J9zraw_ops.XlaShardingc                    |d}t        j                  |d      }|g }t        |t        t        f      st        d|z        |D cg c]  }t        j                  |d       }}t        j                  | g|g       \  }\  } | g}d|d|d|f}t        j                  dd||||      }	t        j                         rt        j                  d	|||	       |	\  }	|	S c c}w )
Nr  r  r  r  r$   s   XlaShardingrM   rN   r  )r8   r9   r   r   r   r2   r   rQ   r   r<   r@   )
r   r  r  r!   r"   r  rY   rI   rH   rC   s
             rJ   r  r  )  s   Hx4(	$tUm	4
	%'7	89 9 K[[Bh'',>?[[55ugsBG'8E,*h0B&^Q|#)s?'""$|VW6('	. \s   C) TV_XlaSort_Tr   r   r_   r`   r   r   ra   r   r   r   r   r   r   rb   r   r   rc   rd   re   rf   rg   rh   ri   r   r   rj   r   r   rk   rl   r   xla_sortc           	      >   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)ax  Wraps the XLA Sort operator, documented at

   https://www.tensorflow.org/performance/xla/operation_semantics#sort
  .

  Sorts a tensor. Currently only sorts in ascending order are supported.

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

  Returns:
    A `Tensor`. Has the same type as `input`. A `Tensor` of type T.
  XlaSortNrs   r#   r`  r$   )r%   r   r&   r'   r   r(   r)   r*   r+   r,   r-   _dispatcher_for_xla_sortr/   xla_sort_eager_fallbackr1   r2   r3   r4   r   r  r5   r6   r7   r:   r;   r8   r<   r=   r?   r@   rc  s              rJ   r  r  C  s   $ 
			0h..0$#\\11iu&gn, '	Gn$n	
)::T+Aq#x QK'""$3%%c*+F::L<2('	.W && -
##At,,## 
($.$ g		&$
d& &## 
z" ""b$U6g 
	..<<	<  Z	  
  
B5t4
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.XlaSortc                     t        j                  | g|g       \  }\  } | g}d|f}t        j                  dd||||      }t        j                         rt        j                  d|||       |\  }|S )Nr$   s   XlaSortrM   rN   r  )r8   rQ   r   r<   r@   rf  s          rJ   r  r    s{    55ugsBG'8E,>&Z<v!$41'""$<2('	.rZ   ) TV_XlaSpmdFullToShardShape_Tr   r   r_   r`   r   r   ra   r   r   r   r   r   r   rb   r   r   rc   rd   re   rf   rg   rh   ri   r   r   rj   r   r   rk   rl   r   xla_spmd_full_to_shard_shapemanual_shardingdimc                    t         j                   xs t        j                         }|j                  }|j                  r!	 t	        j
                  |d|| d|d|d|
      }|S t        | ||||fd      }|t        ur|S t/        j0                  |d      }|d	}t/        j2                  |d      }|g }t5        |t6        t8        f      st        d
|z        |D 	cg c]  }	t/        j2                  |	d       }}		 t;        j<                  d| ||||      \  }
}
}}|dd }t/        j>                         rjd|jA                  d      d|jC                  d      d|jE                  d      d|jC                  d      f}|jF                  }t/        jH                  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$ rK t#        j$                  t&        dt)        | ||||            }|t"        j*                  j,                  ur|cY S  w xY wc c}	w # t        t         f$ rK t#        j$                  t&        dt)        | ||||            }|t"        j*                  j,                  ur|cY S  w xY w)a(  An op used by XLA SPMD partitioner to switch from automatic partitioning to

  manual partitioning. It annotates the input (full-shape, to be automatically
  partitioned) with the same sharding used by manual partitioning, and outputs a
  shard-shaped tensor to be consumed by later manually-partitioned ops. If the
  shape is not evenly partitionable, the padding region will be masked with 0s.
  The conversion can happen partially in subgroups, by specifying the dim
  attribute, where only that dim will be converted.

  Args:
    input: A `Tensor`.
    manual_sharding: A `string`.
    dim: An optional `int`. Defaults to `-1`.
    unspecified_dims: An optional list of `ints`. Defaults to `[]`.
    name: A name for the operation (optional).

  Returns:
    A `Tensor`. Has the same type as `input`.
  XlaSpmdFullToShardShaper  r  r  N)r  r  r  r!   r"   r#   )r   r  r  r  r!   r  [Expected list for 'unspecified_dims' argument to 'xla_spmd_full_to_shard_shape' Op, not %r.r$   )%r%   r   r&   r'   r   r(   r)   r*   r+   r,   r-   ,_dispatcher_for_xla_spmd_full_to_shard_shaper/   +xla_spmd_full_to_shard_shape_eager_fallbackr1   r2   r3   r4   r   r  r5   r6   r7   r8   r9   r   r   r   r   r:   r;   r<   r=   r>   r   r?   r@   )r   r  r  r  r!   rA   rB   rC   rD   r  rE   rF   rG   rH   rI   s                  rJ   r  r    s3   . 
			0h..0$#\\11'u6G%79IKg n6 ;	&6>FGn$n%%o7HI/[
C#u%#	$tUm	4
	57G	HI I K[[Bh'',>?[[
)::!3B4D(,	.Aq#x  QK'""$3%%c*,=ll,-u&(:ll-.0F ::L!<B('	.K && -
##At,,## 
</3(8$
@$Hg		&8
c+$DB B ## 
z" 
""("dCR7:DT8<	/>g 
	..<<	<
6 \ Z	  

  
&DuAP58BR6:	-<
G i,,:::n	

sV    F  J	7 J  G'3GG'&G'+H H J-AJJAK(&K(zraw_ops.XlaSpmdFullToShardShapec                    t        j                  |d      }|d}t        j                  |d      }|g }t        |t        t
        f      st        d|z        |D cg c]  }t        j                  |d       }}t        j                  | g|g       \  }\  } | g}d|d|d|d|f}	t        j                  dd||	||	      }
t        j                         rt        j                  d
||	|
       |
\  }
|
S c c}w )Nr  r  r  r  r  r$   s   XlaSpmdFullToShardShaperM   rN   r  )r8   r9   r   r   r   r   r2   rQ   r   r<   r@   )r   r  r  r  r!   r"   r  rY   rI   rH   rC   s              rJ   r  r    s%   %%o7HI/[
C#u%#	$tUm	4
	57G	HI I K[[Bh'',>?[[55ugsBG'8E,+_eS&(&7$0C"&(' ""$!<B('	. \s   C3) TV_XlaSpmdShardToFullShape_Tr   r   r_   r`   r   r   ra   r   r   r   r   r   r   rb   r   r   rc   rd   re   rf   rg   rh   ri   r   r   rj   r   r   rk   rl   r   xla_spmd_shard_to_full_shapec                 4   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/        j0                  |d      }t/        j2                  |d      }|d
}t/        j4                  |d      }|g }t7        |t8        t:        f      st        d|z        |D 
cg c]  }
t/        j4                  |
d       }}
	 t=        j>                  d| |||||	      \  }}}}|dd }t/        j@                         r{d|jC                  d      d|jE                  d      d|jE                  d      d|jG                  d      d|jE                  d      f
}|jH                  }t/        jJ                  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  An op used by XLA SPMD partitioner to switch from manual partitioning to

  automatic partitioning. It converts the shard-shaped, manually partitioned input
  into full-shaped tensor to be partitioned automatically with the same sharding
  used by manual partitioning. The conversion can happen partially in subgroups,
  by specifying the dim attribute, where only that dim will be converted.

  Args:
    input: A `Tensor`.
    manual_sharding: A `string`.
    full_shape: A `tf.TensorShape` or list of `ints`.
    dim: An optional `int`. Defaults to `-1`.
    unspecified_dims: An optional list of `ints`. Defaults to `[]`.
    name: A name for the operation (optional).

  Returns:
    A `Tensor`. Has the same type as `input`.
  XlaSpmdShardToFullShaper  
full_shaper  r  N)r  r   r  r  r!   r"   r#   )r   r  r   r  r  r!   r  [Expected list for 'unspecified_dims' argument to 'xla_spmd_shard_to_full_shape' Op, not %r.r$   )&r%   r   r&   r'   r   r(   r)   r*   r+   r,   r-   ,_dispatcher_for_xla_spmd_shard_to_full_shaper/   +xla_spmd_shard_to_full_shape_eager_fallbackr1   r2   r3   r4   r   r  r5   r6   r7   r8   r9   r   r   r   r   r   r:   r;   r<   r=   r>   r   r?   r@   )r   r  r   r  r  r!   rA   rB   rC   rD   r  rE   rF   rG   rH   rI   s                   rJ   r  r  "  si   , 
			0h..0$#\\	11'u6Gz5#,.g n: ;	S2BDJG n$n%%o7HI/"":|<*[
C#u%#	$tUm	4
	57G	HI I K[[Bh'',>?[[
)::!3B.8c4D(,.Aq#x$ QK'""$3%%c*,=ll,-|ll<(%1B1B51I #,,/A"BDF ::L!<B('	.W && -
##At,,## 
</:s4Dd
L
g 
	&8
Z$44TK K ## 
z" ""("dCR>H7:DT8</>g 
	..<<	<< \ Z	  
  
&DuAP<F58BR6:-<
G i,,:::n	
sV    !G 0J7!J< HG99HHI 2I J4AJ42J4<ALLzraw_ops.XlaSpmdShardToFullShapec           
          t        j                  |d      }t        j                  |d      }|d}t        j                  |d      }|g }t	        |t
        t        f      st        d|z        |D cg c]  }t        j                  |d       }}t        j                  | g|g       \  }\  } | g}	d|d|d|d|d|f
}
t        j                  dd	|	|
||
      }t        j                         rt        j                  d|	|
|       |\  }|S c c}w )Nr  r   r  r  r!  r  r$   s   XlaSpmdShardToFullShaperM   rN   r  )r8   r9   r   r   r   r   r   r2   rQ   r   r<   r@   )r   r  r   r  r  r!   r"   r  rY   rI   rH   rC   s               rJ   r#  r#    s=   %%o7HI/"":|<*[
C#u%#	$tUm	4
	57G	HI I K[[Bh'',>?[[55ugsBG'8E,+_leS,.>@&7$0C"&(' ""$!<B('	. \s   3DXlaSvd)sur  TV_XlaSvd_Txla_svdc                    t         j                   xs t        j                         }|j                  }|j                  r6	 t	        j
                  |d|| d|d|d|
      }t        j                  |      }|S t        | ||||fd      }|t        ur|S t3        j4                  |d      }t3        j6                  |d      }t3        j8                  |d      }	 t;        j<                  d| ||||      \  }	}	}
}|dd }t3        j>                         rjd|
jA                  d      d|
jC                  d      d|
jC                  d      d	|
jE                  d	      f}|
jF                  }t3        jH                  d|||       t        j                  |      }|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$ rK t'        j(                  t*        dt-        | ||||            }|t&        j.                  j0                  ur|cY S  w xY w# t"        t$        f$ rK t'        j(                  t*        dt-        | ||||            }|t&        j.                  j0                  ur|cY S  w xY w)
a  Computes the eigen decomposition of a batch of self-adjoint matrices

  (Note: Only real inputs are supported).

  Computes the eigenvalues and eigenvectors of the innermost M-by-N matrices in
  tensor such that tensor[...,:,:] = u[..., :, :] * Diag(s[..., :]) * Transpose(v[...,:,:]).

  Args:
    a: A `Tensor`. Must be one of the following types: `float32`, `float64`, `int32`, `uint8`, `int16`, `int8`, `complex64`, `int64`, `qint8`, `quint8`, `qint32`, `bfloat16`, `qint16`, `quint16`, `uint16`, `complex128`, `half`, `uint32`, `uint64`.
      the input tensor.
    max_iter: An `int`.
      maximum number of sweep update, i.e., the whole lower triangular
      part or upper triangular part based on parameter lower. Heuristically, it has
      been argued that approximately log(min (M, N)) sweeps are needed in practice
      (Ref: Golub & van Loan "Matrix Computation").
    epsilon: A `float`. the tolerance ratio.
    precision_config: A `string`. a serialized xla::PrecisionConfig proto.
    name: A name for the operation (optional).

  Returns:
    A tuple of `Tensor` objects (s, u, v).

    s: A `Tensor`. Has the same type as `a`. Singular values. The values are sorted in reverse order of magnitude, so
      s[..., 0] is the largest value, s[..., 1] is the second largest, etc.
    u: A `Tensor`. Has the same type as `a`. Left singular vectors.
    v: A `Tensor`. Has the same type as `a`. Right singular vectors.
  r%  r  r  r   N)r  r  r   r!   r"   r#   )r*  r  r  r   r!   r$   )%r%   r   r&   r'   r   r(   _XlaSvdOutputrv   r)   r*   r+   r,   r-   _dispatcher_for_xla_svdr/   xla_svd_eager_fallbackr1   r2   r3   r4   r   r)  r5   r6   r7   r8   r   r   r9   r:   r;   r<   r   r>   r=   r?   r@   )r*  r  r  r   r!   rA   rB   rC   rD   rE   rF   rG   rH   rI   s                 rJ   r)  r)    s   > 
			0h..0$#\\	11haXy',.g ##G,gn0 &	
Hg/7?Gn$nx4(3'&&'79KL
)::A'#3$@Aq#x QK'""$#++J7ll9%'9ll-.S5G5G5LNF ::L,1('	.i && -
##At,,## 
'h!14
94Ag		&#
h+$DB B ## 
z" ""RHg/?dLg 
	..<<	<* Z	  
  
2ta(G-=DJ
G i,,:::n	
r  zraw_ops.XlaSvdc                    t        j                  |d      }t        j                  |d      }t        j                  |d      }t        j                  | g|t
        j                  t
        j                  t
        j                  t
        j                  t
        j                  t
        j                  t
        j                  t
        j                  t
        j                  t
        j                  t
        j                   t
        j"                  t
        j$                  t
        j&                  t
        j(                  t
        j*                  t
        j,                  t
        j.                  t
        j0                  g      \  }\  } | g}d|d|d|d|f}t        j2                  dd||||      }	t        j4                         rt        j6                  d|||	       t8        j;                  |	      }	|	S )	Nr  r  r   r$   s   XlaSvd   rN   r%  )r8   r   r   r9   rQ   rR   rU   r{   rV   r|   r}   r~   r   r   r   r   r   rT   r   r   r   r   rS   rW   r   r   r<   r@   r+  rv   )
r*  r  r  r   r!   r"   rY   rI   rH   rC   s
             rJ   r-  r-    s-   x4(3'&&'79KL111#sW__goo_f_l_lnun{n{  ~E  ~K  ~K  MT  MY  MY  [b  [l  [l  nu  n{  n{  }D  }J  }J  LS  LZ  LZ  \c  \j  \j  ls  l|  l|  ~E  ~L  ~L  NU  N]  N]  _f  _m  _m  ov  oA  oA  CJ  CO  CO  QX  Q_  Q_  ah  ao  ao  =r  s-'4A,)W6HC"&Y,f!$41'""$,1('	.rZ   TV_XlaVariadicReduce_Txla_variadic_reducec                 X   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        t5        |      |	k7  rt!        d
t5        |      |	fz        t/        |t0        t2        f      st        d|z        |D 
cg c]  }
t7        j8                  |
d       }}
	 t;        j<                  d| ||||      \  }}}}|dd }t7        j>                         rjd|jA                  d      d|jC                  d      d|jE                  d      d|jE                  d      f}|jF                  }t7        jH                  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$ rK t#        j$                  t&        dt)        | ||||            }|t"        j*                  j,                  ur|cY S  w xY wc c}
w # t        t         f$ rK t#        j$                  t&        dt)        | ||||            }|t"        j*                  j,                  ur|cY S  w xY w)a*  Wraps the variadic XLA Reduce operator.

  Semantics are documented at
   https://www.tensorflow.org/performance/xla/operation_semantics#variadic_reduce.

  This version is limited to operands of the same dtype.
  XlaVariadicReduceV2 is a version that supports heterogeneous operands.

  Args:
    input: A list of at least 1 `Tensor` objects with the same type in: `float32`, `float64`, `int32`, `uint8`, `int16`, `int8`, `complex64`, `int64`, `qint8`, `quint8`, `qint32`, `bfloat16`, `qint16`, `quint16`, `uint16`, `complex128`, `half`, `uint32`, `uint64`, `bool`.
      the input tensor(s)
    init_value: A list with the same length as `input` of `Tensor` objects with the same type as `input`.
      scalar initial value(s) for the reduction
    dimensions_to_reduce: A list of `ints`.
      dimension numbers over which to reduce
    reducer: A function decorated with @Defun. a reducer function to apply
    name: A name for the operation (optional).

  Returns:
    A list with the same length as `input` of `Tensor` objects with the same type as `input`.
  XlaVariadicReducer  r  Nr  r#   r  GExpected list for 'input' argument to 'xla_variadic_reduce' Op, not %r.LExpected list for 'init_value' argument to 'xla_variadic_reduce' Op, not %r.oList argument 'init_value' to 'xla_variadic_reduce' Op with length %d must match length %d of argument 'input'.VExpected list for 'dimensions_to_reduce' argument to 'xla_variadic_reduce' Op, not %r.Nr$   )%r%   r   r&   r'   r   r(   r)   r*   r+   r,   r-   #_dispatcher_for_xla_variadic_reducer/   "xla_variadic_reduce_eager_fallbackr1   r2   r3   r4   r   r1  r5   r6   r7   r   r   r   r   r8   r   r:   r;   r<   r   r=   r>   r?   r@   )r   r}  r  r  r!   rA   rB   rC   rD   _attr_Nr  rE   rF   rG   rH   rI   s                   rJ   r1  r1  (  ss   2 
			0h..0$#\\11!4
 4iJg n2 2	
0'4A4IGn$n	ED%=	)
	,.3	45 5 J'	Ju	.
	,.8	9: : 	_
	4	Z'"	#$ $ 
(4-	8
	,.B	CD D SggB(++B0FGgg
)::5Z2F%,49Aq#x QK'""$3$$S)30B0B30G$cll3I&Ji02F ::L\67<	.M && -
##At,,## 
3*2GT
CTKg		&/
2F$0 0 ## 
z" ""T*?S29&Fg
 
	..<<	<B h Z	  
  
r4e
=Q07d$D
G
 i,,:::n	
sV    G! K
< K !H(4HH('H(,I I K.AKKAL)'L)zraw_ops.XlaVariadicReducec                 R   t        | t        t        f      st        d| z        t	        |       }t        |t        t        f      st        d|z        t	        |      |k7  rt        dt	        |      |fz        t        |t        t        f      st        d|z        |D cg c]  }t        j                  |d       }}t        j                  t        |       t        |      z   |t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                   t        j"                  t        j$                  t        j&                  t        j(                  t        j*                  t        j,                  t        j.                  t        j0                  t        j2                  t        j4                  t        j6                  t        j8                  t        j:                  g      \  }}	|	d | g|	|d  z   }	|	d d |	dd  gz   }	|	\  } }t        |       t        |      z   }
d|d|d|d	|f}t        j<                  d
||
|||      }t        j>                         rt        j@                  d|
||       |S c c}w )Nr4  r5  r6  r7  r  rM   r8  r$   r  s   XlaVariadicReducerN   r3  )!r   r   r   r2   r   r3   r8   r   rQ   rR   rU   r{   rV   r|   r}   r~   r   r   r   r   r   rT   r   r   r   r   rS   rW   r   r>  r   r<   r@   )r   r}  r  r  r!   r"   r;  r  rY   r   rI   rH   rC   s                rJ   r:  r:    sW   	ED%=	)
	,.3	45 5 J'	Ju	.
	,.8	9: : 	_
	4	Z'"	#$ $ 
(4-	8
	,.B	CD D SggB(++B0FGgg66tE{T*EU7UWZ]d]l]lnun}n}  @G  @M  @M  OV  O\  O\  ^e  ^k  ^k  mt  my  my  {B  {L  {L  NU  N[  N[  ]d  ]j  ]j  ls  lz  lz  |C  |J  |J  LS  L\  L\  ^e  ^l  ^l  nu  n}  n}  F  M  M  OV  Oa  Oa  cj  co  co  qx  q  q  AH  AO  AO  QX  Q]  Q]  ]`  a'9'"#i&99)my}o-)!5*etJ//,#w(>	7,&17$0C"&(' ""$\67<	. hs   #J$xla_variadic_reduce_v2c                 B   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        |D 	cg c]  }	t5        j6                  |	d       }}		 t9        j:                  d| ||||      \  }
}
}}|dd }t5        j<                         rYd	|j?                  d	      d|j?                  d      d|j?                  d      f}|j@                  }t5        jB                  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 it        t         f$ rK t#        j$                  t&        dt)        | ||||            }|t"        j*                  j,                  ur|cY S  w xY wc c}	w # t        t         f$ rK t#        j$                  t&        dt)        | ||||            }|t"        j*                  j,                  ur|cY S  w xY w)
a  Wraps the variadic XLA Reduce operator.

  Semantics are documented at
   https://www.tensorflow.org/performance/xla/operation_semantics#variadic_reduce.

  This is an expanded version of XlaVariadicReduce, with support for
  operands of different dtypes, and improved shape inference.

  Args:
    inputs: A list of `Tensor` objects. the input tensor(s)
    init_values: A list of `Tensor` objects. Must have the same type as `inputs`.
      scalar initial value(s) for the reduction
    dimensions_to_reduce: A list of `ints`.
      dimension numbers over which to reduce
    reducer: A function decorated with @Defun. a reducer function to apply
    name: A name for the operation (optional).

  Returns:
    A list of `Tensor` objects. Has the same type as `inputs`.
  XlaVariadicReduceV2r  r  Nr  r#   )r?   init_valuesr  r  r!   YExpected list for 'dimensions_to_reduce' argument to 'xla_variadic_reduce_v2' Op, not %r.r$   )"r%   r   r&   r'   r   r(   r)   r*   r+   r,   r-   &_dispatcher_for_xla_variadic_reduce_v2r/   %xla_variadic_reduce_v2_eager_fallbackr1   r2   r3   r4   r   r=  r5   r6   r7   r   r   r   r8   r   r:   r;   r<   r>   r?   r@   )r?   r@  r  r  r!   rA   rB   rC   rD   r  rE   rF   rG   rH   rI   s                  rJ   r=  r=    s   0 
			0h..0$#\\11#T6; 4iJg n4 5	2GTCTKGn$n	(4-	8
	/1E	FG G SggB(++B0FGgg
)::f+4H'.T;Aq#x QK'""$3<<$&<ll12Ill9%'F ::L|VW>	.u && -
##At,,## 
6; 4gt
EtMg		&2
+4H$0 0 ## 
z" 	"""BF9DBV5<4)Ig 
	..<<	<	( h Z	  	
  
 "d&7B@T3:'G
G i,,:::n		
sV    E "H? I F)FFF!G <G H<#AH<:H<AJJzraw_ops.XlaVariadicReduceV2c                    t        |t        t        f      st        d|z        |D cg c]  }t	        j
                  |d       }}t	        j                  | |f|      \  }\  } }t        |       t        |      z   }d|d|d|f}	t	        j                  dt        |       ||	||      }
t	        j                         rt	        j                  d||	|
       |
S c c}w )NrA  r  r$   r  s   XlaVariadicReduceV2rN   r?  )r   r   r   r2   r8   r   args_to_mixed_eager_tensorsr   r   r<   r@   )r?   r@  r  r  r!   r"   r  rY   rI   rH   rC   s              rJ   rC  rC    s    	(4-	8
	/1E	FG G SggB(++B0FGgg#+#G#GQ\H]_b#c ' FKf[ 11,02FW&3S[$0C"&(' ""$|VW>	. hs   Cxla_variadic_sort	dimension	is_stablec                    t         j                   xs t        j                         }|j                  }|j                  r 	 t	        j
                  |d|| |d|d|	      }|S t        | ||||fd      }|t        ur|S t/        j0                  |d      }	 t3        j4                  d| ||||      \  }	}	}
}|dd }t/        j6                         rYd|
j9                  d      d|
j9                  d      d|
j;                  d      f}|
j<                  }t/        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 8t        t         f$ rK t#        j$                  t&        dt)        | ||||            }|t"        j*                  j,                  ur|cY S  w xY w# t        t         f$ rK t#        j$                  t&        dt)        | ||||            }|t"        j*                  j,                  ur|cY S  w xY w)	a  Wraps the XLA Sort operator, documented at

   https://www.tensorflow.org/performance/xla/operation_semantics#sort
  .

  Sorts one or more tensors, with support for custom comparator, dimension, and
  is_stable attributes.

  Args:
    inputs: A list of `Tensor` objects.
      A list of `Tensor` of identical shape but possibly different types.
    dimension: A `Tensor` of type `int32`.
      The dimension along which to sort. Must be a compile-time constant.
    comparator: A function decorated with @Defun.
      A comparator function to apply to 2*N scalars and returning a
      boolean. N is the number of sort inputs. If you want to sort in ascending
      order then the comparator should perform a less-than comparison.
    is_stable: A `bool`. Whether to use stable sort.
    name: A name for the operation (optional).

  Returns:
    A list of `Tensor` objects. Has the same type as `inputs`.
    A list of `Tensor` of same shape and types as the `input`.
  XlaVariadicSort
comparatorrH  N)rK  rH  r!   r"   r#   )r?   rG  rK  rH  r!   r$   ) r%   r   r&   r'   r   r(   r)   r*   r+   r,   r-   !_dispatcher_for_xla_variadic_sortr/    xla_variadic_sort_eager_fallbackr1   r2   r3   r4   r   rF  r5   r6   r7   r8   r   r:   r;   r<   r>   r   r?   r@   )r?   rG  rK  rH  r!   rA   rB   rC   rD   rE   rF   rG   rH   rI   s                 rJ   rF  rF  ,  s   8 
			0h..0$#\\11vy,K,g n2 0	J	494AGn$n  K8)
)::&I&0I $&Aq#x QK'""$3<<$lll<(+  -/F ::L<:	.i && -
##At,,## 
19j)T
;TCg		&-
)
i  ## 
z" ""r4v3=2;$$Hg
 
	..<<	<* Z	  
  
RVy1;09"F
G
 i,,:::n	
sP    D%  H %E,8EE,+E,0F F H2AH	HAI(&I(zraw_ops.XlaVariadicSortc                 z   t        j                  |d      }t        j                  | |      \  }} t        j                  |t
        j                        }t        |       |gz   }d|d|d|f}t        j                  dt        |       ||||      }	t        j                         rt        j                  d|||	       |	S )NrH  r$   rK  s   XlaVariadicSortrN   rJ  )r8   r   r   r+   rX   rR   rV   r   r   r   r<   r@   )
r?   rG  rK  rH  r!   r"   rY   rI   rH   rC   s
             rJ   rM  rM    s      K8);;FCH/'6$$Y>)f+,,
KK&/V$0C"&(' ""$<:	.rZ   	xla_whilec                    t         j                   xs t        j                         }|j                  }|j                  r	 t	        j
                  |d|| d|d|      }|S t        | |||fd      }|t        ur|S 	 t/        j0                  d| |||      \  }}}	}
|
dd }|s|	S t3        j4                         rYd|	j7                  d      d|	j7                  d      d|	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$ rJ t#        j$                  t&        dt)        | |||            }|t"        j*                  j,                  ur|cY S  w xY w# t        t         f$ rJ t#        j$                  t&        dt)        | |||            }|t"        j*                  j,                  ur|cY S  w xY w)	a  output = input; While (Cond(output)) { output = Body(output) }

  Args:
    input: A list of `Tensor` objects.
      A list of input tensors whose types are T.
    cond: A function decorated with @Defun.
      A function takes 'input' and returns a tensor.  If the tensor is
      a scalar of non-boolean, the scalar is converted to a boolean
      according to the following rule: if the scalar is a numerical
      value, non-zero means True and zero means False; if the scalar is
      a string, non-empty means True and empty means False. If the
      tensor is not a scalar, non-emptiness means True and False
      otherwise.
    body: A function decorated with @Defun.
      A function that takes a list of tensors and returns another
      list of tensors. Both lists have the same types as specified by T.
    name: A name for the operation (optional).

  Returns:
    A list of `Tensor` objects. Has the same type as `input`.
    A list of output tensors whose types are T.
  XlaWhilerA  bodyN)rA  rR  r!   r"   r#   )r   rA  rR  r!   r$   )r%   r   r&   r'   r   r(   r)   r*   r+   r,   r-   _dispatcher_for_xla_whiler/   xla_while_eager_fallbackr1   r2   r3   r4   r   rO  r5   r6   r7   r:   r;   r8   r<   r>   r?   r@   )r   rA  rR  r!   rA   rB   rC   rD   rE   rF   rG   rH   rI   s                rJ   rO  rO    sY   4 
			0h..0$#\\11j$vtVTCgn, (	dD"D*Gn$n	
)::%dDBAq#x QK'	J""$3<<$fcll6.BFll6"$F::LL&'3	.[ && -
##At,,## 
)$d
$d,g		&%
dDd< <## 
z" ""r4e$TMg 
	..<<	<  Z	  
  
RE4dK
G i,,:::n	
sP    D 9G6 E#D>>EEF 5F G3AG31G36AIIzraw_ops.XlaWhilec                     t        j                  | |      \  }} t        |       }d|d|d|f}t        j                  dt	        |       ||||      }t        j
                         rt        j                  d|||       |S )Nr$   rA  rR  s   XlaWhilerN   rQ  re  )	r   rA  rR  r!   r"   rY   rI   rH   rC   s	            rJ   rT  rT    s|    ::5#F.'5e,&$5&[#e*\#)s?'""$L&'3	.rZ   )N)rM   N(  __doc__collectionstensorflow.pythonr   tensorflow.python.eagerr   r%   r   r)   r   r8   tensorflow.python.frameworkr   rR   tensorflow.security.fuzzing.pyr   _atypesr	   _op_def_registryr
   r+   r   r:   "tensorflow.python.util.deprecationr   tensorflow.python.utilr   r4    tensorflow.python.util.tf_exportr   typingr   r   r   typing_extensionsr   r   add_fallback_dispatch_listadd_type_based_api_dispatcherInt32strr   	to_raw_opr    _tf_type_based_dispatcherDispatchr.   r0   
namedtupleru   r^   rm   rn   r[   rw   rx   intr>  r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   UInt32floatBFloat16r   r   r   r   r  r  r  r  r  r	  r
  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r$  r%  r&  r(  r)  r.  r/  r0  r2  r3  r4  r9  r:  r;  r?  r@  rC  rH  rI  rW  rO  rP  rQ  rL  rX  rY  r]  r_  ra  rb  rg  rh  ri  ro  rp  rq  rs  rt  rw  rx  ry  r{  r|  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   UInt64r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r  r  r  r
  r  r  r  r  r  r  r  r  r  r  r  r  r"  r#  r+  r(  r)  r%  r,  r-  r0  r1  r3  r9  r:  r=  r?  rB  rC  rF  rJ  rL  rM  rO  rQ  rS  rT  r#   rZ   rJ   <module>rp     sj=  
  6 7 1 7 9 F K 3 I C 8 6 % % '/1CEVXfhw  zJ  K 
%%
((
T)C):$:; TyY\^e^k^kYkOl Ty| T  EH T  Xa  be  gx  bx  Xy T  ) &Tl 1y/01OP!/!I!I!R!R 38I3I)J ^ghkmtmzmzhz^{   IL   TW   gp  qt  vG  qG  gH  3K22< " 
 "";=OQegz  }N  Pa  cq  sB  DS  Ud  ft  vF  HX  Zi  k|  ~N  P`  br  tD  FU  V !()I?\k!l 
%%
((
!"Ni-D(DE NIVY[rVrLs N  FO  PS  Us  Ps  Ft N # ) &N` =Y;<^T^^L`=ab ';'U'U'^'^ $Ys<S7S-T [deh  kB  fB  \C   U^  _b  dB  _B  UC  %%
((
OQ]_oq  PU  gi  pt F3 F F  KO F  ) &FP 3	12>4>>/3RS"1"K"K"T"T 6# 6s 6  RV 6r ~'9;OQdfw  zK  M[  ]l  n}  N  P^  `p  rB  DS  Uf  hx  zJ  L\  ^n  p  @3_oV 
%%
((
:j)C-. jYsL?P5Q jclmp  sF  nF  dG j  R[  \_  at  \t  Ru j  EN  OR  Tg  Og  Eh j  xA  BE  GZ  BZ  x[ j  r{  |  AT  |T  rU j  jm j  AD j  T]  ^a  co  ^o  Tp j  ) &jX ')%
&~t~~h'?
@#==FF 3+<!= IcS_N_D` r{|  BU  }U  sV   aj  kn  pC  kC  aD   T]  ^a  cv  ^v  Tw   GP  QT  Vi  Qi  Gj   AJ  KN  Pc  Kc  Ad   y|   PS   cl  mp  r~  m~  c & /1CEY[n  qB  DU  We  gv  xG  IX  Zh  jz  |L  N]  _p  rB  DT  Vf  hx  zI  J /1CEY[n  qB  DU  We  gv  xG  IX  Zh  jz  |L  N]  _p  rB  DT  Vf  hx  zI  J  7/Z &-.SUgi}  @S  Uf  hy  {I  KZ  \k  m|  ~L  N^  `p  rA  CT  Vf  hx  zJ  L\  ^m  'n #
%%
((
=DYs$556 DYsL]G]=^ Dpyz}  @U  {U  qV D  aj  kn  pE  kE  aF D  V_  `c  ez  `z  V{ D  KT  UX  Zo  Uo  Kp D  GP  QT  Vk  Qk  Gl D  AD D  X[ D  uX D  lo D  AJ  KN  Ps  Ks  At D  ) &DL +I)*>4>>++FG	)CCLL Ic3D.D$E IVY[lVlLm   @I  JM  Od  Jd  @e   py  z}  T  zT  pU   en  or  tI  oI  eJ   Zc  dg  i~  d~  Z   V_  `c  ez  `z  V{   PS   gj   Dg   |   OX  Y\  ^A	  YA	  OB	 2 !  P
 
%%
((
Ts TC TH^ Tu~  @C  E[  @[  v\ T  ) &Tl 3	12>4>>/3RS"1"K"K"T"T c 3 Wm   EN  OR  Tj  Oj  Ek $ %%
((
 x3 x x^b x ! ) &xt 7)56~t~~FX7YZ%7%Q%Q%Z%Z "# WZ mq : %%
((
\)C$78 \U \W\ \dg \{ \  PY  Z]  _f  _o  _o  Zo  Pp \  ) &\| 3	12>4>>.3QR!/!I!I!R!R 33F)G TY fk sv   KO   _h  il  nu  n~  n~  i~  _ $ m%79MObdu  xI  KY  [j  l{  }L  N\  ^n  p@  BQ  Sd  fv  xH  JZ  \l  n}  ~
%%
((
9O3+, O9S+=M3N Ocf Oz} O  NW  X[  ]h  Xh  Ni O  ) &Ob 
%#	$^T^^G%<	=!;;DD 	#{*: ; )CQ\L\B] ru   JM   ]f  gj  lw  gw  ]x " -/ACWYln  BS  Uc  et  vE  GV  Xf  hx  zJ  L[  ]n  p@  BR  Td  fv  xG  H -/ACWYln  BS  Uc  et  vE  GV  Xf  hx  zJ  L[  ]n  p@  BR  Td  fv  xG  H %,-QSeg{  ~Q  Sd  fw  yG  IX  Zi  kz  |J  L\  ^n  p  AR  Td  fv  xH  JZ  \k  &l "
%%
((
<^Ic#334 ^9SJZEZ;[ ^ps ^  HK ^  eG ^  W`  ad  fH  aH  WI ^  ) &^@ )9'(
)CD'AAJJ 9S2B-B#C )TWYiTiJj   @C   WZ   tV   fo  ps  uW  pW  fX &   L
 %&C_Vef 
%%
((
QYs,@'@A QR[\_a|\|R} Q  NW  X[  ]x  Xx  Ny Q  IR  SV  Xl  Sl  Im Q   ) &Qf 7)56~t~~FW7XY$5$O$O$X$X !Ic;O6O,P ajkn  qL  lL  bM   ]f  gj  lG  gG  ]H   Xa  be  g{  b{  X|  %  X
 $+,OQ`bq$r !
%%
((
%&OIc3M.M$N OXabe  hB  cB  YC O  NW  X[  ]~  X~  N O  OX  Y\  ^x  Yx  Oy O ' ) &Ob C	"AB>4>>RjCkl +C+]+]+f+f (9SB\=\3] gpqt  wQ  rQ  hR   ]f  gj  lM  gM  ]N   ^g  hk  mG  hG  ^H  )+=?RTef
%%
((
<C)C/0 CYsN?R5S C_b Cr{|  BP  }P  sQ C  ) &CJ +I)*>4>>*+EF	'AAJJ 3+>!? IcSaNaDb nq   BK  LO  Q_  L_  B`  )+=~Ocex  {L  N_  ao  q@  BQ  Sb  dr  tD  FV  Xg  iz  |L  N^  `p  rB  DS  T 7/Z 
%%
((
<]	#~"56 ]yQTVkQkGl ]  |E  FI  K`  F`  |a ]  vy ]  OS ]  cl  mp  r@  m@  cA ]  ) &]~ +I)*>4>>*+EF	'AAJJ yn1D'E V_`cez`zV{   KT  UX  Zo  Uo  Kp   EH   ^b   r{  |  AO  |O  rP $   @

%%
((
8V3./ V  ) &Vp 	#	/">4>>&#9:99BB 	#~*= > $ 0//O$& 
 57IK\^oq  BQ  Sb  ds  uC  EU  Wg  iy  {J  K   L
 
%%
((
 GYs,@'@A G9UXZnUnKo G ! ) &GR 7)56~t~~FX7YZ%7%Q%Q%Z%Z "Ic;O6O,P Zcdgi}d}Z~  %%
((
%&= ' ) &=~ E#CD^T^^TlEmn +C+]+]+f+f (
   z	1?OT 
%%
((
9X9S+-. XykIY?Z Xirsv  yK  tK  jL X  \e  fi  k}  f}  \~ X  R[  \_  as  \s  Rt X  DM  NQ  S^  N^  D_ X  ) &Xt 
%#	$^T^^G%<	=!;;DD )C,<"= iX[]hXhNi   yB  CF  HZ  CZ  y[   kt  ux  zL  uL  kM   aj  kn  pB  kB  aC   S\  ]`  bm  ]m  Sn     D
 
%%
((
:J$ J3 JYWZ\lWlMm J  ) &JX ')%
&~t~~h'?
@#==FF #3 # \efik{f{\|  )+=~Ocex  {L  N_  ao  q@  BQ  Sb  dr  tD  FV  Xg  iz  |L  N^  `p  rB  DS  T
%%
((
<Si^ 34 S)CQ_L_B` S  PY  Z]  _m  Zm  Pn S  ) &Sj +I)*>4>>*+EF	'AAJJ YsN/B%C QZ[^`n[nQo   _h  il  n|  i|  _} ( "";=OQbdu  xF  G 
%%
((
!"N)C1H,H"I NZ] Nnq N  BK  LO  Qh  Lh  Bi N # ) &N` =Y;<^T^^L`=ab ';'U'U'^'^ $3@W;W1X il   ~A   QZ  [^  `w  [w  Qx     79KM^`np  BR  S 
%%
((
 Pi-B(BC PW`adfmfsfsasWt P  JS  TW  Y`  Yf  Yf  Tf  Jg P  tw P  GP  QT  Vk  Qk  Gl P ! ) &Pd 9978HZ9[\ %7%Q%Q%Z%Z "Ys<Q7Q-R fopsu|  vC  vC  qC  gD   Yb  cf  ho  hu  hu  cu  Yv   CF   V_  `c  ez  `z  V{   57I>[o  rE  GX  Zk  m{  }L  N]  _n  p~  @P  Rb  ds  uF  HX  Zj  l|  ~N  P_  ` %&C_Vef 
%%
((
cYs,@'@A cyY\^rYrOs c  IR  SV  Xs  Ss  It c  FO  PS  Up  Pp  Fq c  CL  MP  Rm  Mm  Cn c  BK  LO  Ql  Ll  Bm c  xA  BE  Gb  Bb  xc c  @I  JM  Oc  Jc  @d c   ) &cJ 7)56~t~~FW7XY$5$O$O$X$X !Ic;O6O,P ^ghk  nB  iB  _C   Xa  be  gB  bB  XC   U^  _b  d  _  U@   R[  \_  a|  \|  R}   QZ  [^  `{  [{  Q|   GP  QT  Vq  Qq  Gr   OX  Y\  ^r  Yr  Os " &-  &h
 "
%%
((
./EYs<^7^-_ Eluvy  |C  |I  |I  wI  mJ E  Zc  dg  iK  dK  ZL E 0 ) &EN !S	*Q RSaSWSaSa  cD  TE  !F 4U4o4o4x4x 1IcKmFm<n   |E  FI  KR  KX  KX  FX  |Y   ir  sv  xZ  sZ  i[  %%
((
;3+=!> ;  ) &;z 1y/01OP!/!I!I!R!R 		#w}}:L0M 	 3K228 
 &&C_Vegu  xH  JZ  \k  l &'EXgh 
%%
((
"# KR  KY  KY  `d WYsGMM/A%B WS\]`bibpbp]pSq W  {D  EH  Jf  Ef  {g W  oJ W $ ) &Wr =Y;<^T^^La=bc (=(W(W(`(` %Ic7==>P4Q bkloqxqql  cA   JS  TW  Yu  Tu  Jv   Z $ +-?Qegz  }N  Pa  cq  sB  DS  Ud  ft  vF  HX  Zi  k|  ~N  P`  br  tD  FU  V !9?O\ 
%%
((
=g3#78 g9UXZpUpKq g  }F  GJ  L[  G[  }\ g  EH g  ^b g  r{  |  AP  |P  rQ g  ) &gR -Y+,^T^^K-HI
)CCLL 	#2F(G Zcdgid  [A   LU  VY  [j  Vj  Lk   TW   mq   AJ  KN  P_  K_  A` & ##=?QSgi|  P  Rc  es  uD  FU  Wf  hv  xH  JZ  \k  m~  @P  Rb  dt  vF  HW  X ")*K_^m"n 
%%
((
#$cIc3K.K$L cajkn  qP  lP  bQ c  cl  mp  rQ  mQ  cR c  ]f  gj  lK  gK  ]L c  V_  `c  e}  `}  V~ c  LU  VY  [s  Vs  Lt c  U^  _b  d|  _|  U} c % ) &cJ ?i =>~t~~Nd?ef )?)Y)Y)b)b &9SBZ=Z3[ pyz}  @_  {_  q`   r{  |  A`  |`  ra   lu  vy  {Z  vZ  l[   en  or  tL  oL  eM   [d  eh  jB  eB  [C   dm  nq  sK  nK  dL   2;11#J 
 !!9;MOcex  {L  N_  ao  q@  BQ  Sb  dr  tD  FV  Xg  iz  |L  N^  `p  rB  DS  T 
%%
((
!"]Ic+A&AB ]4 ][^ ]in ] # ) &]~ ;I9:>4>>J^;_` ';'U'U'^'^ $9S:P5P+Q Z^ jm x} "   |	
%%
((
:<YsL01 < <  ) &<z ')%
&~t~~h'?
@#==FF Ic<.?$@ s  %%
((
??3#56 ?ygmmI[?\ ?luvy  |C  |I  |I  wI  mJ ?  ) &?B /i-.~t~~m/LM - G G P P 	#w}}2D(E iX[]d]j]jXjNk   |E  FI  KR  KX  KX  FX  |Y  #*  #b
 
%%
((
+,F)C9X4X*Y Ffopsu|  vC  vC  qC  gD F  LU  VY  [b  [h  [h  Vh  Li F  yB  CF  Hg  Cg  yh F - ) &FP MY'KL^T^^\zM{| 1O1i1i1r1r .3HgCg9h u~  @C  EL  ER  ER  @R  vS   [d  eh  jq  jw  jw  ew  [x   HQ  RU  Wv  Rv  Hw     D
 
%%
((
>GI\^ei S	#'7"78 S3 Snwx{  ~N  yN  oO S  ) &Sj /i-.~t~~l/KL+EENN y6F1F'G SV   yB  CF  HX  CX  yY 0   |	
%%
((
:AIc</0 A	#|J[@\ A  ) &AF ')%
&~t~~h'?
@#==FF 
9S,->#? 
yY\^jYjOk 
  '   \
 
%%
((
)*tv  JL  SW a	#7S2S(T agj aps a  \e  fi  kG  fG  \H a + ) &aF G)$EF~t~~VrGst /K/e/e/n/n ,yFbAb7c vy   AD   fo  ps  uQ  pQ  fR 4  '   \
 
%%
((
)* AC  VX  _c g	#7S2S(T ggj g| g  hq  ru  wS  rS  hT g + ) &gR G)$EF~t~~VrGst /K/e/e/n/n ,yFbAb7c vy   MP   r{  |  A]  |]  r^ 4 '&&
 m%79MObdu  xI  KY  [j  l{  }L  N\  ^n  p@  BQ  Sd  fv  xH  JZ  \l  n}  ~
%%
((
9Yyk)* Yc YE Y]` Y  ) &Yv 
%#	$^T^^G%<	=!;;DD i[(89 S SX lo " !!9;M~_s  vI  K\  ^o  q  AP  Ra  cr  tB  DT  Vf  hw  yJ  L\  ^n  p@  BR  Tc  d 
%%
((
 !dyc4J)JK dYbcghkcl  oE  dE  ZF d " ) &dL ;I9:>4>>J];^_ &9&S&S&\&\ #!iS	CY8Y.Z !hqrvwzr{  ~T  sT  iU !H %%
((
#$W % ) &Wr ?i =>~t~~Nd?ef )?)Y)Y)b)b && %%
((
U33E)F U_c U   ) &Un 7)56~t~~FW7XY$5$O$O$X$X !	#w}}BT8U nr  %%
((
;K  ) &KZ )9'(	)BC%??HH 	rZ   