
    BVh                     x   d Z ddlmZ ddlmZ dZdZdZdZdZ	d	Z
d
ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ d Z!d!Z"d"Z#d#Z$d$Z%d%Z&d&Z'd'Z(d(Z) e*eeee
eeeeeee%eh      Z+ e*       jY                  e+ee&h      Z- e*       jY                  e-ee	eeeeeeeeeeeeee e!e"e#e$e'e(e)h      Z.d) Z/d,d+Z0y*)-zDThis file lists FunctionDef attributes and corresponding allowlists.    )attr_value_pb2)compatapi_implementsapi_preferred_devicebackward_function_name_disable_acd_disable_call_shape_inferencedisable_summaries_at_runtime_construction_contextforward_function_namego_backwards_implements_input_shapesexperimental_ints_on_device	_noinline_original_func_name_OutputsOnOpDeviceztf_quant.composite_functionztf_quant.quantized_opsruntime_constant_optimizationshared_rendezvous_tf_data_function_tftrt_allow_build_at_runtime_tftrt_convert_function_tftrt_is_dyn_op_tftrt_trt_logger_name_tftrt_max_batch_size_tftrt_max_cached_engines_tftrt_max_workspace_size_bytes_tftrt_minimum_segment_size_tftrt_precision_mode_tftrt_profile_strategy_tftrt_use_calibration_tftrt_use_implicit_batch
time_major_XlaMustCompile_XlaCompile	_XlaScope_XlaSeparateCompiledGradientsc           	      0   t        |t        j                        r|S t        |t              rt        j                  |      S t        |t              rt        j                  |      S t        |t
              rt        j                  |      S t        |t        t        f      r)t        j                  t        j                  |            S t        |t              rt        j                  j                         }|D ]  }t        |t              r|j                  j                  |       /t        |t              r|j                  j                  |       [t        |t
              r|j                  j                  |       t        |t        t        f      r/|j                   j                  t        j                  |             t#        d|  dt%        |       d       t        j                  |      S t#        d	|  d
t%        |       d      )z?Converts a python object to an attr_value_pb2.AttrValue object.)b)i)f)szAttributes for z* must be bool, int, float, or string. Got .)listz
Attribute z; must be bool, int, float, string, list, or AttrValue. Got )
isinstancer   	AttrValueboolintfloatstrbytesr   as_bytesr.   	ListValuer)   appendr*   r+   r,   
ValueErrortype)keyvalue
list_valuevs       g/home/dcms/DCMS/lib/python3.12/site-packages/tensorflow/python/eager/polymorphic_function/attributes.py_parse_func_attr_valuer@   y   s   ~//0L%##e,,%##e,,%##e,,%#u&##fooe&<==%))335J 
	At	AaAaAa#u&FOOA./cU #7)1
 	

 ##44

SE u+a	)     Nc                     |st         }i }| j                         D ]'  \  }}||vrt        d| d      t        ||      ||<   ) |S )a  Convert the keyword arguments into function_def attributes.

  Currently only support primitive types: bool, int, float and string.

  Args:
    attributes: the dictionary of attributes.
    allowlist: set of attribute names allowed.
  Returns:
    A dict of attributes where the key is the name of attribute and the value
      is the AttrValue proto.
  Raises:
    ValueError: If the kwargs contains unallowlisted name or unsupported value
      types.
  zAllowlist does not support `z` as an attribute.)MONOMORPHIC_FUNCTION_ALLOWLISTitemsr9   r@   )
attributes	allowlistattrsr;   r<   s        r?   parse_func_attrsrH      sh     
.I
%$$& 4jc5
)(-?
@B B'U3E#J	4
 
,rA   )N)1__doc__tensorflow.core.frameworkr   tensorflow.python.utilr   API_IMPLEMENTSAPI_PREFERRED_DEVICEBACKWARD_FUNCTIONDISABLE_ACDDISABLE_CALL_SHAPE_INFERENCEDISABLE_SUMMARIES_AT_RUNTIME"EAGER_RUNTIME_CONSTRUCTION_CONTEXTFORWARD_FUNCTIONGO_BACKWARDS
IMPLEMENTSINPUT_SHAPESINTS_ON_DEVICE	NO_INLINEORIGINAL_FUNCTION_NAMEOUTPUTS_ON_OP_DEVICEQUANTIZED_COMPOSITE_FUNCTIONQUANTIZED_OPSRUNTIME_CONSTANT_OPTIMIZATIONSHARED_RENDEZVOUSTF_DATA_FUNCTIONTFTRT_ALLOW_BUILD_AT_RUNTIMETFTRT_CONVERT_FUNCTIONTFTRT_IS_DYN_OPTFTRT_LOGGERTFTRT_MAX_BATCH_SIZETFTRT_MAX_CACHED_ENGINESTFTRT_MAX_WORKSPACE_SIZETFTRT_MIN_SEGMENT_SIZETFTRT_PRECISION_MODETFTRT_PROFILE_STRATEGYTFTRT_USE_CALIBRATIONTFTRT_USE_IMPLICIT_BATCH
TIME_MAJORXLA_COMPILEXLA_COMPILE_OPTIONAL	XLA_SCOPEXLA_SEPERATE_COMPILED_GRADIENTS	frozensetPOLYMORPHIC_FUNCTION_ALLOWLISTunionTRACING_COMPILATION_ALLOWLISTrC   r@   rH    rA   r?   <module>rv      s    K 4 ) "- , > = %< "* 
.	. + < ( ? ' & > 2 $'. 6 < 6 . 2 0 6 
$ 	"A !* !, "  !* 1 1"!  "+!2!2!$*$$   '/" <"JrA   