tico 0.1.0.dev250714__py3-none-any.whl → 0.1.0.dev251102__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.
Files changed (181) hide show
  1. tico/__init__.py +9 -1
  2. tico/config/base.py +1 -1
  3. tico/config/v1.py +5 -0
  4. tico/passes/cast_aten_where_arg_type.py +1 -1
  5. tico/passes/cast_clamp_mixed_type_args.py +169 -0
  6. tico/passes/cast_mixed_type_args.py +4 -2
  7. tico/passes/const_prop_pass.py +1 -1
  8. tico/passes/convert_conv1d_to_conv2d.py +1 -1
  9. tico/passes/convert_expand_to_slice_cat.py +153 -0
  10. tico/passes/convert_matmul_to_linear.py +312 -0
  11. tico/passes/convert_to_relu6.py +1 -1
  12. tico/passes/decompose_addmm.py +0 -3
  13. tico/passes/decompose_batch_norm.py +2 -2
  14. tico/passes/decompose_fake_quantize.py +0 -3
  15. tico/passes/decompose_fake_quantize_tensor_qparams.py +5 -6
  16. tico/passes/decompose_group_norm.py +0 -3
  17. tico/passes/legalize_predefined_layout_operators.py +2 -11
  18. tico/passes/lower_to_resize_nearest_neighbor.py +1 -1
  19. tico/passes/lower_to_slice.py +1 -1
  20. tico/passes/merge_consecutive_cat.py +1 -1
  21. tico/passes/ops.py +1 -1
  22. tico/passes/remove_redundant_assert_nodes.py +3 -1
  23. tico/passes/remove_redundant_expand.py +3 -6
  24. tico/passes/remove_redundant_reshape.py +5 -5
  25. tico/passes/segment_index_select.py +1 -1
  26. tico/quantization/__init__.py +6 -0
  27. tico/{experimental/quantization → quantization}/algorithm/gptq/gptq.py +1 -1
  28. tico/quantization/algorithm/gptq/quantizer.py +292 -0
  29. tico/{experimental/quantization → quantization}/algorithm/gptq/utils.py +1 -1
  30. tico/{experimental/quantization → quantization}/algorithm/pt2e/annotation/annotator.py +7 -14
  31. tico/{experimental/quantization → quantization}/algorithm/pt2e/annotation/op/adaptive_avg_pool2d.py +4 -6
  32. tico/{experimental/quantization → quantization}/algorithm/pt2e/annotation/op/add.py +4 -6
  33. tico/{experimental/quantization → quantization}/algorithm/pt2e/annotation/op/conv2d.py +4 -6
  34. tico/{experimental/quantization → quantization}/algorithm/pt2e/annotation/op/div.py +4 -6
  35. tico/{experimental/quantization → quantization}/algorithm/pt2e/annotation/op/linear.py +5 -7
  36. tico/{experimental/quantization → quantization}/algorithm/pt2e/annotation/op/mean.py +4 -6
  37. tico/{experimental/quantization → quantization}/algorithm/pt2e/annotation/op/mul.py +4 -6
  38. tico/{experimental/quantization → quantization}/algorithm/pt2e/annotation/op/relu6.py +4 -6
  39. tico/{experimental/quantization → quantization}/algorithm/pt2e/annotation/op/rsqrt.py +4 -6
  40. tico/{experimental/quantization → quantization}/algorithm/pt2e/annotation/op/sub.py +4 -6
  41. tico/{experimental/quantization → quantization}/algorithm/pt2e/annotation/spec.py +1 -3
  42. tico/{experimental/quantization → quantization}/algorithm/pt2e/annotation/utils.py +1 -1
  43. tico/{experimental/quantization → quantization}/algorithm/pt2e/quantizer.py +5 -2
  44. tico/{experimental/quantization → quantization}/algorithm/pt2e/utils.py +1 -4
  45. tico/{experimental/quantization → quantization}/algorithm/smoothquant/observer.py +26 -8
  46. tico/{experimental/quantization → quantization}/algorithm/smoothquant/quantizer.py +28 -9
  47. tico/quantization/algorithm/smoothquant/smooth_quant.py +327 -0
  48. tico/quantization/config/base.py +26 -0
  49. tico/quantization/config/gptq.py +29 -0
  50. tico/quantization/config/pt2e.py +25 -0
  51. tico/quantization/config/ptq.py +119 -0
  52. tico/{experimental/quantization/config.py → quantization/config/smoothquant.py} +9 -36
  53. tico/{experimental/quantization → quantization}/evaluation/evaluate.py +8 -17
  54. tico/{experimental/quantization → quantization}/evaluation/executor/circle_executor.py +3 -4
  55. tico/{experimental/quantization → quantization}/evaluation/executor/triv24_executor.py +2 -4
  56. tico/quantization/evaluation/metric.py +146 -0
  57. tico/{experimental/quantization → quantization}/evaluation/utils.py +1 -1
  58. tico/quantization/passes/__init__.py +1 -0
  59. tico/{experimental/quantization → quantization}/passes/fold_quant_ops.py +0 -1
  60. tico/quantization/passes/insert_quantize_on_dtype_mismatch.py +459 -0
  61. tico/{experimental/quantization → quantization}/passes/quantize_bias.py +0 -1
  62. tico/{experimental/quantization → quantization}/passes/remove_weight_dequant_op.py +1 -1
  63. tico/{experimental/quantization → quantization}/public_interface.py +19 -18
  64. tico/{experimental/quantization → quantization}/quantizer.py +1 -1
  65. tico/quantization/quantizer_registry.py +73 -0
  66. tico/quantization/wrapq/__init__.py +1 -0
  67. tico/quantization/wrapq/dtypes.py +70 -0
  68. tico/quantization/wrapq/examples/__init__.py +1 -0
  69. tico/quantization/wrapq/examples/compare_ppl.py +230 -0
  70. tico/quantization/wrapq/examples/debug_quant_outputs.py +224 -0
  71. tico/quantization/wrapq/examples/quantize_linear.py +107 -0
  72. tico/quantization/wrapq/examples/quantize_llama_attn.py +101 -0
  73. tico/quantization/wrapq/examples/quantize_llama_decoder_layer.py +125 -0
  74. tico/quantization/wrapq/examples/quantize_llama_mlp.py +95 -0
  75. tico/quantization/wrapq/examples/quantize_with_gptq.py +265 -0
  76. tico/quantization/wrapq/mode.py +32 -0
  77. tico/quantization/wrapq/observers/__init__.py +1 -0
  78. tico/quantization/wrapq/observers/affine_base.py +128 -0
  79. tico/quantization/wrapq/observers/base.py +98 -0
  80. tico/quantization/wrapq/observers/ema.py +62 -0
  81. tico/quantization/wrapq/observers/identity.py +74 -0
  82. tico/quantization/wrapq/observers/minmax.py +39 -0
  83. tico/quantization/wrapq/observers/mx.py +60 -0
  84. tico/quantization/wrapq/qscheme.py +40 -0
  85. tico/quantization/wrapq/quantizer.py +179 -0
  86. tico/quantization/wrapq/utils/__init__.py +1 -0
  87. tico/quantization/wrapq/utils/introspection.py +167 -0
  88. tico/quantization/wrapq/utils/metrics.py +124 -0
  89. tico/quantization/wrapq/utils/reduce_utils.py +25 -0
  90. tico/quantization/wrapq/wrappers/__init__.py +1 -0
  91. tico/quantization/wrapq/wrappers/fairseq/__init__.py +5 -0
  92. tico/quantization/wrapq/wrappers/fairseq/decoder_export_single_step.py +234 -0
  93. tico/quantization/wrapq/wrappers/fairseq/quant_decoder.py +429 -0
  94. tico/quantization/wrapq/wrappers/fairseq/quant_decoder_layer.py +492 -0
  95. tico/quantization/wrapq/wrappers/fairseq/quant_encoder.py +331 -0
  96. tico/quantization/wrapq/wrappers/fairseq/quant_encoder_layer.py +163 -0
  97. tico/quantization/wrapq/wrappers/fairseq/quant_mha.py +381 -0
  98. tico/quantization/wrapq/wrappers/llama/__init__.py +1 -0
  99. tico/quantization/wrapq/wrappers/llama/quant_attn.py +276 -0
  100. tico/quantization/wrapq/wrappers/llama/quant_decoder_layer.py +176 -0
  101. tico/quantization/wrapq/wrappers/llama/quant_mlp.py +96 -0
  102. tico/quantization/wrapq/wrappers/nn/__init__.py +1 -0
  103. tico/quantization/wrapq/wrappers/nn/quant_layernorm.py +183 -0
  104. tico/quantization/wrapq/wrappers/nn/quant_linear.py +65 -0
  105. tico/quantization/wrapq/wrappers/nn/quant_silu.py +59 -0
  106. tico/quantization/wrapq/wrappers/ptq_wrapper.py +69 -0
  107. tico/quantization/wrapq/wrappers/quant_elementwise.py +111 -0
  108. tico/quantization/wrapq/wrappers/quant_module_base.py +168 -0
  109. tico/quantization/wrapq/wrappers/registry.py +125 -0
  110. tico/serialize/circle_graph.py +12 -4
  111. tico/serialize/circle_mapping.py +76 -2
  112. tico/serialize/circle_serializer.py +253 -148
  113. tico/serialize/operators/adapters/__init__.py +1 -0
  114. tico/serialize/operators/adapters/llama_rmsnorm.py +35 -0
  115. tico/serialize/operators/op_any.py +7 -14
  116. tico/serialize/operators/op_avg_pool2d.py +11 -4
  117. tico/serialize/operators/op_clamp.py +5 -7
  118. tico/serialize/operators/op_constant_pad_nd.py +41 -11
  119. tico/serialize/operators/op_conv2d.py +14 -6
  120. tico/serialize/operators/op_copy.py +26 -3
  121. tico/serialize/operators/op_cumsum.py +3 -1
  122. tico/serialize/operators/op_depthwise_conv2d.py +17 -7
  123. tico/serialize/operators/op_full_like.py +0 -2
  124. tico/serialize/operators/op_index_select.py +8 -1
  125. tico/serialize/operators/op_instance_norm.py +0 -6
  126. tico/serialize/operators/op_le.py +54 -0
  127. tico/serialize/operators/op_log1p.py +3 -2
  128. tico/serialize/operators/op_max_pool2d_with_indices.py +17 -7
  129. tico/serialize/operators/op_mm.py +15 -131
  130. tico/serialize/operators/op_mul.py +2 -8
  131. tico/serialize/operators/op_pow.py +3 -1
  132. tico/serialize/operators/op_repeat.py +12 -3
  133. tico/serialize/operators/op_reshape.py +1 -1
  134. tico/serialize/operators/op_rmsnorm.py +65 -0
  135. tico/serialize/operators/op_softmax.py +7 -14
  136. tico/serialize/operators/op_split_with_sizes.py +16 -8
  137. tico/serialize/operators/op_transpose_conv.py +11 -8
  138. tico/serialize/operators/op_view.py +2 -1
  139. tico/serialize/quant_param.py +5 -5
  140. tico/utils/convert.py +30 -17
  141. tico/utils/dtype.py +42 -0
  142. tico/utils/graph.py +1 -1
  143. tico/utils/model.py +2 -1
  144. tico/utils/padding.py +2 -2
  145. tico/utils/pytree_utils.py +134 -0
  146. tico/utils/record_input.py +102 -0
  147. tico/utils/register_custom_op.py +29 -4
  148. tico/utils/serialize.py +16 -3
  149. tico/utils/signature.py +247 -0
  150. tico/utils/torch_compat.py +52 -0
  151. tico/utils/utils.py +50 -58
  152. tico/utils/validate_args_kwargs.py +38 -3
  153. {tico-0.1.0.dev250714.dist-info → tico-0.1.0.dev251102.dist-info}/METADATA +49 -2
  154. tico-0.1.0.dev251102.dist-info/RECORD +271 -0
  155. tico/experimental/quantization/__init__.py +0 -1
  156. tico/experimental/quantization/algorithm/gptq/quantizer.py +0 -225
  157. tico/experimental/quantization/algorithm/smoothquant/smooth_quant.py +0 -164
  158. tico/experimental/quantization/evaluation/metric.py +0 -109
  159. tico/experimental/quantization/passes/insert_quantize_on_dtype_mismatch.py +0 -437
  160. tico-0.1.0.dev250714.dist-info/RECORD +0 -209
  161. /tico/{experimental/quantization → quantization}/algorithm/__init__.py +0 -0
  162. /tico/{experimental/quantization → quantization}/algorithm/gptq/__init__.py +0 -0
  163. /tico/{experimental/quantization → quantization}/algorithm/gptq/quant.py +0 -0
  164. /tico/{experimental/quantization → quantization}/algorithm/pt2e/__init__.py +0 -0
  165. /tico/{experimental/quantization → quantization}/algorithm/pt2e/annotation/__init__.py +0 -0
  166. /tico/{experimental/quantization → quantization}/algorithm/pt2e/annotation/config.py +0 -0
  167. /tico/{experimental/quantization → quantization}/algorithm/pt2e/annotation/op/__init__.py +0 -0
  168. /tico/{experimental/quantization → quantization}/algorithm/pt2e/transformation/__init__.py +0 -0
  169. /tico/{experimental/quantization → quantization}/algorithm/pt2e/transformation/convert_scalars_to_attrs.py +0 -0
  170. /tico/{experimental/quantization → quantization}/algorithm/smoothquant/__init__.py +0 -0
  171. /tico/{experimental/quantization/evaluation → quantization/config}/__init__.py +0 -0
  172. /tico/{experimental/quantization/evaluation/executor → quantization/evaluation}/__init__.py +0 -0
  173. /tico/{experimental/quantization → quantization}/evaluation/backend.py +0 -0
  174. /tico/{experimental/quantization/passes → quantization/evaluation/executor}/__init__.py +0 -0
  175. /tico/{experimental/quantization → quantization}/evaluation/executor/backend_executor.py +0 -0
  176. /tico/{experimental/quantization → quantization}/passes/propagate_qparam_backward.py +0 -0
  177. /tico/{experimental/quantization → quantization}/passes/propagate_qparam_forward.py +0 -0
  178. {tico-0.1.0.dev250714.dist-info → tico-0.1.0.dev251102.dist-info}/LICENSE +0 -0
  179. {tico-0.1.0.dev250714.dist-info → tico-0.1.0.dev251102.dist-info}/WHEEL +0 -0
  180. {tico-0.1.0.dev250714.dist-info → tico-0.1.0.dev251102.dist-info}/entry_points.txt +0 -0
  181. {tico-0.1.0.dev250714.dist-info → tico-0.1.0.dev251102.dist-info}/top_level.txt +0 -0
