
    i              
          S SK r S SKrS SKrS SKJr  S SKJrJrJr  S SK	J
r
  SSKJr  SSKJr  SS	KJr  SS
KJr  Sr\R(                  " \R*                  \S9  \S:X  Gav  \ R.                  " 5       r\R3                  SSSS\" \R6                  " 5       5       3S9  \R3                  SSSSSSS9  \R3                  SSSSSSS9  \R3                  SSSSSS 9  \R3                  S!S"SSSS#S9  \R3                  S$S%S&S'S(9  \R9                  5       r\R<                  (       d  \R$                  (       a  \" S)5      e\R@                  \;  a?  \R$                  (       a.  \!" S*\R@                   S+\" \R6                  " 5       5       S&35      e\\R@                     RD                  r#\RH                  " \\R@                     6 u  r%r&r'r'\%RQ                  5       r%\RR                  RS                  \%\&SS,9r*\*RW                  5       r%\R$                  (       a7  \RX                  " S-5        \" \%\&\#5      r%\RR                  RS                  \%\&SS,9r*\" \*\" 5       /\" \R$                  (       a  SOSSS.9\RZ                  S/9r.\RX                  " S0\.R_                  5       R`                   35        \.Rc                  \" SS19S29r2\RZ                  (       aH  \2Rg                  5       Ri                  \RZ                  5        \RX                  " S3\RZ                   35        \R$                  (       a  S4OS5r5\R@                   S6\5 3r \
" \2\ \Rl                  5        \Rn                  (       a~  \RX                  " S75        S S8K8J9r9  S S9K:J;r;  S S:K<J=r=  S S;K>J?r?  \9" \2R                  5      rA\RX                  " S<5        \?" \&5      S    rB\AR                  S=\B5      rD\RX                  " S>5        ggg)?    N)XnnpackPartitioner)EdgeCompileConfigExecutorchBackendConfigto_edge_transform_and_lower)save_pte_program   )MODEL_NAME_TO_MODEL)EagerModelFactory   )MODEL_NAME_TO_OPTIONS)quantizez?[%(levelname)s %(asctime)s %(filename)s:%(lineno)s] %(message)s)levelformat__main__z-mz--model_nameTzModel name. Valid ones: )requiredhelpz-qz
--quantize
store_trueFz Produce an 8-bit quantized model)actionr   defaultr   z-dz
--delegatez"Produce an XNNPACK delegated modelz-rz
--etrecord z8Generate and save an ETRecord to the given file location)r   r   r   z-tz--test_after_exportzTest the pte with pybindingsz-oz--output_dir.zoutput directory)r   r   zET161880157: Quantization-only without delegation is not supported yetzModel z is not a valid name. or not quantizable right now, please contact executorch team if you want to learn why or how to support quantization for the requested modelAvailable models are )strictzQuantizing Model...)_check_ir_validity_skip_dim_order)partitionercompile_configgenerate_etrecordzExported and lowered graph:
)extract_delegate_segments)configzSaved ETRecord to q8fp32	_xnnpack_zTesting the pte with pybind) _load_for_executorch_from_buffer)
custom_ops)	quantized)tree_flattenzSuccessfully loaded the modelforwardzSuccessfully ran the model)Eargparseloggingtorch9executorch.backends.xnnpack.partition.xnnpack_partitionerr   executorch.exirr   r   r   &executorch.extension.export_util.utilsr   modelsr	   models.model_factoryr
   r   r   quantization.utilsr   FORMATbasicConfigINFO__name__ArgumentParserparseradd_argumentlistkeys
parse_argsargsdelegateNotImplementedError
model_nameRuntimeErrorquantization
quant_typecreate_modelmodelexample_inputs_evalexportepmoduleinfoetrecordedgeexported_programgraphto_executorch	exec_progget_etrecordsave	quant_tag
output_dirtest_after_export,executorch.extension.pybindings.portable_libr#   #executorch.extension.llm.custom_opsr$   executorch.kernelsr%   torch.utils._pytreer&   bufferm	flattened
run_methodres     g/var/www/html/ai-image-ml/venv/lib/python3.13/site-packages/executorch/examples/xnnpack/aot_compiler.py<module>rb      s      X 
 D ( 4 # ( 
K   ',,v 6 z$$&F
'-B-G-G-I(J'KL	   /   1   G   +   nc@RSD==T]]!S
 	
 33T__% &$ %))>)C)C)E$F#GqJ
 	
 't7DDJ"3"@"@	T__	-#E>1a JJLE			UN5		ABIIKE}}*+
;\\  u E&
')*((,u4 
 --D LL01F1F1H1N1N0OPQ""&G # I }} %%dmm4)$--9:6IOO$Ii[9JY
DOO<23	

	

 	14,Y-=-=>45 03	ll9i012' A r`   