
    g                     D    d dl Z d dlZd dlZd dlZd Zedk(  r e        yy)    Nc                     t        j                  t        j                  j	                  t
              d      } | j                  dt        j                  d       | j                  dt        j                  d       | j                         }t        j                  t        |j                  j                  d	                  }t        d
       t        j                   |t        |j"                  j                                      y )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models      e/var/www/openai/venv/lib/python3.12/site-packages/onnxruntime/tools/qdq_helpers/optimize_qdq_model.pyoptimize_qdq_modelr      s    $$
"tF
 GLL?fg
W\\@noDIIc$**22$2?@AE 

rs 	IIeS**22456    __main__)r
   r   r   r   r   __name__ r   r   <module>r#      s-   
  	  70 z r   