
    AVhL                     l    d Z ddlmZ ddlmZ ddl dddg fdZd Zd Zd	 Z	d
 Z
d Zd Z	 	 	 ddZy)z6Python module for MLIR functions exported by pybind11.    )pywrap_tensorflow)context)*Nc                    |t        t        |       j                  d      |j                  d      |dj                  |      j                  d      dj                  |      j                  d      dj                  |      j                  d      dj                  |      j                  d            S t        t        |       j                  d      |j                  d      |      S )Nutf-8,:)ImportGraphDefstrencodejoin)graphdefpass_pipelineshow_debug_infoinput_namesinput_data_typesinput_data_shapesoutput_namess          M/home/dcms/DCMS/lib/python3.12/site-packages/tensorflow/python/pywrap_mlir.pyimport_graphdefr      s     HW%W%$$W-!"))'2"#**73%%g.  
	(m7#7#
     c                     t        j                          }|j                          t        |j                  t	        | j
                        j                  d      |j                  d      |      S Nr   )r   ensure_initializedImportFunction_handler   function_defr   )concrete_functionr   r   ctxts       r   import_functionr    1   sY    		$	
ll	

(
()0097#	
 r   c                 |    t        t        |       j                  d      t        |      j                  d      |      S r   )#ExperimentalConvertSavedModelToMlirr   r   )saved_model_pathexported_namesr   s      r   (experimental_convert_saved_model_to_mlirr%   <   s;     
-	
""7+	.  )
 r   c                     t        t        |       j                  d      t        |      j                  d      t        |      j                  d      ||      S r   ))ExperimentalConvertSavedModelV1ToMlirLiter   r   )r#   r$   tagsupgrade_legacyr   s        r   0experimental_convert_saved_model_v1_to_mlir_liter*   F   sP     
3	
""7+	.  )	$iw
 r   c           	          t        t        |       j                  d      t        |      j                  d      t        |      j                  d      ||||      S r   )%ExperimentalConvertSavedModelV1ToMlirr   r   )r#   r$   r(   lift_variables!include_variables_in_initializersr)   r   s          r   +experimental_convert_saved_model_v1_to_mlirr/   R   sV     
/	
""7+	.  )	$iw'
 r   c                 X    t        | j                  d      |j                  d      |      S r   )ExperimentalRunPassPipeliner   )mlir_txtr   r   s      r   experimental_run_pass_pipeliner3   f   s*    	$oog 4 4W =
 r   c                 T    t        | j                  d      |j                               S r   )ExperimentalWriteBytecoder   )filenamer2   s     r   experimental_write_bytecoder7   l   s    	"8??7#;X__=N	OOr   c                 l    |g }|g }t        | j                  d      |j                  d      |||      S r   ) ExperimentalTFLiteToTosaBytecoder   )
flatbufferbytecodeuse_external_constantordered_input_arraysordered_output_arrayss        r   $experimental_tflite_to_tosa_bytecoder?   p   sL     !"	) oog
 r   )FNN)__doc__tensorflow.pythonr   tensorflow.python.eagerr   tensorflow.python._pywrap_mlirr   r    r%   r*   r/   r3   r7   r?    r   r   <module>rE      sW    = 0 + , 4	(P  r   