
    i                     2   S SK Jr  S SKrS SKJrJr  S SKJrJr  S SK	J
r
  \R                  S\R                  S\R                  S\R                  S	\R                  S
\R                   S\R"                  S\R$                  S0r\R                  \R(                  \R                  \R*                  \R                  \R,                  0r " S S\5      rS\
S\R2                  R4                  S\4S jrS rS\
S\R2                  R4                  4S jrS\4S jrg)    )EnumN)is_graph_inputis_graph_output)get_param_tensoris_param_node)ExportedProgramINT8UINT8INT16UINT16INT32INT64FLOAT16FLOAT32c                   $    \ rS rSrSrSrSrSrSrg)
TensorType    r             N)	__name__
__module____qualname____firstlineno__INPUTOUTPUTCONSTANT
FEATUREMAP__static_attributes__r       i/var/www/html/ai-image-ml/venv/lib/python3.13/site-packages/executorch/backends/samsung/builders/utils.pyr   r       s    EFHJr!   r   exported_programtensorreturnc                     [        X5      (       a  [        R                  $ [        U5      (       a  [        R                  $ [        X5      (       a  [        R                  $ [        R                  $ )N)r   r   r   r   r   r   r   r   )r#   r$   s     r"   get_tensor_typer'   '   sU    &//		 	    	'	0	0"""$$$r!   c                 @    U [         ;  a  [        SU 5      e[         U    $ )NzData type cannot be decided: )DATA_TYPE_STR_MAPPINGRuntimeError)dtypes    r"   get_map_dtyper,   2   s$    )):EBB ''r!   nodec                 v    [        X5      (       d  UR                  S   $ [        X5      nUR                  5       $ )Nval)r   metar   
contiguous)r#   r-   r$   s      r"   
get_tensorr2   8   s7    )00yy.5Fr!   ttypec                 6    [        U 5      R                  S5      $ )NzTensorType.)strremoveprefix)r3   s    r"   affine_type_to_strr7   ?   s    u:""=11r!   ) enumr   torch'executorch.backends.samsung.utils.utilsr   r   $executorch.backends.transforms.utilsr   r   torch.exportr   int8uint8int16uint16int32int64float16float32r)   qint8quint8qint32TORCH_TYPE_QTYPE_MAPPINGr   fxNoder5   r'   r,   r2   r7   r   r!   r"   <module>rK      s      S P ( 
JJ	KK	KK	LL(	KK	KK	MM9	MM9	  
JJ	KK	KK  %o %uxx}} %QT %(  2j 2r!   