quic / aimet

AIMET is a library that provides advanced quantization and compression techniques for trained neural network models.
https://quic.github.io/aimet-pages/index.html
Other
2.15k stars 383 forks source link

Receving Error: AttributeError: 'libPyIrGraph.IrQuantizationEncodingInfo' object has no attribute 'is_fixed_point' #3357

Open nbansal90 opened 1 month ago

nbansal90 commented 1 month ago

Hello,

I am receiving the Following Error, when preparing for a Quantized DLC model using aimet quantizer.

ERROR

Traceback (most recent call last):
  File "/opt/qcom/aistack/qairt/2.22.0.240425/lib/python/qti/aisw/converters/aimet/qnn_quantsim_interface.py", line 147, in quantize_model_with_aimet
    quantized_dlc_path = qnn_adapter.generate_quantized_dlc(dlc_path, for_qairt)
  File "/opt/qcom/aistack/qairt/2.22.0.240425/lib/python/qti/aisw/converters/aimet/qnn_quantsim_adapter.py", line 502, in generate_quantized_dlc
    DlcQuantSimExporter.export(sim, self._datadir, self._output_name + '_quantized', converted_dlc_path,
  File "/home/n.bansal1/anaconda/envs/aimetenv/lib/python3.10/site-packages/aimet_torch/pro/quant_sim/dlc_quantsim_exporter.py", line 126, in export
    ir_graph_updater.set_encodings(activation_encodings, param_encodings, quantsim._default_output_bw,
  File "/home/n.bansal1/anaconda/envs/aimetenv/lib/python3.10/site-packages/aimet_torch/pro/ir_graph_updater.py", line 152, in set_encodings
    self.propagate_data_movement_encodings()
  File "/home/n.bansal1/anaconda/envs/aimetenv/lib/python3.10/site-packages/aimet_torch/pro/ir_graph_updater.py", line 304, in propagate_data_movement_encodings
    if encoding.encInfo.is_fixed_point:
AttributeError: 'libPyIrGraph.IrQuantizationEncodingInfo' object has no attribute 'is_fixed_point'
2024-09-23 16:05:05,454 - 230 - ERROR - Exception occured in Spawned AIMET Process, Unable to proceed with Quantization

Command

qairt-quantizer --input_dlc <input-filename> --input_list ./DATA_SIDD/imgs_256x256/target_raw_list_cpp.txt --output_dlc <output-filename> --use_aimet_quantizer

AIMET version: 1.34.0.44 QNN/SNPE Version: 2.22.0.240425

Regards!