tico 0.1.0.dev250716__py3-none-any.whl → 0.1.0.dev250720__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.
tico/__init__.py CHANGED
@@ -21,7 +21,7 @@ from tico.config import CompileConfigV1, get_default_config
21
21
  from tico.utils.convert import convert, convert_from_exported_program, convert_from_pt2
22
22
 
23
23
  # THIS LINE IS AUTOMATICALLY GENERATED BY setup.py
24
- __version__ = "0.1.0.dev250716"
24
+ __version__ = "0.1.0.dev250720"
25
25
 
26
26
  MINIMUM_SUPPORTED_VERSION = "2.5.0"
27
27
  SECURE_TORCH_VERSION = "2.6.0"
@@ -24,25 +24,18 @@ from tico.serialize.operators.hashable_opcode import OpCode
24
24
  from tico.serialize.operators.node_visitor import NodeVisitor, register_node_visitor
25
25
  from tico.serialize.operators.utils import create_builtin_operator, get_op_index
26
26
  from tico.utils.errors import NotYetSupportedError
27
- from tico.utils.utils import HAS_TORCH_OVER_25
28
27
  from tico.utils.validate_args_kwargs import SafeSoftmaxArgs, SoftmaxArgs
29
28
 
30
29
 
31
30
  @register_node_visitor
32
31
  class SoftMaxVisitor(NodeVisitor):
33
- target: List[torch._ops.OpOverload] = (
34
- [
35
- torch.ops.aten._softmax.default,
36
- # NOTE: Let's treat _safe_softmax as normal _softmax as its usage is for training.
37
- # In order for optimization during inference, it can be replaced to softmax.
38
- # ref: https://github.com/pytorch/pytorch/pull/133882
39
- torch.ops.aten._safe_softmax.default,
40
- ]
41
- if HAS_TORCH_OVER_25
42
- else [
43
- torch.ops.aten._softmax.default,
44
- ]
45
- )
32
+ target: List[torch._ops.OpOverload] = [
33
+ torch.ops.aten._softmax.default,
34
+ # NOTE: Let's treat _safe_softmax as normal _softmax as its usage is for training.
35
+ # In order for optimization during inference, it can be replaced to softmax.
36
+ # ref: https://github.com/pytorch/pytorch/pull/133882
37
+ torch.ops.aten._safe_softmax.default,
38
+ ]
46
39
 
47
40
  def __init__(self, op_codes: Dict[OpCode, int], graph):
48
41
  super().__init__(op_codes, graph)
tico/utils/utils.py CHANGED
@@ -29,7 +29,6 @@ from torch.utils import _pytree as pytree
29
29
  from tico.serialize.quant_param import QuantParam
30
30
 
31
31
 
32
- HAS_TORCH_OVER_25 = Version(torch.__version__) >= Version("2.5.0")
33
32
  HAS_TORCH_OVER_28_DEV = Version(torch.__version__) >= Version("2.8.0.dev")
34
33
 
35
34
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tico
3
- Version: 0.1.0.dev250716
3
+ Version: 0.1.0.dev250720
4
4
  Summary: Convert exported Torch module to circle
5
5
  Home-page: UNKNOWN
6
6
  License: UNKNOWN
@@ -1,4 +1,4 @@
1
- tico/__init__.py,sha256=7Bu_kNw98Z5aDMnphDfqKQ00FlgKKT8iym416i5oNBI,1743
1
+ tico/__init__.py,sha256=P5hsCpKkZHAsWZSqeeRcRf5A4xTOxnvCEkEebwNn9Zw,1743
2
2
  tico/pt2_to_circle.py,sha256=gu3MD4Iqc0zMZcCZ2IT8oGbyj21CTSbT3Rgd9s2B_9A,2767
3
3
  tico/config/__init__.py,sha256=xZzCXjZ84qE-CsBi-dfaL05bqpQ3stKKfTXhnrJRyVs,142
4
4
  tico/config/base.py,sha256=anwOiJFkUxUi7Cef573JgQcjk6S-FSi6O_TLjYASW-g,1244
@@ -169,7 +169,7 @@ tico/serialize/operators/op_select_copy.py,sha256=GPLN7QZmwSlA4WRbjfU6pLer3KVWzg
169
169
  tico/serialize/operators/op_sigmoid.py,sha256=ZubbGG1yU5uvNkEmOmbjj3eq7d9mwEaJdChRgL0OjDU,2045
170
170
  tico/serialize/operators/op_sin.py,sha256=MbttmHTVKhwKK6gH9Vbcbn5aAaxnQ71NdpmQAlTcojU,1827
171
171
  tico/serialize/operators/op_slice.py,sha256=g0r8lj5CIxpT6ixOKqUzwKiNhoiuIFwWjbpaiCoOg6w,5259
