U
    T?h                     @   s:   d dl Z d dlZd dlZd dlZdd Zedkr6e  dS )    Nc                  C   s|   t jtjtdd} | jdtjdd | jdtjdd | 	 }t
t|jjdd	}td
 t
|t|j  d S )Nz^Update a QDQ format ONNX model to ensure optimal performance when executed using ONNX Runtime.)descriptioninput_modelz%Provide path to ONNX model to update.)typehelpoutput_modelz,Provide path to write updated ONNX model to.T)strictzfAs of ORT 1.15, the fixing up of DQ nodes with multiple consumers is done by an ORT graph transformer.)argparseArgumentParserospathbasename__file__add_argumentpathlibPath
parse_argsonnxloadstrr   resolveprintsaver   )parserargsmodel r   b/var/www/html/venv/lib/python3.8/site-packages/onnxruntime/tools/qdq_helpers/optimize_qdq_model.pyoptimize_qdq_model   s    
r   __main__)r   r
   r   r   r   __name__r   r   r   r   <module>   s   