@@ -1,437 +0,0 @@
1
- # Copyright (c) 2025 Samsung Electronics Co., Ltd. All Rights Reserved
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
- from typing import TYPE_CHECKING
16
-
17
- if TYPE_CHECKING:
18
- import torch.fx
19
- import copy
20
-
21
- import torch
22
- from torch.export import ExportedProgram
23
-
24
- from tico.serialize.quant_param import QPARAM_KEY, QuantParam
25
- from tico.utils import logging
26
- from tico.utils.errors import NotYetSupportedError
27
- from tico.utils.graph import create_node
28
- from tico.utils.passes import PassBase, PassResult
29
- from tico.utils.trace_decorators import trace_graph_diff_on_pass
30
- from tico.utils.utils import quant_min_max, set_new_meta_val
31
- from tico.utils.validate_args_kwargs import (
32
- AddTensorArgs,
33
- BmmArgs,
34
- CatArgs,
35
- LinearArgs,
36
- MulTensorArgs,
37
- PermuteArgs,
38
- ReluArgs,
39
- ReshapeArgs,
40
- )
41
-
42
-
43
- def qparam_dtype(node: torch.fx.Node) -> str:
44
- assert QPARAM_KEY in node.meta
45
- return node.meta[QPARAM_KEY].dtype
46
-
47
-
48
- # Convert i16 qparam to u8 qparam
49
- # scale and zero_point are inferred from i16 qparam
50
- def _i16_to_u8(qparam: QuantParam) -> QuantParam:
51
- # Assume per-tensor quantization
52
- assert qparam.scale is not None and len(qparam.scale) == 1
53
- assert qparam.dtype == "int16"
54
-
55
- s16_scale = qparam.scale[0]
56
- max_ = s16_scale * 32767 # numeric_limits<int16>
57
- min_ = -max_
58
-
59
- u8_scale = (max_ - min_) / 255
60
- u8_zerop = round(-min_ / u8_scale)
61
-
62
- new_qparam = QuantParam()
63
- new_qparam.scale = [u8_scale]
64
- new_qparam.zero_point = [u8_zerop]
65
- new_qparam.dtype = "uint8"
66
-
67
- return new_qparam
68
-
69
-
70
- # Convert u8 qparam to i16 qparam
71
- # scale is inferred from u8 qparam
72
- def _u8_to_i16(qparam: QuantParam) -> QuantParam:
73
- # Assume per-tensor quantization
74
- assert qparam.scale is not None and len(qparam.scale) == 1
75
- assert qparam.zero_point is not None and len(qparam.zero_point) == 1
76
- assert qparam.dtype == "uint8"
77
-
78
- u8_scale = qparam.scale[0]
79
- u8_zerop = qparam.zero_point[0]
80
- max_ = u8_scale * (255 - u8_zerop)
81
- min_ = u8_scale * (-u8_zerop)
82
-
83
- abs_max = max(abs(max_), abs(min_))
84
- s16_scale = abs_max / 32767
85
- s16_zerop = 0
86
-
87
- new_qparam = QuantParam()
88
- new_qparam.scale = [s16_scale]
89
- new_qparam.zero_point = [s16_zerop]
90
- new_qparam.dtype = "int16"
91
-
92
- return new_qparam
93
-
94
-
95
- @trace_graph_diff_on_pass
96
- class InsertQuantizeOnDtypeMismatch(PassBase):
97
- """
98
- Insert quantize Op in the operators where circle's type inference is violated.
99
- Example. FullyConnected
100
- [BEFORE]
101
- Op (uint8) - aten.linear.default (int16)
102
- [AFTER]
103
- Op (uint8) - aten.linear.default (uint8) - quantized_decomposed.quantize_per_tensor.default (int16)
104
- Why is this pass necessary?
105
- - For some operators, circle's type inference pass overwrites the input's dtype to
106
- the output's dtype. For the above example, fully-connected layer (aten.linear.default)'s
107
- output dtype (int16) is updated to the input dtype (uint8), which breaks the semantics.
108
- This problem can occur in the tools (ex: circle2circle) that automatically apply type inference.
109
- - To resolve the issue, we insert quantize operators not to violate circle's type inference logic.
110
- - NOTE For some cases, Quantize Op is inserted before the operators.
111
-
112
- Let's assume Reshape Op's input is int16 and output is uint8. There are two possible places to insert
113
- Quantize Op.
114
-
115
- 1. Insert Quantize before Reshape.
116
-
117
- ```
118
- Predecessor (int16)-> Quantize (uint8) -> Reshape (uint8) -> ...
119
- ```
120
-
121
- 2. Insert Quantize after Reshape.
122
-
123
- ```
124
- Predecessor (int16)-> Reshape (int16) -> Quantize (uint8) -> ...
125
- ```
126
-
127
- Comparing 1) and 2), the difference is that Reshape operation is conducted in uint8 or int16.
128
- We go with 1), which does Reshape in uint8, for faster execution. Note that Reshape Op does not
129
- change the value, so its dytpe does not affect accuracy.
130
- """
131
-
132
- def __init__(self):
133
- super().__init__()
134
-
135
- def call(self, exported_program: ExportedProgram) -> PassResult:
136
- logger = logging.getLogger(__name__)
137
-
138
- graph_module = exported_program.graph_module
139
- graph: torch.fx.Graph = graph_module.graph
140
-
141
- def _insert_quantize_op_before(node, inp):
142
- qparam: QuantParam = node.meta[QPARAM_KEY]
143
- assert qparam.scale is not None
144
- assert qparam.zero_point is not None
145
- scale = qparam.scale[0]
146
- zerop = qparam.zero_point[0]
147
- min_, max_ = quant_min_max(qparam.dtype)
148
- dtype = getattr(torch, qparam.dtype)
149
-
150
- with graph.inserting_before(node):
151
- q_args = (inp, scale, zerop, min_, max_, dtype)
152
- quantize = create_node(
153
- graph,
154
- torch.ops.quantized_decomposed.quantize_per_tensor.default,
155
- args=q_args,
156
- origin=node,
157
- )
158
- quantize.meta[QPARAM_KEY] = copy.deepcopy(qparam)
159
- set_new_meta_val(quantize)
160
-
161
- node.replace_input_with(inp, quantize)
162
-
163
- return quantize
164
-
165
- def _insert_quantize_op_after(node):
166
- qparam: QuantParam = node.meta[QPARAM_KEY]
167
- assert qparam.scale is not None
168
- assert qparam.zero_point is not None
169
- scale = qparam.scale[0]
170
- zerop = qparam.zero_point[0]
171
- min_, max_ = quant_min_max(qparam.dtype)
172
- dtype = getattr(torch, qparam.dtype)
173
- with graph.inserting_after(node):
174
- q_args = (node, scale, zerop, min_, max_, dtype)
175
- quantize = create_node(
176
- graph,
177
- torch.ops.quantized_decomposed.quantize_per_tensor.default,
178
- args=q_args,
179
- )
180
-
181
- node.replace_all_uses_with(quantize, propagate_meta=True)
182
- quantize.replace_input_with(quantize, node)
183
-
184
- quantize.meta[QPARAM_KEY] = copy.deepcopy(qparam)
185
-
186
- return quantize
187
-
188
- for node in graph.nodes:
189
- if node.op != "call_function":
190
- continue
191
- if node.target == torch.ops.aten.linear.default:
192
- lin_args = LinearArgs(*node.args, **node.kwargs)
193
- inp = lin_args.input
194
-
195
- if QPARAM_KEY not in inp.meta:
196
- continue
197
-
198
- if QPARAM_KEY not in node.meta:
199
- continue
200
-
201
- if qparam_dtype(inp) == qparam_dtype(node):
202
- continue
203
-
204
- if qparam_dtype(inp) == "uint8" and qparam_dtype(node) == "int16":
205
- quantize = _insert_quantize_op_after(node)
206
-
207
- quantize.meta[QPARAM_KEY] = copy.deepcopy(node.meta[QPARAM_KEY])
208
-
209
- # Update node's qparam from i16 to u8
210
- # NOTE This would severely degrade accuracy. It is
211
- # important to mitigate this accuracy drop in backend.
212
- node.meta[QPARAM_KEY] = _i16_to_u8(node.meta[QPARAM_KEY])
213
- logger.debug(
214
- f"quantize_per_tensor.default is inserted after {node.name}."
215
- )
216
- else:
217
- raise NotYetSupportedError(
218
- f"Unsupported dtype: From {qparam_dtype(inp)} to {qparam_dtype(node)}"
219
- )
220
-
221
- elif node.target == torch.ops.aten.add.Tensor:
222
- add_args = AddTensorArgs(*node.args, **node.kwargs)
223
- x = add_args.input
224
- y = add_args.other
225
-
226
- if not isinstance(x, torch.fx.Node):
227
- continue
228
- if not isinstance(y, torch.fx.Node):
229
- continue
230
-
231
- if QPARAM_KEY not in x.meta:
232
- continue
233
- if QPARAM_KEY not in y.meta:
234
- continue
235
- if QPARAM_KEY not in node.meta:
236
- continue
237
-
238
- if qparam_dtype(x) == qparam_dtype(node):
239
- continue
240
-
241
- if qparam_dtype(x) != qparam_dtype(y):
242
- continue
243
-
244
- if qparam_dtype(x) == "int16" and qparam_dtype(node) == "uint8":
245
- quantize = _insert_quantize_op_after(node)
246
-
247
- quantize.meta[QPARAM_KEY] = copy.deepcopy(node.meta[QPARAM_KEY])
248
- node.meta[QPARAM_KEY] = _u8_to_i16(node.meta[QPARAM_KEY])
249
- logger.debug(
250
- f"quantize_per_tensor.default is inserted after {node.name}."
251
- )
252
- else:
253
- raise NotYetSupportedError("Unsupported dtype")
254
-
255
- elif node.target == torch.ops.aten.mul.Tensor:
256
- mul_args = MulTensorArgs(*node.args, **node.kwargs)
257
- x = mul_args.input
258
- y = mul_args.other
259
-
260
- if not isinstance(x, torch.fx.Node):
261
- continue
262
- if not isinstance(y, torch.fx.Node):
263
- continue
264
-
265
- if QPARAM_KEY not in x.meta:
266
- continue
267
- if QPARAM_KEY not in y.meta:
268
- continue
269
- if QPARAM_KEY not in node.meta:
270
- continue
271
-
272
- if qparam_dtype(x) == qparam_dtype(node):
273
- continue
274
-
275
- if qparam_dtype(x) == "int16" and qparam_dtype(node) == "uint8":
276
- quantize = _insert_quantize_op_after(node)
277
-
278
- quantize.meta[QPARAM_KEY] = copy.deepcopy(node.meta[QPARAM_KEY])
279
- node.meta[QPARAM_KEY] = _u8_to_i16(node.meta[QPARAM_KEY])
280
- logger.debug(
281
- f"quantize_per_tensor.default is inserted after {node.name}."
282
- )
283
- else:
284
- raise NotYetSupportedError("Unsupported dtype")
285
-
286
- elif node.target == torch.ops.aten.cat.default:
287
- cat_args = CatArgs(*node.args, **node.kwargs)
288
- tensors = cat_args.tensors
289
-
290
- if any(QPARAM_KEY not in x.meta for x in tensors):
291
- continue
292
-
293
- if QPARAM_KEY not in node.meta:
294
- continue
295
-
296
- assert len(tensors) > 0
297
- in_dtype = qparam_dtype(tensors[0])
298
- if in_dtype == qparam_dtype(node):
299
- continue
300
-
301
- if any(qparam_dtype(x) != in_dtype for x in tensors):
302
- continue
303
-
304
- if in_dtype == "int16" and qparam_dtype(node) == "uint8":
305
- quantize = _insert_quantize_op_after(node)
306
-
307
- quantize.meta[QPARAM_KEY] = copy.deepcopy(node.meta[QPARAM_KEY])
308
- node.meta[QPARAM_KEY] = _u8_to_i16(node.meta[QPARAM_KEY])
309
- logger.debug(
310
- f"quantize_per_tensor.default is inserted after {node.name}."
311
- )
312
- else:
313
- raise NotYetSupportedError("Unsupported dtype")
314
-
315
- elif node.target == torch.ops.aten.bmm.default:
316
- bmm_args = BmmArgs(*node.args, **node.kwargs)
317
- x = bmm_args.input
318
- y = bmm_args.mat2
319
-
320
- if QPARAM_KEY not in x.meta:
321
- continue
322
- if QPARAM_KEY not in y.meta:
323
- continue
324
- if QPARAM_KEY not in node.meta:
325
- continue
326
-
327
- if qparam_dtype(x) == qparam_dtype(node):
328
- continue
329
-
330
- if qparam_dtype(x) == "int16" and qparam_dtype(node) == "uint8":
331
- quantize = _insert_quantize_op_after(node)
332
-
333
- quantize.meta[QPARAM_KEY] = copy.deepcopy(node.meta[QPARAM_KEY])
334
- node.meta[QPARAM_KEY] = _u8_to_i16(node.meta[QPARAM_KEY])
335
- logger.debug(
336
- f"quantize_per_tensor.default is inserted after {node.name}."
337
- )
338
- else:
339
- raise NotYetSupportedError("Unsupported dtype")
340
-
341
- elif node.target == torch.ops.aten.permute.default:
342
- per_args = PermuteArgs(*node.args, **node.kwargs)
343
- inp = per_args.input
344
-
345
- if QPARAM_KEY not in inp.meta:
346
- continue
347
-
348
- if QPARAM_KEY not in node.meta:
349
- continue
350
-
351
- if qparam_dtype(inp) == qparam_dtype(node):
352
- continue
353
-
354
- if qparam_dtype(inp) == "int16" and qparam_dtype(node) == "uint8":
355
- # A new Quantize Op (s16 to u8) is inserted before (not after)
356
- # permute Op to reduce tensor size ealier
357
- quantize = _insert_quantize_op_before(node, inp)
358
-
359
- quantize.meta[QPARAM_KEY] = copy.deepcopy(node.meta[QPARAM_KEY])
360
- logger.debug(
361
- f"quantize_per_tensor.default is inserted before {node.name}."
362
- )
363
- elif qparam_dtype(inp) == "uint8" and qparam_dtype(node) == "int16":
364
- quantize = _insert_quantize_op_after(node)
365
-
366
- quantize.meta[QPARAM_KEY] = copy.deepcopy(node.meta[QPARAM_KEY])
367
- node.meta[QPARAM_KEY] = _i16_to_u8(node.meta[QPARAM_KEY])
368
- logger.debug(
369
- f"quantize_per_tensor.default is inserted after {node.name}."
370
- )
371
- else:
372
- raise NotYetSupportedError("Unsupported dtype")
373
- elif node.target == torch.ops.aten.reshape.default:
374
- reshape_args = ReshapeArgs(*node.args, **node.kwargs)
375
- inp = reshape_args.input
376
-
377
- if QPARAM_KEY not in inp.meta:
378
- continue
379
-
380
- if QPARAM_KEY not in node.meta:
381
- continue
382
-
383
- if qparam_dtype(inp) == qparam_dtype(node):
384
- continue
385
-
386
- if qparam_dtype(inp) == "int16" and qparam_dtype(node) == "uint8":
387
- # A new Quantize Op (s16 to u8) is inserted before (not after)
388
- # reshape Op to reduce tensor size ealier
389
- quantize = _insert_quantize_op_before(node, inp)
390
-
391
- quantize.meta[QPARAM_KEY] = copy.deepcopy(node.meta[QPARAM_KEY])
392
- logger.debug(
393
- f"quantize_per_tensor.default is inserted before {node.name}."
394
- )
395
- elif qparam_dtype(inp) == "uint8" and qparam_dtype(node) == "int16":
396
- quantize = _insert_quantize_op_after(node)
397
-
398
- quantize.meta[QPARAM_KEY] = copy.deepcopy(node.meta[QPARAM_KEY])
399
- node.meta[QPARAM_KEY] = _i16_to_u8(node.meta[QPARAM_KEY])
400
- logger.debug(
401
- f"quantize_per_tensor.default is inserted after {node.name}."
402
- )
403
- else:
404
- raise NotYetSupportedError("Unsupported dtype")
405
-
406
- elif node.target == torch.ops.aten.relu.default:
407
- relu_args = ReluArgs(*node.args, **node.kwargs)
408
- inp = relu_args.input
409
-
410
- if QPARAM_KEY not in inp.meta:
411
- continue
412
-
413
- if QPARAM_KEY not in node.meta:
414
- continue
415
-
416
- if qparam_dtype(inp) == qparam_dtype(node):
417
- continue
418
-
419
- if qparam_dtype(inp) == "int16" and qparam_dtype(node) == "uint8":
420
- quantize = _insert_quantize_op_after(node)
421
-
422
- quantize.meta[QPARAM_KEY] = copy.deepcopy(node.meta[QPARAM_KEY])
423
- node.meta[QPARAM_KEY] = _u8_to_i16(node.meta[QPARAM_KEY])
424
- logger.debug(
425
- f"quantize_per_tensor.default is inserted after {node.name}."
426
- )
427
- else:
428
- raise NotYetSupportedError("Unsupported dtype")
429
-
430
- # TODO Support more ops.
431
-
432
- graph.eliminate_dead_code()
433
- graph.lint()
434
- graph_module.recompile()
435
-
436
- # Run only once.
437
- return PassResult(False)
@@ -1,209 +0,0 @@
1
- tico/__init__.py,sha256=xbMeC4-9n5Z8Lu1B6yqbmE10G6wmHdhpue7kD7skYtM,1743
2
- tico/pt2_to_circle.py,sha256=gu3MD4Iqc0zMZcCZ2IT8oGbyj21CTSbT3Rgd9s2B_9A,2767
3
- tico/config/__init__.py,sha256=xZzCXjZ84qE-CsBi-dfaL05bqpQ3stKKfTXhnrJRyVs,142
4
- tico/config/base.py,sha256=anwOiJFkUxUi7Cef573JgQcjk6S-FSi6O_TLjYASW-g,1244
5
- tico/config/factory.py,sha256=il0zqB6Lm5NX2LnG-TUhmiP9vVeZ_3TucJMorVZIodY,1324
6
- tico/config/v1.py,sha256=O1jzpUBDwoWpLohEpI08pJNwVB-yz3ufPrQm2_XWq4Y,1108
7
- tico/experimental/__init__.py,sha256=IO6FP_xYbGy0dW0HL26GXD3ouxARaxCK7bz9dn4blPQ,26
8
- tico/experimental/quantization/__init__.py,sha256=aBkUiNH6v6WOPXdFa1TUx8WbF3dVfPGqJNdUFYbkfSo,77
9
- tico/experimental/quantization/config.py,sha256=h01WpP8Y-dLj6yg12pMZm3PXJqUnU2sWip5jBRc5x9Q,1604
10
- tico/experimental/quantization/public_interface.py,sha256=OKW8UoBMjPwiTacrWgQY9ENCh8ucPnYMSrl2R-w0pJ0,3982
11
- tico/experimental/quantization/quantizer.py,sha256=_2pDtWFKDCuKfYF2bptOwIYsa0VFNFM1ZNgi8_OGvHM,2365
12
- tico/experimental/quantization/algorithm/__init__.py,sha256=IO6FP_xYbGy0dW0HL26GXD3ouxARaxCK7bz9dn4blPQ,26
13
- tico/experimental/quantization/algorithm/gptq/__init__.py,sha256=IO6FP_xYbGy0dW0HL26GXD3ouxARaxCK7bz9dn4blPQ,26
14
- tico/experimental/quantization/algorithm/gptq/gptq.py,sha256=Qn9b_2ki7B64DcVEY25NMkww3PdZ5EqYQQXfYhNDQ6I,5555
15
- tico/experimental/quantization/algorithm/gptq/quant.py,sha256=Rl4wAOCmlE0U09BtNCDbccaSNohRHCNLwFi3zCqZfNo,5127
16
- tico/experimental/quantization/algorithm/gptq/quantizer.py,sha256=icaFDXA1UibgRI0nBZ4N0Ij1ajVpShWUFw5pTDffOiE,8914
17
- tico/experimental/quantization/algorithm/gptq/utils.py,sha256=vDIW5ow5c1VSFpub7QumMWorHrV86c0kOtlBxMw2Y2Y,1808
18
- tico/experimental/quantization/algorithm/pt2e/__init__.py,sha256=IO6FP_xYbGy0dW0HL26GXD3ouxARaxCK7bz9dn4blPQ,26
19
- tico/experimental/quantization/algorithm/pt2e/quantizer.py,sha256=mdTvsG87bo8fu0GaWqSM8iBCs-4f4EfUlVtk-Ko6M34,2546
20
- tico/experimental/quantization/algorithm/pt2e/utils.py,sha256=aQeJSp9Aul8smkHHRgYGiYu58xqEbct2UpEPMF8vq8Y,4848
21
- tico/experimental/quantization/algorithm/pt2e/annotation/__init__.py,sha256=IO6FP_xYbGy0dW0HL26GXD3ouxARaxCK7bz9dn4blPQ,26
22
- tico/experimental/quantization/algorithm/pt2e/annotation/annotator.py,sha256=szUSODiOUtUfCEY2fdCav5dkFDrTGHlECIcUv2o_P7c,7640
23
- tico/experimental/quantization/algorithm/pt2e/annotation/config.py,sha256=8x6YvixIogXh_PwqhKNb3L6lJyBDFQ_OHotonG_hWD0,977
24
- tico/experimental/quantization/algorithm/pt2e/annotation/spec.py,sha256=6CXHmeTbl8pzpHmrj9-bqIHMhHVGqPy7sYxyt-kWkKA,1437
25
- tico/experimental/quantization/algorithm/pt2e/annotation/utils.py,sha256=oBf4vjFzVQ3jfk1N-6S7A_3woO27QIc8zD4fM8OAZss,3161
26
- tico/experimental/quantization/algorithm/pt2e/annotation/op/__init__.py,sha256=IlBNBqXeopMqHRkR-TPiuN_IkwXaSMXlSVO_9vKceB0,834
27
- tico/experimental/quantization/algorithm/pt2e/annotation/op/adaptive_avg_pool2d.py,sha256=uMpQ9294gFYmaWwKs9vzPY98C9Xx3LTTGiw1pYKljxk,2469
28
- tico/experimental/quantization/algorithm/pt2e/annotation/op/add.py,sha256=cYsuGBiEmogkx5v_LtpzDKVf_YPHukpHPEjV4D1Hvbk,2214
29
- tico/experimental/quantization/algorithm/pt2e/annotation/op/conv2d.py,sha256=jaQ72qzM82AN1JKgdYslatmQ2ZGzLwUrbyVIMC7HYwY,3692
30
- tico/experimental/quantization/algorithm/pt2e/annotation/op/div.py,sha256=uPKorN80d3yFOmIDI6fK7uQ4eyqehgkoGnyCCZ_pfsg,2196
31
- tico/experimental/quantization/algorithm/pt2e/annotation/op/linear.py,sha256=hkqOXqkygXRoymU_tTt3GKGiSJP-jKx9ygXAC-XlYGg,3497
32
- tico/experimental/quantization/algorithm/pt2e/annotation/op/mean.py,sha256=gXZ7LQWujO6iN5ZjsV3emBSJJCt1VuhUnlnr7rJmpbU,2020
33
- tico/experimental/quantization/algorithm/pt2e/annotation/op/mul.py,sha256=MPfk2aPBqX6W4TuOI_ZElrU_hAc-9OtClOxkXvH6tsA,2211
34
- tico/experimental/quantization/algorithm/pt2e/annotation/op/relu6.py,sha256=UDWVX7xMlIfuyHlGVAJMAxRCC2C6ldfYqRwluChhhew,2017
35
- tico/experimental/quantization/algorithm/pt2e/annotation/op/rsqrt.py,sha256=s76-A-T8WVob4e-yTG4kNXfVK1T-nZU-aAl5ggl0AMQ,2027
36
- tico/experimental/quantization/algorithm/pt2e/annotation/op/sub.py,sha256=4z8HoY-p7n64QXTsSDcpzuYmSQgRu7ztu2oBBQcRy_4,2196
37
- tico/experimental/quantization/algorithm/pt2e/transformation/__init__.py,sha256=IO6FP_xYbGy0dW0HL26GXD3ouxARaxCK7bz9dn4blPQ,26
38
- tico/experimental/quantization/algorithm/pt2e/transformation/convert_scalars_to_attrs.py,sha256=Idtoya2RcGKlgUJgC9WqNz0jH3gf6ViuPmsD9ySHbls,2253
39
- tico/experimental/quantization/algorithm/smoothquant/__init__.py,sha256=IO6FP_xYbGy0dW0HL26GXD3ouxARaxCK7bz9dn4blPQ,26
40
- tico/experimental/quantization/algorithm/smoothquant/observer.py,sha256=yi9nR_BEuxKVjgFcYPeldhXlEbE9V-0r4kRRPcI3C70,2639
41
- tico/experimental/quantization/algorithm/smoothquant/quantizer.py,sha256=rQMtnqM1dBzjhY-KJRp3TWZSW-dzXrs5N5FagXzh0IQ,2564
42
- tico/experimental/quantization/algorithm/smoothquant/smooth_quant.py,sha256=uaMvdFzWUxUllhXfIEgCxYi1glXspICFCar4d4KyDvc,6180
43
- tico/experimental/quantization/evaluation/__init__.py,sha256=IO6FP_xYbGy0dW0HL26GXD3ouxARaxCK7bz9dn4blPQ,26
44
- tico/experimental/quantization/evaluation/backend.py,sha256=CZL9rZOA0t8cH7PHp6u9l7dGqWNvTj9bKOvwo0PVul0,692
45
- tico/experimental/quantization/evaluation/evaluate.py,sha256=DvAbvECeTUcEsiHUhscqEMC2msPvzbz3AD6LfjIt1n8,7989
46
- tico/experimental/quantization/evaluation/metric.py,sha256=Ae-vAkA8n6T9_aGv47rkz1MLCw9ji1oDm1Rdd_MIxNQ,3744
47
- tico/experimental/quantization/evaluation/utils.py,sha256=82RG_e5LuKfWo786wEZUVwXY93nNl901n04fB7D0Z6k,5909
48
- tico/experimental/quantization/evaluation/executor/__init__.py,sha256=IO6FP_xYbGy0dW0HL26GXD3ouxARaxCK7bz9dn4blPQ,26
49
- tico/experimental/quantization/evaluation/executor/backend_executor.py,sha256=3kLu3_rcsreA_NK42yRgRgubPtZmVp7QCRvaqLNw10E,1522
50
- tico/experimental/quantization/evaluation/executor/circle_executor.py,sha256=eCCJ9wTwR0vUJ0oN7jxtQxZ9598GRw6P6KUxiuGsIIM,2685
51
- tico/experimental/quantization/evaluation/executor/triv24_executor.py,sha256=sUoXl6oOO2arAKaNjOBg7HiQja145_Jv6qgY7XtR7A8,5159
52
- tico/experimental/quantization/passes/__init__.py,sha256=IO6FP_xYbGy0dW0HL26GXD3ouxARaxCK7bz9dn4blPQ,26
53
- tico/experimental/quantization/passes/fold_quant_ops.py,sha256=iaBMyO49CwVkhebMz3rjkHWfWE2LhwH6fORe7n4S6XQ,7040
54
- tico/experimental/quantization/passes/insert_quantize_on_dtype_mismatch.py,sha256=FfqTlGANcG1V64zw0MFcIxL9WafuxPINuzWohGdsYCg,16617
55
- tico/experimental/quantization/passes/propagate_qparam_backward.py,sha256=TGtyW0Z2qOTgVIasBdGRgbwH31YYd6ek7OvLTmCV614,3118
56
- tico/experimental/quantization/passes/propagate_qparam_forward.py,sha256=RhUHGCR2RpBO5KYkQ7Z8U5u7HEwDq2wdKHLKAJCi-5c,5138
57
- tico/experimental/quantization/passes/quantize_bias.py,sha256=ZQ3rETYStpW28JUbODRixbq5sDEOiIOB_qWA-Jzuu-Y,4337
58
- tico/experimental/quantization/passes/remove_weight_dequant_op.py,sha256=Klc_9-94tl0_AuAToKOjsWED_YPk5RB67eum0ddPX7o,6588
59
- tico/interpreter/__init__.py,sha256=IO6FP_xYbGy0dW0HL26GXD3ouxARaxCK7bz9dn4blPQ,26
60
- tico/interpreter/infer.py,sha256=1ZFe3DVMR2mlwBosoedqoL0-CGN_01CKLgMgxuw62KA,4861
61
- tico/interpreter/interpreter.py,sha256=tGbluCbrehTCqBu8mtGDNzby_ieJ2ry8_RH_eC0CQxk,3828
62
- tico/passes/__init__.py,sha256=IO6FP_xYbGy0dW0HL26GXD3ouxARaxCK7bz9dn4blPQ,26
63
- tico/passes/cast_aten_where_arg_type.py,sha256=ybtGj1L7_2zGyfb_G-_y1N1mRgKHVq6fBZc-9-fH9sA,7229
64
- tico/passes/cast_mixed_type_args.py,sha256=ArJpIPnQP1LPNaWIwee13Nbj749_awFKDO-pAYvdYvI,7618
65
- tico/passes/const_prop_pass.py,sha256=QOeR2u3fo9ZhWXRhfAUW1dTtuWgqgoqdDJoQ516UDbQ,11532
66
- tico/passes/convert_conv1d_to_conv2d.py,sha256=7YljWJQBX5vBUMgGgRv8TvbJ9UpEL9hf4ZU3dNUhEZ8,5301
67
- tico/passes/convert_layout_op_to_reshape.py,sha256=sCAFjkmVtiKjvDQSAgnjNBHl3_hWXJZElGDXQiTH-7s,2963
68
- tico/passes/convert_repeat_to_expand_copy.py,sha256=JbtFTmWyfJS2SSd_higP1IEhQeh7wHdN5dmTbbiFVCs,3237
69
- tico/passes/convert_to_relu6.py,sha256=1BJpUwUb6Zli_1y3eyJQo7dg9B1xvZ7sYjMbvEQsFJM,6442
70
- tico/passes/decompose_addmm.py,sha256=0IUZjRS8G-h7LPeYu27gxWyTKi3pKAF1uNU1y-mHLL0,4056
71
- tico/passes/decompose_batch_norm.py,sha256=hWR6PMqgzMuNME7oLiNaxDJl5ZwXZeqxSkcNEMW4vAE,6514
72
- tico/passes/decompose_fake_quantize.py,sha256=Y29HncMwgRffwmzl5-iua8MhWLd9zEAUWqlNhGhmoHg,5368
73
- tico/passes/decompose_fake_quantize_tensor_qparams.py,sha256=y519moei8WeEiSv24TnPoqy0i7xXc6j34rT-EykajCM,14020
74
- tico/passes/decompose_group_norm.py,sha256=rtjv3PrcFTtZ68uCsmE2LibnWaQU-e8NdKkblL4LqxE,10197
75
- tico/passes/decompose_grouped_conv2d.py,sha256=n2qv320akL1ju33ucZ6lU1cKEAaj0NI8YZ5CrUnkRLM,8512
76
- tico/passes/decompose_slice_scatter.py,sha256=xqMHKhW2595YoAeubKZ4jRhYW4TQ09EXPgLNgODqXG8,5653
77
- tico/passes/extract_dtype_kwargs.py,sha256=ObpsaFlrTPYQw2hJ7UsC5CocyAtBkT_bMtzkMUqAyKc,4333
78
- tico/passes/fill_meta_val.py,sha256=Xbam6Aq90ZfWItZw1dgLIwH_q8RCiU5JodKNqkj-ink,1797
79
- tico/passes/fuse_leading_unsqueeze_reshape.py,sha256=88jwTP35yRyXOk9xdO6YW2OEfdKAws3KFRT16WQz0RI,4291
80
- tico/passes/fuse_redundant_reshape_to_mean.py,sha256=GhJS1ZKB6Ns4AhwcW3uUQ6q-0N-AzlD32B2EwusUJHg,3761
81
- tico/passes/legalize_causal_mask_value.py,sha256=0nfUKGd7XSe9Hg5TAi4dUi6Nn6-JRTWCwhULR5AEgqs,4079
82
- tico/passes/legalize_predefined_layout_operators.py,sha256=MNx7L2dAlsxSazb-F7c0onPqHleI17zAc7AzQAa9aJ4,18934
83
- tico/passes/lower_pow2_to_mul.py,sha256=nfJXa9ZTZMiLg6ownSyvkM4KF2z9tZW34Q3CCWI_vmQ,2402
84
- tico/passes/lower_to_resize_nearest_neighbor.py,sha256=N6F56Of8Aiv-KIiYLHnh33WX72W60ZVQSBEYWHdYqNQ,9005
85
- tico/passes/lower_to_slice.py,sha256=0qAX3WzZdyMFDW4DiO9b5JFXd4rL1-0doBT6lJvaw_I,7260
86
- tico/passes/merge_consecutive_cat.py,sha256=BYmiU170DsrHQMj7gMe7U6ZpndrX-S4OpvJweDdspec,2701
87
- tico/passes/ops.py,sha256=XzaKC_FpsfJLpnU4JlL9X-HVarWKm8cX0iiRgx9bMOs,2909
88
- tico/passes/remove_nop.py,sha256=Hf91p_EJAOC6DyWNthash0_UWtEcNc_M7znamQfYQ5Y,2686
89
- tico/passes/remove_redundant_assert_nodes.py,sha256=IONd3xBy6I8tH6_Y1eN3_eCHH7WTC8soBgjXzOju9cQ,1612
90
- tico/passes/remove_redundant_expand.py,sha256=5SIqN7eIIcqF68tlrB31n1482jSBSBOgKb1wddLX6lw,2197
91
- tico/passes/remove_redundant_permute.py,sha256=98UsaZzFZdQzEEAR1pIzRisAf6hgfXLa88aayjalt3E,4292
92
- tico/passes/remove_redundant_reshape.py,sha256=ScLYTShXMXJBTzOByAEhX-qJe5pmu92pLsXv5mh7u5c,16454
93
- tico/passes/remove_redundant_slice.py,sha256=Iv7TbB39fktNb4eq0VdyZnwxL_VsKLJ90diMmaf3kZk,2087
94
- tico/passes/remove_redundant_to_copy.py,sha256=tKy4XKkO2l33fMxVPQ_iFkUeFvP15kbPvzPPhT_g0c8,3292
95
- tico/passes/restore_linear.py,sha256=xGJdNb-1CrkOKS9BnLbcblkZc6P2vVjKIi-7lRcs7Bk,4111
96
- tico/passes/segment_index_select.py,sha256=jn0M2sdUcDyjrvxfvM40wt5644iPQMY_ud0uvptXN84,5187
97
- tico/serialize/__init__.py,sha256=IO6FP_xYbGy0dW0HL26GXD3ouxARaxCK7bz9dn4blPQ,26
98
- tico/serialize/circle_graph.py,sha256=_u0vFDhPdOhEkucmaEhqILo13NKbjyVemPYFfC5YCZg,11619
99
- tico/serialize/circle_mapping.py,sha256=C9C3ORACQOdvBdnt5KRzlT8zao_TvzQklIxH794OhP0,5719
100
- tico/serialize/circle_serializer.py,sha256=KRx_Azx2Je9XNYe-pZuuiSMvbXEddd8M8qDATIt7XXk,8981
101
- tico/serialize/pack.py,sha256=5HZ9kX3x6C6CyT_FWS6FRmvx_P7Dx21orjUNQxJ2xlo,1297
102
- tico/serialize/quant_param.py,sha256=s97GJyDOZULnqFUWPakHais31G_qqPuO0awPHCkZDvI,1342
103
- tico/serialize/operators/__init__.py,sha256=LIvXsNnN4yUCS2CGNQ5XW8p8oXDTV_WHWuOEAw1t6WY,990
104
- tico/serialize/operators/hashable_opcode.py,sha256=sDVKNTgIQw4IBtMEjNH8tzssMPx1x8-U2oagomRjGF0,1368
105
- tico/serialize/operators/node_visitor.py,sha256=UYyCwXqSCeRyimThMShstHnt7vKM9tsuzQ_02uEwF9I,2356
106
- tico/serialize/operators/op_abs.py,sha256=Y-vy7rcqPT-qD3QS5R8zbApWWTPpjY6xuMMVnbIhYmQ,1827
107
- tico/serialize/operators/op_add.py,sha256=otm062DMHVAThWmOtSTZdPyP3P5-2cv5VL_UWBJeLms,2346
108
- tico/serialize/operators/op_alias_copy.py,sha256=Xu9OiILbGf8oddh8yTqovvLfgVs8XYV7Cg4n6CesWcg,2175
109
- tico/serialize/operators/op_any.py,sha256=9oxP-8vS5R4oKX6KaePygzC4-jh8MVgbiS8Z5AWYOAw,5237
110
- tico/serialize/operators/op_arange_start_step.py,sha256=0T5lWwh3TfsFStmVv0v5qG03KENRDBmMix08RXQ4D-U,2132
111
- tico/serialize/operators/op_argmax.py,sha256=ARyGHlmWVmzwCct93V5x1-VyKqhxMOvV8GuM8yQWXdo,2290
112
- tico/serialize/operators/op_avg_pool2d.py,sha256=vc7WCakGXtGFPV1ix5EJmboH23tQ-cSI36ePY3PHKI4,7544
113
- tico/serialize/operators/op_bmm.py,sha256=AELjHC9ISFPIzEEl5Kr1s4GSNLZElwZmVZJWkEyCEoA,2189
114
- tico/serialize/operators/op_cat.py,sha256=XDYOh0XAyrM0TlxVm6Sa0OFFGrKk7aSDcGXC-hYX4gs,2204
115
- tico/serialize/operators/op_clamp.py,sha256=ZRAsXLGsZqJEh4wXxESEpRJkRtUuJWTDgAem6lr9_5I,4298
116
- tico/serialize/operators/op_clone.py,sha256=vzDYJ8TS3tc2BAyd_z8nt5VqT1inpymSseMEhd9dva0,2394
117
- tico/serialize/operators/op_constant_pad_nd.py,sha256=OpP4AP-d1IFcWZolNa-o9ZxzXJQkMdG9WQ66soX3s-E,2675
118
- tico/serialize/operators/op_conv2d.py,sha256=UfYk5xnA9PqVYyjU9dUCSW0CiCmcEK3LnlnFh0WY4Gg,6599
119
- tico/serialize/operators/op_copy.py,sha256=vaianLQ19-2ZQZ-MdQ07YuOPeFeo_HAx2a0Qfn7I5Kk,6122
120
- tico/serialize/operators/op_cos.py,sha256=N12bNyuTQIxRnD0eHRPdFVzRQPMy1NFM4iM8oQ4lYzw,2034
121
- tico/serialize/operators/op_cumsum.py,sha256=3fmOf1mIeCX1uhTBcSJmRGXejzLtO8UwaI1eEQDC6nA,3798
122
- tico/serialize/operators/op_depthwise_conv2d.py,sha256=wH1SFjhWJdJrb8xi2qCiCeSWNxlL8IjEwALGCxTQxbc,7034
123
- tico/serialize/operators/op_dequantize_per_channel.py,sha256=aPcVxjdgvfSFoLnv9NL-RxO5vZYj8ulqriMP5LHIWs0,3133
124
- tico/serialize/operators/op_dequantize_per_tensor.py,sha256=u9aK_Xle9rDN0EHLE0YrCTlXY4Q53Ch9Di4qmx7ynps,2304
125
- tico/serialize/operators/op_div.py,sha256=WjeM2Ux7TyGlSNx2aVC783JvcL0xnY6FBYo1Q_kdb5Q,2201
126
- tico/serialize/operators/op_embedding.py,sha256=OL5E5kIUbVPd9ihvBh8CNxGPj7GPGA-up2VRrYYlqeY,2262
127
- tico/serialize/operators/op_eq.py,sha256=g17_K6IkWvnop_LaiUJzcGPUSFElz6UUrf7T0bor5Bo,2133
128
- tico/serialize/operators/op_exp.py,sha256=WWCXRqpo8E5uIq2J8saJO5e_Sny5NhVThUFxgTZQmEs,2047
129
- tico/serialize/operators/op_expand.py,sha256=Wc-FK-Je2nDW1x3g9kjSES3jxAhM5m7W2Irw1pt3BgE,3547
130
- tico/serialize/operators/op_full.py,sha256=1Hv-H829F4gj5ZklrEb2wwKB9wSHBkc6aFS08jYFxuw,1679
131
- tico/serialize/operators/op_full_like.py,sha256=XNxojtsGftURQs_RWKB17q24X_L1QOLYV6DGOI5S7n8,2010
132
- tico/serialize/operators/op_ge.py,sha256=TrgZ6wbIEYkDGfVFNtDlfM7ZkMMWjvcks5U5DankSbo,1892
133
- tico/serialize/operators/op_gelu.py,sha256=bS8-0rg5_bT__OI3mBDywxGx4xTO2Iqea3h-uC17MpU,2145
134
- tico/serialize/operators/op_gt.py,sha256=JAVbtuAUNLYhtJycJJCEkYo9QAvmiK4lTMdw5yHUd10,1886
135
- tico/serialize/operators/op_index.py,sha256=iDW2YSeUS_kLiWEaQ_MjrYpxZAFBbm7_GU_2B4SRe6c,3033
136
- tico/serialize/operators/op_index_select.py,sha256=cw7IbvixooikGxzbpUmI9tHS4kjl4lXLtO9D-GO8qLQ,2277
137
- tico/serialize/operators/op_instance_norm.py,sha256=AhcVm71ChB16BlPNwqBh5tMHCqMShOXHPkE8Ag9jBfQ,3144
138
- tico/serialize/operators/op_leaky_relu.py,sha256=UJPoL7kAIp6nAjyDdda_afdOcMLHme7NE77b2y76exc,2160
139
- tico/serialize/operators/op_linear.py,sha256=bw_mn2CiJy8CbpPevOV0PMPh0ZMWKAybLZ9cnIKJSsk,2527
140
- tico/serialize/operators/op_log.py,sha256=1TKvH2lttdAHE0P84vcxmOvGBBRUs6D71Jrei7SdZHE,1827
141
- tico/serialize/operators/op_log1p.py,sha256=gG7Fs4UDj_Nnp7U60UtPyz0fLv1lBpJVOGGCMm-42pY,3121
142
- tico/serialize/operators/op_logical_and.py,sha256=WhQ8knuq32BO-WhAqkOgpcUStPkjoPmRWuYNsKveF3w,2163
143
- tico/serialize/operators/op_logical_not.py,sha256=ugrVcRqR3IvUUaiRVW5cArCYJbzmkcXp88QM846jCww,2129
144
- tico/serialize/operators/op_lt.py,sha256=_vA7dWpV9wVBxB7JL9pLQT9BsV91NGQBq_0auAtHK5Y,2080
145
- tico/serialize/operators/op_max_dim.py,sha256=nS_TZl5uq4uv1LwgBD9Wddyac4atKqBiIWKIyeXse2s,2519
146
- tico/serialize/operators/op_max_pool2d_with_indices.py,sha256=Vab8KV4w0i70P5XPdqItXEv_hLFjscVngypOltRvBV8,5746
147
- tico/serialize/operators/op_maximum.py,sha256=JjBr6gWEnuakLuk1_feotTHfIIm3s5YqWmqhUMpSPI0,1873
148
- tico/serialize/operators/op_mean.py,sha256=rVQZOxCJkHFY4kQBAS1HVK0HkcqxgkSy6zvEDLX_WYQ,2267
149
- tico/serialize/operators/op_minimum.py,sha256=fASjQVcTPCin02umQwFPdq2ss-Ve7S5A33J3QmmQ_wQ,1873
150
- tico/serialize/operators/op_mm.py,sha256=Fgq_HUUKuXOQY_t8lah3SOUqTsGet-KbVttCK4-fjAk,6821
151
- tico/serialize/operators/op_mul.py,sha256=42Guc0MWBGBCZoj9-4LcLtTMtUPwsmDSVmvkR8tqLhM,3165
152
- tico/serialize/operators/op_ne.py,sha256=xa2WJL2tYksxw7fIJic_D9ltLEseyCII8HpR32Oq8Do,1900
153
- tico/serialize/operators/op_neg.py,sha256=fkI3ExyD3QF-qtxBcXqQutPNDbNL8g7lZYE7CyD2wLk,2046
154
- tico/serialize/operators/op_permute.py,sha256=5DfX3pfZ5FDNmrSqx3-hRwPA7vm36z7BfG-nuyyBTsM,2282
155
- tico/serialize/operators/op_pow.py,sha256=z_4G_J1k_keeVE6ZYKSy-kqkdJ_i4p4kHkO0dJZnz-Y,5434
156
- tico/serialize/operators/op_prelu.py,sha256=0ZybL5pNvBrRvQGy4M6gELrjiEXEsb2wBDdU8x4D75I,1874
157
- tico/serialize/operators/op_quantize_per_tensor.py,sha256=w-vYxSPnN2gtx-pEkkcMGU0ZjiwaS4y1sxy56pKEq3E,3004
158
- tico/serialize/operators/op_reciprocal.py,sha256=6b9_bxjg_0EvgAitSv1MgBi4PJSEgm-21s5qtWI1UR4,2394
159
- tico/serialize/operators/op_relu.py,sha256=WXCR_chwEUBqjFIQ_4E2avwk-Acy76pmX20rJQCBTQo,1832
160
- tico/serialize/operators/op_relu6.py,sha256=ZWqEolfAKjOdUC1ZCg0iuu4dBhkJRxVYR2tUzpbvKQM,1829
161
- tico/serialize/operators/op_repeat.py,sha256=0wTv1Mg7kg0eHz0CT6atyVAli4T4h5rYXq5opY6op20,4235
162
- tico/serialize/operators/op_reshape.py,sha256=0_bJwimiGAHaKkfwfhxUw9Gebt5tnecGaEVoKhEvV0Q,2550
163
- tico/serialize/operators/op_resize_nearest_neighbor.py,sha256=dXaAnZ5M_ko_tH-HolxNpHFXkDUQ8x45myskojP5XZE,2771
164
- tico/serialize/operators/op_round.py,sha256=pe6w_TB4xGLu0iPv4Qo0a0fIkY9DgCgXk5127TWt8pE,1837
165
- tico/serialize/operators/op_rsqrt.py,sha256=yl2vd8InjhLPbE0vHIrEera6DVXlY9dLgO7yZZCH3RI,1837
166
- tico/serialize/operators/op_scalar_tensor.py,sha256=vDWxi4hXwyDJJhvfMR_QrBInw_No3WeU_M4gtfZqmbo,1928
167
- tico/serialize/operators/op_select_copy.py,sha256=GPLN7QZmwSlA4WRbjfU6pLer3KVWzgaYsZPJXw_vv9g,2305
168
- tico/serialize/operators/op_sigmoid.py,sha256=ZubbGG1yU5uvNkEmOmbjj3eq7d9mwEaJdChRgL0OjDU,2045
169
- tico/serialize/operators/op_sin.py,sha256=MbttmHTVKhwKK6gH9Vbcbn5aAaxnQ71NdpmQAlTcojU,1827
170
- tico/serialize/operators/op_slice.py,sha256=g0r8lj5CIxpT6ixOKqUzwKiNhoiuIFwWjbpaiCoOg6w,5259
171
- tico/serialize/operators/op_softmax.py,sha256=8AwmsAVdSoIMKdfejrw9cy44TbOvvXsA0w3WQDVpI3A,3855
172
- tico/serialize/operators/op_split_with_sizes.py,sha256=TgYg1cu-3BSz9SsXfAhoJbo4q5ZzFaoFArkH_obsYlU,4274
173
- tico/serialize/operators/op_sqrt.py,sha256=9Q5jkuEPrim11XfSQHGDGVTMYk1TQhOfVqMVYD_eIrI,1871
174
- tico/serialize/operators/op_squeeze.py,sha256=QnNwfAdTC1xBm04C9DkVs8VB5YRN-4fCsIWn189QaPg,2416
175
- tico/serialize/operators/op_sub.py,sha256=yZskQJF0ylXVk02Uid8djPNIWDJ-0uHJar4UYhlJVkk,2479
176
- tico/serialize/operators/op_sum.py,sha256=B5aSwQMhyoBe2JYdE5nVQ3QeVDSzL-yuZZujsG08OdQ,2294
177
- tico/serialize/operators/op_tanh.py,sha256=rs7FsbQeUQ7Ak8RoQV9ymNGXHXRObojfY_SiqJiyqdA,1846
178
- tico/serialize/operators/op_to_copy.py,sha256=a8T0uPMavMO_md1a-4_0dlvDHyZS_xew0qB6xjf69rI,3934
179
- tico/serialize/operators/op_transpose_conv.py,sha256=YDObXXaHNOD7yjO1ccaB_NCfc5-L76ClvT3pduL8E90,5631
180
- tico/serialize/operators/op_unsqueeze.py,sha256=ZHhfVXSWEiwb2VDYX5uhxbGQyzZjKT7CrbBpVGxVHBU,2310
181
- tico/serialize/operators/op_view.py,sha256=5EMww-ve17Vm9XPuV03Tn7vJsjpU2J8U4d_FOrlm9_o,2546
182
- tico/serialize/operators/op_where.py,sha256=doE81GSwygrPBm3JIfN9w7kKXxeIYKxgk0eoY22QIcg,2845
183
- tico/serialize/operators/utils.py,sha256=lXGpEJW1h8U_-gfc6EWjvvSiq3yJ9P-v1v3EMRT_pSk,2954
184
- tico/utils/__init__.py,sha256=IO6FP_xYbGy0dW0HL26GXD3ouxARaxCK7bz9dn4blPQ,26
185
- tico/utils/convert.py,sha256=11Ps0i4-3Fmcts_PZO5Eo8rRL7FcLV33eHz_G97MnCg,12865
186
- tico/utils/define.py,sha256=Ypgp7YffM4pgPl4Zh6TmogSn1OxGBMRw_e09qYGflZk,1467
187
- tico/utils/diff_graph.py,sha256=_eDGGPDPYQD4b--MXX0DLoVgSt_wLfNPt47UlolLLR4,5272
188
- tico/utils/errors.py,sha256=f3csJjgbXG9W1aHhqEcou008Aor19W57X8oT5Hx8w1M,954
189
- tico/utils/graph.py,sha256=Y6aODsnc_-9l61oanknb7K1jqJ8B35iPypOKkM0Qkk0,9149
190
- tico/utils/installed_packages.py,sha256=J0FTwnkCGs0MxRWoCMYAqiwH7Z0GWFDLV--x-IndSp4,1017
191
- tico/utils/logging.py,sha256=IlbBWscsaHidI0dNqro1HEXAbIcbkR3BD5ukLy2m95k,1286
192
- tico/utils/model.py,sha256=Uqc92AnJXQ2pbvctS2z2F3Ku3yNrwXZ9O33hZVis7is,1250
193
- tico/utils/padding.py,sha256=jyNhGmlLZfruWZ6n5hll8RZOFg85iCZP8OJqnHGS97g,3293
194
- tico/utils/passes.py,sha256=kGmDe__5cPaO6i5EDAoXSVe6yXEoX9hAny4ROb3ZEmQ,2409
195
- tico/utils/register_custom_op.py,sha256=3-Yl6iYmx1qQA2igNHt4hYhQhQMkdPb7gF50LIY8yvc,27350
196
- tico/utils/serialize.py,sha256=AQXMBOLu-Kg2Rn-qbqsAtHndjZAZIavlKA0QFgJREHM,1420
197
- tico/utils/trace_decorators.py,sha256=ddLIiKQfSaQrxgF1kNpwjFTQnXENzeSfcr1kuAW4jGI,3221
198
- tico/utils/utils.py,sha256=fnbZ2RLH6-J-wqb32O4qsR1ce4BJU0wYNrk84QXa6_E,13158
199
- tico/utils/validate_args_kwargs.py,sha256=3dXkNll9E9eZq-p0HjYaV4YltQESqdEHBU34k-tIg1k,26733
200
- tico/utils/mx/__init__.py,sha256=IO6FP_xYbGy0dW0HL26GXD3ouxARaxCK7bz9dn4blPQ,26
201
- tico/utils/mx/elemwise_ops.py,sha256=V6glyAHsVR1joqpsgnNytatCD_ew92xNWZ19UFDoMTA,10281
202
- tico/utils/mx/formats.py,sha256=uzNWyu-1onUlwQfX5cZ6fZSUfHMRqorper7_T1k3jfk,3404
203
- tico/utils/mx/mx_ops.py,sha256=RcfUTYVi-wilGB2sC35OeARdwDqnixv7dG5iyZ-fQT8,8555
204
- tico-0.1.0.dev250714.dist-info/LICENSE,sha256=kp4JLII7bzRhPb0CPD5XTDZMh22BQ7h3k3B7t8TiSbw,12644
205
- tico-0.1.0.dev250714.dist-info/METADATA,sha256=5RPA0JUl-L5MOz1_Ix5-8SZSpn628DHjCpNZHPvrO68,8430
206
- tico-0.1.0.dev250714.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
207
- tico-0.1.0.dev250714.dist-info/entry_points.txt,sha256=kBKYSS_IYrSXmUYevmmepqIVPScq5vF8ulQRu3I_Zf0,59
208
- tico-0.1.0.dev250714.dist-info/top_level.txt,sha256=oqs7UPoNSKZEwqsX8B-KAWdQwfAa7i60pbxW_Jk7P3w,5
209
- tico-0.1.0.dev250714.dist-info/RECORD,,