172
- tico/serialize/operators/op_softmax.py,sha256=8AwmsAVdSoIMKdfejrw9cy44TbOvvXsA0w3WQDVpI3A,3855
172
+ tico/serialize/operators/op_softmax.py,sha256=qwYke5zfhnSL89DZbzdr5Fc9SsJf0vI-LDZjT_NFpbc,3669
173
173
  tico/serialize/operators/op_split_with_sizes.py,sha256=TgYg1cu-3BSz9SsXfAhoJbo4q5ZzFaoFArkH_obsYlU,4274
174
174
  tico/serialize/operators/op_sqrt.py,sha256=9Q5jkuEPrim11XfSQHGDGVTMYk1TQhOfVqMVYD_eIrI,1871
175
175
  tico/serialize/operators/op_squeeze.py,sha256=QnNwfAdTC1xBm04C9DkVs8VB5YRN-4fCsIWn189QaPg,2416
@@ -197,15 +197,15 @@ tico/utils/pytree_utils.py,sha256=jrk3N6X6LiUnBCX_gM1K9nywbVAJBVnszlTAgeIeDUc,52
197
197
  tico/utils/register_custom_op.py,sha256=3-Yl6iYmx1qQA2igNHt4hYhQhQMkdPb7gF50LIY8yvc,27350
198
198
  tico/utils/serialize.py,sha256=AQXMBOLu-Kg2Rn-qbqsAtHndjZAZIavlKA0QFgJREHM,1420
199
199
  tico/utils/trace_decorators.py,sha256=ddLIiKQfSaQrxgF1kNpwjFTQnXENzeSfcr1kuAW4jGI,3221
200
- tico/utils/utils.py,sha256=fnbZ2RLH6-J-wqb32O4qsR1ce4BJU0wYNrk84QXa6_E,13158
200
+ tico/utils/utils.py,sha256=wFXiKEwJ9dtN78hN87i9hsM58l57XrbYOSuM20W-yas,13091
201
201
  tico/utils/validate_args_kwargs.py,sha256=3dXkNll9E9eZq-p0HjYaV4YltQESqdEHBU34k-tIg1k,26733
202
202
  tico/utils/mx/__init__.py,sha256=IO6FP_xYbGy0dW0HL26GXD3ouxARaxCK7bz9dn4blPQ,26
203
203
  tico/utils/mx/elemwise_ops.py,sha256=V6glyAHsVR1joqpsgnNytatCD_ew92xNWZ19UFDoMTA,10281
204
204
  tico/utils/mx/formats.py,sha256=uzNWyu-1onUlwQfX5cZ6fZSUfHMRqorper7_T1k3jfk,3404
205
205
  tico/utils/mx/mx_ops.py,sha256=RcfUTYVi-wilGB2sC35OeARdwDqnixv7dG5iyZ-fQT8,8555
206
- tico-0.1.0.dev250716.dist-info/LICENSE,sha256=kp4JLII7bzRhPb0CPD5XTDZMh22BQ7h3k3B7t8TiSbw,12644
207
- tico-0.1.0.dev250716.dist-info/METADATA,sha256=ol8z8iSa9e8WfJcDpebI1h_hXSQdi3jXwIOzIp-wAO4,8430
208
- tico-0.1.0.dev250716.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
209
- tico-0.1.0.dev250716.dist-info/entry_points.txt,sha256=kBKYSS_IYrSXmUYevmmepqIVPScq5vF8ulQRu3I_Zf0,59
210
- tico-0.1.0.dev250716.dist-info/top_level.txt,sha256=oqs7UPoNSKZEwqsX8B-KAWdQwfAa7i60pbxW_Jk7P3w,5
211
- tico-0.1.0.dev250716.dist-info/RECORD,,
206
+ tico-0.1.0.dev250720.dist-info/LICENSE,sha256=kp4JLII7bzRhPb0CPD5XTDZMh22BQ7h3k3B7t8TiSbw,12644
207
+ tico-0.1.0.dev250720.dist-info/METADATA,sha256=ncwaYx29fB0xReW7WfN6seFNwPbxdmGWfkw-EF4C8LE,8430
208
+ tico-0.1.0.dev250720.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
209
+ tico-0.1.0.dev250720.dist-info/entry_points.txt,sha256=kBKYSS_IYrSXmUYevmmepqIVPScq5vF8ulQRu3I_Zf0,59
210
+ tico-0.1.0.dev250720.dist-info/top_level.txt,sha256=oqs7UPoNSKZEwqsX8B-KAWdQwfAa7i60pbxW_Jk7P3w,5
211
+ tico-0.1.0.dev250720.dist-info/RECORD,,