
    AVh)                         d Z ddlZddlmZ ddlmZ ddlmZ ddlm	Z
 ddlmZ ddlmZ dd	lmZ dd
lmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZm Z m!Z! ddl"m#Z#  ed Z$d!de$de%de%de&de%de'de#e!e$f   fdZ(  ed       ejR                  e(            Z*de$de%de%de&de%de'de#e!e$f   fdZ+ ed Z,d!de#e!e,f   de%de%de&de%de'fdZ-  ed       ejR                  e-            Z.de#e!e,f   de%de%de&de%de'fd Z/y)"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_Recv_tensor_type_atypes.BFloat16_atypes.Bool_atypes.Complex128_atypes.Complex64_atypes.Float16_atypes.Float32_atypes.Float64_atypes.Float8e4m3b11fnuz_atypes.Float8e4m3fn_atypes.Float8e4m3fnuz_atypes.Float8e5m2_atypes.Float8e5m2fnuz_atypes.Half_atypes.Int16_atypes.Int32_atypes.Int4_atypes.Int64_atypes.Int8_atypes.QInt16_atypes.QInt32_atypes.QInt8_atypes.QUInt16_atypes.QUInt8_atypes.Resource_atypes.String_atypes.UInt16_atypes.UInt32_atypes.UInt4_atypes.UInt64_atypes.UInt8_atypes.Varianttensor_typetensor_namesend_devicesend_device_incarnationrecv_deviceclient_terminatedreturnc                 d   t         j                   xs t        j                         }|j                  }|j                  r&	 t	        j
                  |d|d| d|d|d|d|d|      }	|	S t        j                  | d      } t        j                  |d      }t        j                  |d      }t        j                   |d      }t        j                  |d      }|d
}t        j"                  |d      }t%        j&                  d| ||||||      \  }}}}|dd }	t        j(                         rd|j+                  d      d|j-                  d      d|j-                  d      d|j/                  d      d|j-                  d      d|j1                  d      f}|j2                  }t        j4                  d|||	       |	\  }	|	S # t        j                  $ r }
t        j                  |
|       Y d}
~
nd}
~
wt        j                  $ r Y nw xY w	 t        | |||||||	      S # t        j                  $ r Y w xY w)a  Receives the named tensor from send_device on recv_device.

  Args:
    tensor_type: A `tf.DType`.
    tensor_name: A `string`. The name of the tensor to receive.
    send_device: A `string`. The name of the device sending the tensor.
    send_device_incarnation: An `int`. The current incarnation of send_device.
    recv_device: A `string`. The name of the device receiving the tensor.
    client_terminated: An optional `bool`. Defaults to `False`.
      If set to true, this indicates that the node was added
      to the graph as a result of a client-side feed or fetch of Tensor data,
      in which case the corresponding send or recv is expected to be managed
      locally by the caller.
    name: A name for the operation (optional).

  Returns:
    A `Tensor` of type `tensor_type`.
  Recvr3   r4   r5   r6   r7   r8   N)r3   r4   r5   r6   r7   r8   namectxF)r3   r4   r5   r6   r7   r8   r<   )_contextr   _thread_local_datais_eagerr   TFE_Py_FastPathExecute_core_NotOkStatusException_opsraise_from_not_ok_status_FallbackExceptionrecv_eager_fallback_SymbolicException_execute	make_typemake_strmake_int	make_bool_op_def_library_apply_op_helpermust_record_gradient_get_attr_typeget_attr_get_attr_int_get_attr_boolinputsrecord_gradient)r3   r4   r5   r6   r7   r8   r<   _ctxtld_resulte__op_outputs_attrs_inputs_flats                   V/home/dcms/DCMS/lib/python3.12/site-packages/tensorflow/python/ops/gen_sendrecv_ops.pyrecvra      sG   & 
			0h..0$#\\
