Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support native torch embedded quantization encodings #2305

Commits on Jun 30, 2023

  1. Support for native Pytorch embedded quantization encodings (quic#1156)

    Signed-off-by: Huan Zhao <quic_huzh@quicinc.com>
    
    Support FP16 native torch quantizer using cast
    
    Signed-off-by: Huan Zhao <quic_huzh@quicinc.com>
    
    Fixed some comment
    
    Signed-off-by: Huan Zhao <quic_huzh@quicinc.com>
    
    Move functions related to quantizer to quantsim_utils
    
    Signed-off-by: Huan Zhao <quic_huzh@quicinc.com>
    
    Removed uncertain check caused by different version of onnx
    
    Signed-off-by: Huan Zhao <quic_huzh@quicinc.com>
    
    Change API to call embedded encodings from single function to sim.export
    
    Signed-off-by: Huan Zhao <quic_huzh@quicinc.com>
    
    Renamed use_embedded_encodings and raise error when use strict symmetric.
    
    Signed-off-by: Huan Zhao <quic_huzh@quicinc.com>
    
    Resolved conflicts and added testing cases to ensure the output of native torch quantization nodes is correct
    
    Signed-off-by: Huan Zhao <quic_huzh@quicinc.com>
    quic-huzh committed Jun 30, 2023
    Configuration menu
    Copy the full SHA
    4d91499 View commit details
    Browse the repository at this point in the history
  2. Add test cases for LearnedGridQuantizer and use OnnxSaver._export_mod…

    …el_to_onnx
    
    Signed-off-by: Huan Zhao <quic_huzh@quicinc.com>
    quic-huzh committed Jun 30, 2023
    Configuration menu
    Copy the full SHA
    ca2639c View commit details
    Browse the repository at this point in the history
  3. Fixed code violations

    Signed-off-by: Huan Zhao <quic_huzh@quicinc.com>
    quic-huzh committed Jun 30, 2023
    Configuration menu
    Copy the full SHA
    8dbf173 View commit details
    Browse the repository at this point in the history
  4. Fixed QcQuantizeOpMode while using LearnedGrid Quantizer

    Signed-off-by: Huan Zhao <quic_huzh@quicinc.com>
    quic-huzh committed Jun 30, 2023
    Configuration menu
    Copy the full SHA
    a20f125 View commit details
    Browse the repository at this point in the history
  5. Remove default parameters of save_model_with_embedded_quantization_nodes

    Signed-off-by: Huan Zhao <quic_huzh@quicinc.com>
    quic-huzh committed Jun 30, 2023
    Configuration menu
    Copy the full SHA
    7072cb5 View commit details
    Browse the repository at this point in the history
  6. Add check to avoid non 8 bit torch quantizers are exported to ONNX

    Signed-off-by: Huan Zhao <quic_huzh@quicinc.com>
    quic-huzh committed Jun 30, 2023
    Configuration menu
    Copy the full SHA
    2cc278a View commit details
    Browse the repository at this point in the history
  7. Removed _mode and add checker for bias

    Signed-off-by: Huan Zhao <quic_huzh@quicinc.com>
    quic-huzh committed Jun 30, 2023
    Configuration menu
    Copy the full SHA
    5f83fab View commit details
    Browse the repository at this point in the history
  8. Fix exported bug caused by device

    Signed-off-by: Huan Zhao <quic_huzh@quicinc.com>
    quic-huzh committed Jun 30, 2023
    Configuration menu
    Copy the full SHA
    a38be5d View commit details
    Browse the repository at this point in the history
  9. Change code to torch_quantizer.py and remove redundant per_channel flag

    Signed-off-by: Huan Zhao <quic_huzh@quicinc.com>
    quic-huzh committed Jun 30, 2023
    Configuration menu
    Copy the full SHA
    737cff5 View commit details
    Browse the repository at this point in the history