ai-edge-quantizer-nightly 0.0.1.dev20250219__py3-none-any.whl → 0.0.1.dev20250220__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -189,8 +189,8 @@ def init_qsvs(
189
189
  Args:
190
190
  op_info: Aggregated information about the op (e.g., quantization config).
191
191
  graph_info: Graph information needed to perform quantization for the op.
192
- inputs_to_ignore: Input tensor indices to ignore.
193
- outputs_to_ignore: Output tensor indices to ignore.
192
+ inputs_to_ignore: Operand indices to ignore.
193
+ outputs_to_ignore: Result indices to ignore.
194
194
 
195
195
  Returns:
196
196
  QSVs.
@@ -199,8 +199,8 @@ def init_qsvs(
199
199
 
200
200
  inputs_to_ignore = inputs_to_ignore or []
201
201
  outputs_to_ignore = outputs_to_ignore or []
202
- for i, tensor_idx in enumerate(op_info.op.inputs):
203
- if tensor_idx != -1 and i not in inputs_to_ignore:
202
+ for opr_idx, tensor_idx in enumerate(op_info.op.inputs):
203
+ if tensor_idx != -1 and opr_idx not in inputs_to_ignore:
204
204
  tensor = graph_info.subgraph_tensors[tensor_idx]
205
205
  tensor_name = tfl_flatbuffer_utils.get_tensor_name(tensor)
206
206
  tensor_data = tfl_flatbuffer_utils.get_tensor_data(
@@ -210,8 +210,8 @@ def init_qsvs(
210
210
  tensor_data,
211
211
  op_info,
212
212
  )
213
- for i, tensor_idx in enumerate(op_info.op.outputs):
214
- if tensor_idx != -1 and i not in outputs_to_ignore:
213
+ for res_idx, tensor_idx in enumerate(op_info.op.outputs):
214
+ if tensor_idx != -1 and res_idx not in outputs_to_ignore:
215
215
  tensor = graph_info.subgraph_tensors[tensor_idx]
216
216
  tensor_name = tfl_flatbuffer_utils.get_tensor_name(tensor)
217
217
  tensor_data = tfl_flatbuffer_utils.get_tensor_data(
@@ -283,9 +283,9 @@ class Calibrator:
283
283
  op_info = qtyping.OpInfo(op, op_key, subgraph_op_id, op_quant_config)
284
284
  # Ignore the input tensors where any dimension of the shape is 0.
285
285
  inputs_to_ignore = [
286
- idx
287
- for idx in op.inputs
288
- if not np.all(graph_info.subgraph_tensors[idx].shape)
286
+ opr_idx
287
+ for opr_idx, tensor_idx in enumerate(op.inputs)
288
+ if not np.all(graph_info.subgraph_tensors[tensor_idx].shape)
289
289
  ]
290
290
  op_qsvs = qsv_init_func(op_info, graph_info, inputs_to_ignore)
291
291
  # Step3: initialize tensor qsvs.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ai-edge-quantizer-nightly
3
- Version: 0.0.1.dev20250219
3
+ Version: 0.0.1.dev20250220
4
4
  Summary: A quantizer for advanced developers to quantize converted AI Edge models.
5
5
  Home-page: https://github.com/google-ai-edge/ai-edge-quantizer
6
6
  Keywords: On-Device ML,AI,Google,TFLite,Quantization,LLMs,GenAI
@@ -2,7 +2,7 @@ ai_edge_quantizer/__init__.py,sha256=4pFSkukSwahYyzwqia0yPRyz8TnFQfGRthVJhYpMWas
2
2
  ai_edge_quantizer/algorithm_manager.py,sha256=dOW_ex_KShoFaib7auISgsx5wRtxpaxhWrwA2nWgito,6003
3
3
  ai_edge_quantizer/algorithm_manager_api.py,sha256=u903TG0s1uIDhJqfeJne3CFl8A93phZrwgV2-hwdcXU,9247
4
4
  ai_edge_quantizer/algorithm_manager_api_test.py,sha256=tL_ozYFTsOPX8qGcti0KTz37nVsCxf0SSG5C45SyT-g,7319
5
- ai_edge_quantizer/calibrator.py,sha256=IqNMnKpZy24Fl_-94AIsp77KzqypMeyHkkxitMBxl58,11325
5
+ ai_edge_quantizer/calibrator.py,sha256=2J-bX0k09A7vZSRnO3eP49YO2uBMUQh6-sk3JRz9fGQ,11363
6
6
  ai_edge_quantizer/calibrator_test.py,sha256=hQk61YUvw1X02CDVAddm2n6Dnyk9GWoDgSpO6nuSJiY,11889
7
7
  ai_edge_quantizer/conftest.py,sha256=SxCz-5LlRD_lQm4hQc4c6IGG7DS8d7IyEWY9gnscPN0,794
8
8
  ai_edge_quantizer/default_policy.py,sha256=TQ9yY8jtrSpMsTBsTyKW6TY-voGH_psvwGZoFglAbiA,9079
@@ -30,7 +30,7 @@ ai_edge_quantizer/algorithms/nonlinear_quantize/float_casting_test.py,sha256=s64
30
30
  ai_edge_quantizer/algorithms/uniform_quantize/__init__.py,sha256=lpq1g2ayg3lCPLy79t2VicYcnGKw64FfYIj1V7J-4m8,676
31
31
  ai_edge_quantizer/algorithms/uniform_quantize/common_quantize.py,sha256=wPZevOuowJczG9t4Gynzv7tIeH6zhOnaKPsfr2K_fsk,21259
32
32
  ai_edge_quantizer/algorithms/uniform_quantize/common_quantize_test.py,sha256=qMmKbWqxrCoVKbLKHn9WuCrGKPfHkEyU0Nmhokh8Qeo,2597
33
- ai_edge_quantizer/algorithms/uniform_quantize/naive_min_max_quantize.py,sha256=g69t3oTl1fdphsWLIxVNjuIIIA3lLQ56Vt8Qgo7SocU,9946
33
+ ai_edge_quantizer/algorithms/uniform_quantize/naive_min_max_quantize.py,sha256=WaN6w-DqQkSwNl8xsbsSPPY97oKohHpo-5Ng_5yAerw,9958
34
34
  ai_edge_quantizer/algorithms/uniform_quantize/naive_min_max_quantize_test.py,sha256=3UV1I-to_u6NE_yKoXOVUOQgil-tMY6VQ_L273lMfqQ,5949
35
35
  ai_edge_quantizer/algorithms/uniform_quantize/uniform_quantize_tensor.py,sha256=B-s1KMfb9tqvaDhHJV-M2zRR078z5Mwv-P9h77S3Mis,12229
36
36
  ai_edge_quantizer/algorithms/uniform_quantize/uniform_quantize_tensor_test.py,sha256=WZ4_bvbG999nOtCIqn7mrMnpRdoJOdiyzxhsL_QiPHA,11395
@@ -58,8 +58,8 @@ ai_edge_quantizer/utils/tfl_interpreter_utils.py,sha256=SM8H4i7Jq_nfdsJpImopHndN
58
58
  ai_edge_quantizer/utils/tfl_interpreter_utils_test.py,sha256=Op3JxtOqlrjzmYF18jnnstL1k9xiY9kKJ8S2vklKGkc,11327
59
59
  ai_edge_quantizer/utils/validation_utils.py,sha256=oYw33Sg547AqtGw-choPUJmp9SAKkV46J_ddqSsum2Q,3950
60
60
  ai_edge_quantizer/utils/validation_utils_test.py,sha256=V_qNDikPD4OPB-siOLQCWNVWTAu87h2IgNYt7teFd-o,2934
61
- ai_edge_quantizer_nightly-0.0.1.dev20250219.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
62
- ai_edge_quantizer_nightly-0.0.1.dev20250219.dist-info/METADATA,sha256=I42-1mg57Fu0eGeUYlGuWKyXvQuQ7l_PzzcOCcc7CAk,1484
63
- ai_edge_quantizer_nightly-0.0.1.dev20250219.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
64
- ai_edge_quantizer_nightly-0.0.1.dev20250219.dist-info/top_level.txt,sha256=8QTfPnFXNVUhScFLaa-NWZMFWMn72M50DVPubpwWB1g,18
65
- ai_edge_quantizer_nightly-0.0.1.dev20250219.dist-info/RECORD,,
61
+ ai_edge_quantizer_nightly-0.0.1.dev20250220.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
62
+ ai_edge_quantizer_nightly-0.0.1.dev20250220.dist-info/METADATA,sha256=wc1t3VKLcToSVZ6MOwmrcNhWcy967d9mAaQlFF6w50s,1484
63
+ ai_edge_quantizer_nightly-0.0.1.dev20250220.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
64
+ ai_edge_quantizer_nightly-0.0.1.dev20250220.dist-info/top_level.txt,sha256=8QTfPnFXNVUhScFLaa-NWZMFWMn72M50DVPubpwWB1g,18
65
+ ai_edge_quantizer_nightly-0.0.1.dev20250220.dist-info/RECORD,,