11fdM;]K1J.	0g
 n "";>+!!+}=+!!+}=+$--.EG`a!!+}=+(():<OP'88K['(?';L!QX QK'""$S//>ll=)=ll=)+D 9:Mll=)+>  !457F ::Lfg/('	.Q && -
##At,,## 
 !{!"9!5F  ## 
s0    $F: :HG((H HH H/.H/zraw_ops.Recvc                    t        j                  | d      } t        j                  |d      }t        j                  |d      }t        j                  |d      }t        j                  |d      }|d}t        j                  |d      }g }d| d|d|d|d|d|f}	t        j
                  dd	||	||
      }
t        j                         rt        j                  d||	|
       |
\  }
|
S )Nr3   r4   r5   r6   r7   Fr8   s   Recv   rU   attrsr=   r<   r;   )rI   rJ   rK   rL   rM   r   rP   rV   )r3   r4   r5   r6   r7   r8   r<   r=   r_   r^   rY   s              r`   rG   rG   e   s    "";>+!!+}=+!!+}=+$--.EG`a!!+}=+(():<OP,;{7=+7J& WaF!$41'""$fg/('	.    ) 	TV_Send_Tr   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   r2   tensorc                    t         j                   xs t        j                         }|j                  }|j                  r%	 t	        j
                  |d|| d|d|d|d|d|      }	|	S t        j                  |d      }t        j                  |d      }t        j                  |d      }t        j                  |d      }|d	}t        j                   |d      }t#        j$                  d| ||||||
      \  }}}}|S # t        j                  $ r }
t        j                  |
|       Y d}
~
nd}
~
wt        j                  $ r Y nw xY w	 t        | |||||||      S # t        j                  $ r Y 
w xY w)a  Sends the named tensor from send_device to recv_device.

  Args:
    tensor: A `Tensor`. The tensor to send.
    tensor_name: A `string`. The name of the tensor to send.
    send_device: A `string`. The name of the device sending the tensor.
    send_device_incarnation: An `int`. The current incarnation of send_device.
    recv_device: A `string`. The name of the device receiving the tensor.
    client_terminated: An optional `bool`. Defaults to `False`.
      If set to true, this indicates that the node was added
      to the graph as a result of a client-side feed or fetch of Tensor data,
      in which case the corresponding send or recv is expected to be managed
      locally by the caller.
    name: A name for the operation (optional).

  Returns:
    The created Operation.
  Sendr4   r5   r6   r7   r8   N)r4   r5   r6   r7   r8   r<   r=   F)rh   r4   r5   r6   r7   r8   r<   )r>   r   r?   r@   r   rA   rB   rC   rD   rE   rF   send_eager_fallbackrH   rI   rK   rL   rM   rN   rO   )rh   r4   r5   r6   r7   r8   r<   rW   rX   rY   rZ   r[   r\   r]   s                 r`   sendrl   ~   s   & 
			0h..0$#\\	11fdFM;.0G{$79JLg n !!+}=+!!+}=+$--.EG`a!!+}=+(():<OP'88v;'(?';L!QX 
*5 && -
##At,,## 
 
k{"9!5F	 
 ## 
s0    #C: :ED((E EE E/.E/zraw_ops.Sendc                    t        j                  |d      }t        j                  |d      }t        j                  |d      }t        j                  |d      }|d}t        j                  |d      }t        j                  | g|g       \  }\  } | g}	d|d|d|d|d|d|f}
t        j
                  dd	|	|
||
      }d }|S )Nr4   r5   r6   r7   Fr8   Ts   Sendr   rd   )rI   rK   rL   rM   args_to_matching_eagerr   )rh   r4   r5   r6   r7   r8   r<   r=   _attr_Tr_   r^   rY   s               r`   rk   rk      s    !!+}=+!!+}=+$--.EG`a!!+}=+(():<OP66xbI'9F,-m(*A13DF& WaF!$41''	.rf   )FN)0__doc__collectionstensorflow.pythonr   tensorflow.python.eagerr   r>   r   rB   r   rI   tensorflow.python.frameworkr   _dtypestensorflow.security.fuzzing.pyr   _atypesr	   _op_def_registryr
   rD   r   rN   "tensorflow.python.util.deprecationr   tensorflow.python.utilr   	_dispatch tensorflow.python.util.tf_exportr   typingr   r   r   typing_extensionsr   r   strintboolra   	to_raw_opr;   rG   rg   rl   rj   rk    rf   r`   <module>r      s  
  6 7 1 7 9 F K 3 I C 8 6 % % '  J
 E) E E# Ehk Ez} E  RV E  lu  vy  {N  vN  lO EN !y !56%8 s Y\ wz   JM   bf   v  @C  EX  @X  vY .   v		63	>* 6 63 6il 6{~ 6  SW 6n !y !56	#y. 9  Z] x{   KN   cg rf   