tico 0.4.0.dev261104__tar.gz → 0.4.0.dev261109__tar.gz
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-0.4.0.dev261104 → tico-0.4.0.dev261109}/PKG-INFO +4 -1
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/README.md +3 -0
- tico-0.4.0.dev261109/tico/_version.py +1 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/graph.py +102 -11
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/passes/optimization/_pattern_utils.py +1 -1
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/passes/optimization/_utils.py +2 -12
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/passes/optimization/fold/evaluators/heavy.py +38 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/passes/optimization/fuse/linear.py +7 -8
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/runtime/executor.py +35 -5
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/runtime/kernels/shape_ops.py +3 -3
- tico-0.4.0.dev261109/tico/circle/runtime/rowwise_gather.py +156 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/config/v1.py +2 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/passes/convert_to_relu6.py +45 -70
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/passes/decompose_fake_quantize_tensor_qparams.py +33 -6
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/passes/remove_redundant_reshape.py +10 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/config/gemma4_attention.py +2 -2
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/examples/compare_side_by_side.py +1 -2
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/examples/export.py +8 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/passes/fold_quant_ops.py +14 -2
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/passes/insert_quantize_on_dtype_mismatch.py +9 -0
- tico-0.4.0.dev261109/tico/quantization/passes/preserve_embedding_quantization.py +461 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/passes/propagate_qparam_backward.py +12 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/passes/propagate_qparam_forward.py +4 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/passes/remove_weight_dequant_op.py +13 -2
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/adapters/gemma4.py +2 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/adapters/llama.py +7 -1
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/adapters/qwen3_vl.py +2 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/debug/wrapper_smoke/cases/llama.py +3 -2
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/export/circle.py +21 -2
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/export/gemma4.py +22 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/export/llama.py +18 -1
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/export/qwen3_vl.py +10 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/utils/check_missing_qparam.py +20 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/gemma4/quant_text_attention.py +34 -24
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/nn/quant_conv3d_decomposed.py +38 -2
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/nn/quant_conv_transpose2d.py +18 -6
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_dequantize_per_channel.py +23 -13
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_dequantize_per_tensor.py +8 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/utils/convert.py +10 -3
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico.egg-info/PKG-INFO +4 -1
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico.egg-info/SOURCES.txt +2 -0
- tico-0.4.0.dev261104/tico/_version.py +0 -1
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/LICENSE +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/pyproject.toml +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/setup.cfg +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/_buffer.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/_object.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/_schema.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/analysis/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/analysis/effects.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/analysis/purity.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/analysis/structural_hash.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/analysis/tensor_contract.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/builder.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/cli/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/cli/__main__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/cli/main.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/document.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/errors.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/export.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/inspect/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/inspect/printer.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/inspect/summary.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/io.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/mutation.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/operations/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/operations/extract.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/passes/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/passes/base.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/passes/cleanup/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/passes/cleanup/compact_indices.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/passes/cleanup/dead_code_elimination.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/passes/cleanup/graph_inputs.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/passes/manager.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/passes/optimization/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/passes/optimization/canonicalize/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/passes/optimization/canonicalize/equivalent_ops.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/passes/optimization/compatibility/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/passes/optimization/compatibility/custom_ops.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/passes/optimization/compatibility/fc_gelu_fc.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/passes/optimization/cse.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/passes/optimization/fold/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/passes/optimization/fold/constant_subgraph.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/passes/optimization/fold/evaluators/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/passes/optimization/fold/evaluators/base.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/passes/optimization/fold/evaluators/elementwise.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/passes/optimization/fold/evaluators/indexing.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/passes/optimization/fold/evaluators/shape.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/passes/optimization/fold/profiles.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/passes/optimization/fuse/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/passes/optimization/fuse/activation.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/passes/optimization/fuse/composite.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/passes/optimization/fuse/requantize.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/passes/optimization/fuse/spatial.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/passes/optimization/legalize/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/passes/optimization/legalize/dynamic_fully_connected.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/passes/optimization/policy.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/passes/optimization/simplify/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/passes/optimization/simplify/_layout_utils.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/passes/optimization/simplify/arithmetic.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/passes/optimization/simplify/identity_ops.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/passes/optimization/simplify/reductions.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/passes/optimization/simplify/transpose_region.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/passes/optimization/simplify/transpose_region_rules.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/passes/optimization/simplify/views.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/passes/presets.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/passes/rules.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/passes/worklist.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/rewrite.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/runtime/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/runtime/errors.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/runtime/kernels/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/runtime/kernels/base.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/runtime/kernels/elementwise.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/runtime/kernels/nn.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/runtime/kernels/quantize.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/runtime/kernels/reduction.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/runtime/program.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/runtime/quantization.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/selector.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/session.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/value/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/value/codec.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/value/dtype.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/value/tensor.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/verify.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/config/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/config/base.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/config/factory.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/experimental/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/interpreter/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/interpreter/backends.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/interpreter/infer.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/interpreter/interpreter.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/ops/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/ops/concat.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/ops/resize_bilinear.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/ops/same_padding_conv2d.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/passes/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/passes/cast_aten_where_arg_type.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/passes/cast_clamp_mixed_type_args.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/passes/cast_mixed_type_args.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/passes/const_prop_pass.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/passes/convert_conv1d_to_conv2d.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/passes/convert_conv3d_to_conv2d.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/passes/convert_expand_to_slice_cat.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/passes/convert_gather_to_gather_nd.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/passes/convert_layout_op_to_reshape.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/passes/convert_matmul_to_linear.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/passes/convert_repeat_to_expand_copy.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/passes/convert_sym_size_to_circle_shape.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/passes/decompose_addmm.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/passes/decompose_batch_norm.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/passes/decompose_fake_quantize.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/passes/decompose_group_norm.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/passes/decompose_grouped_conv2d.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/passes/decompose_slice_scatter.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/passes/eliminate_rank_round_trip_region.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/passes/extract_dtype_kwargs.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/passes/fill_meta_val.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/passes/fuse_leading_unsqueeze_reshape.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/passes/fuse_redundant_reshape_to_mean.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/passes/legalize_causal_mask_value.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/passes/legalize_predefined_layout_operators.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/passes/lower_copy.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/passes/lower_multi_index_to_gather_nd.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/passes/lower_pow2_to_mul.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/passes/lower_to_resize_nearest_neighbor.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/passes/lower_to_slice.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/passes/merge_consecutive_cat.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/passes/ops.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/passes/remove_empty_cat_inputs.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/passes/remove_nop.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/passes/remove_redundant_assert_nodes.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/passes/remove_redundant_expand.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/passes/remove_redundant_permute.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/passes/remove_redundant_slice.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/passes/remove_redundant_to_copy.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/passes/remove_unused_placeholder.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/passes/restore_linear.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/passes/segment_index_select.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/pt2_to_circle.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/algorithm/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/algorithm/adaround/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/algorithm/adaround/discrete_refinement.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/algorithm/adaround/global_refinement.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/algorithm/adaround/joint.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/algorithm/adaround/joint_runner.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/algorithm/adaround/rounding.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/algorithm/adaround/runner.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/algorithm/adaround/screened_refinement.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/algorithm/block_reconstruction/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/algorithm/block_reconstruction/cache.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/algorithm/block_reconstruction/multistart.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/algorithm/block_reconstruction/observer.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/algorithm/block_reconstruction/qdrop.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/algorithm/block_reconstruction/runner.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/algorithm/block_reconstruction/selection.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/algorithm/cle/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/algorithm/cle/cle.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/algorithm/cle/quantizer.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/algorithm/fpi_gptq/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/algorithm/fpi_gptq/fpi_gptq.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/algorithm/fpi_gptq/quantizer.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/algorithm/fpi_gptq/util.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/algorithm/gemma4_gptq/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/algorithm/gemma4_gptq/gptq.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/algorithm/gemma4_gptq/quantizer.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/algorithm/gemma4_gptq/utils.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/algorithm/gptq/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/algorithm/gptq/gptq.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/algorithm/gptq/quant.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/algorithm/gptq/quantizer.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/algorithm/gptq/utils.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/algorithm/qwen3_vl_gptq/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/algorithm/qwen3_vl_gptq/gptq.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/algorithm/qwen3_vl_gptq/quantizer.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/algorithm/qwen3_vl_gptq/utils.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/algorithm/smoothquant/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/algorithm/smoothquant/observer.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/algorithm/smoothquant/quantizer.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/algorithm/smoothquant/smooth_quant.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/algorithm/spinquant/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/algorithm/spinquant/fuse_norm_utils.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/algorithm/spinquant/hadamard_utils.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/algorithm/spinquant/quantizer.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/algorithm/spinquant/qwen3_vl_model_utils.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/algorithm/spinquant/qwen3_vl_quantizer.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/algorithm/spinquant/qwen3_vl_rotation_utils.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/algorithm/spinquant/rotation_utils.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/algorithm/spinquant/spin_llama.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/algorithm/spinquant/spin_qwen3_vl.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/algorithm/universal_gptq/quantizer.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/analysis/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/analysis/ablation.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/analysis/clipping.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/analysis/inputs.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/analysis/metrics.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/analysis/output_quantization.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/analysis/outputs.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/analysis/profile.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/analysis/report.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/analysis/selector.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/analysis/sensitivity.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/config/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/config/base.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/config/builders.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/config/cle.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/config/fpi_gptq.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/config/gemma4_assistant_builders.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/config/gemma4_builders.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/config/gemma4_gptq.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/config/gptq.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/config/llama_attention.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/config/ptq.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/config/qwen3_vl_attention.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/config/qwen3_vl_gptq.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/config/qwen3_vl_spinquant.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/config/smoothquant.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/config/specs.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/config/spinquant.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/config/utils.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/evaluation/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/evaluation/backend.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/evaluation/evaluate.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/evaluation/executor/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/evaluation/executor/backend_executor.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/evaluation/executor/circle_executor.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/evaluation/executor/triv24_executor.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/evaluation/hellaswag_eval_utils.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/evaluation/llava_bench_judge_eval_utils.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/evaluation/lmms_eval_utils.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/evaluation/lmms_gemma4.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/evaluation/lmms_tasks/videomme_mini/utils.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/evaluation/metric.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/evaluation/mmlu_eval_utils.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/evaluation/mmmu_eval_utils.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/evaluation/optional_deps.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/evaluation/script/llm_tasks_eval.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/evaluation/script/mini_vqa_eval.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/evaluation/utils.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/evaluation/vlm_eval_utils.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/evaluation/vlm_generation_utils.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/examples/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/examples/configs/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/examples/evaluate.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/examples/generate.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/examples/inspector.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/examples/quantize.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/passes/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/passes/legalize_quantized_clamp.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/passes/mx_qparam.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/passes/qparam_safe_const_prop.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/passes/quantize_bias.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/public_interface.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/quant_stub.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/quantizer.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/quantizer_registry.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/adapters/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/adapters/base.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/adapters/gemma4_assistant.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/config.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/context.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/data/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/data/dataset_config.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/data/dataset_usage.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/data/llm.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/data/vlm.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/debug/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/debug/cpu_fixtures.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/debug/cpu_static_cache.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/debug/cpu_validation.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/debug/export_regression.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/debug/static_gemma4_assistant_runtime.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/debug/static_gemma4_runtime.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/debug/static_llama_runtime.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/debug/static_qwen3_vl_runtime.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/debug/tied_embedding.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/debug/token_mask.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/debug/trace.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/debug/verify_llama_rope.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/debug/wrapper_smoke/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/debug/wrapper_smoke/case.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/debug/wrapper_smoke/cases/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/debug/wrapper_smoke/cases/gemma4.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/debug/wrapper_smoke/cases/gemma4_assistant.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/debug/wrapper_smoke/cases/nn.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/debug/wrapper_smoke/cases/qwen3_vl.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/debug/wrapper_smoke/registry.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/debug/wrapper_smoke/result.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/debug/wrapper_smoke/runner.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/debug/wrapper_smoke/utils.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/evaluation/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/evaluation/cached_nll.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/evaluation/eager.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/evaluation/hellaswag.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/evaluation/llava_bench.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/evaluation/llava_bench_judge.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/evaluation/llm.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/evaluation/mmlu.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/evaluation/mmmu.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/evaluation/selection.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/evaluation/video_mme.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/evaluation/vlm.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/export/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/export/checkpoint.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/export/gemma4_assistant.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/export/llama_bundle.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/extensions.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/override_policies.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/qparams.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/runner.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/runtime/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/runtime/llama.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/sequence_length.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/stages/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/stages/base.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/stages/cle.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/stages/gptq.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/stages/ptq.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/stages/smoothquant.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/stages/spinquant.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/recipes/utils.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/control.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/dtypes.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/examples/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/examples/compare_ppl.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/examples/debug_quant_outputs.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/examples/evaluate_fk_llama_model.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/examples/gemma4/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/examples/gemma4/quantize_for_causal_lm.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/examples/gemma4/quantize_for_conditional_generation.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/examples/gemma4/quantize_model.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/examples/gemma4/quantize_multimodal_embedder.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/examples/gemma4/quantize_text_scaled_word_embedding.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/examples/gemma4/quantize_vision_model.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/examples/gemma4/quantize_vision_patch_embedder.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/examples/gemma4/quantize_vision_pooler.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/examples/llama/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/examples/llama/quantize_attention_decode.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/examples/llama/quantize_attention_prefill.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/examples/llama/quantize_decoder_layer_decode.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/examples/llama/quantize_decoder_layer_prefill.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/examples/llama/quantize_mlp.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/examples/nn/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/examples/nn/quantize_conv3d.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/examples/nn/quantize_conv3d_special_case.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/examples/nn/quantize_layernorm.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/examples/nn/quantize_linear.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/examples/nn/quantize_tied_embedding.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/examples/quantize_full_qmodel_with_gptq.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/examples/quantize_qwen3_vl_with_gptq.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/examples/quantize_with_gptq.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/examples/qwen/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/examples/qwen/quantize_for_conditional_generation.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/examples/qwen/quantize_model.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/examples/qwen/quantize_text_attention.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/examples/qwen/quantize_text_decoder_layer.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/examples/qwen/quantize_text_mlp.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/examples/qwen/quantize_text_model.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/examples/qwen/quantize_vision_attention.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/examples/qwen/quantize_vision_block.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/examples/qwen/quantize_vision_mlp.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/examples/qwen/quantize_vision_model.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/examples/qwen/quantize_vision_patch_embed.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/examples/qwen/quantize_vision_patch_merger.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/examples/qwen/trace_qwen.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/examples/static_llama_layer_runtime.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/lifecycle.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/mode.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/observers/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/observers/affine_base.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/observers/base.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/observers/ema.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/observers/identity.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/observers/minmax.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/observers/mx.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/observers/percentile.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/qscheme.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/quantizer.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/utils/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/utils/introspection.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/utils/linear_folding.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/utils/metrics.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/utils/reduce_utils.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/utils/static_export.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/utils/utils.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/utils/version.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrap_helper.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/fairseq/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/fairseq/decoder_export_single_step.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/fairseq/quant_decoder.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/fairseq/quant_decoder_layer.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/fairseq/quant_encoder.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/fairseq/quant_encoder_layer.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/fairseq/quant_mha.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/gemma4/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/gemma4/embedding_scale_fusion.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/gemma4/export_adapters.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/gemma4/ple_embedding_host.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/gemma4/quant_clippable_linear.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/gemma4/quant_for_causal_lm.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/gemma4/quant_for_conditional_generation.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/gemma4/quant_model.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/gemma4/quant_multimodal_embedder.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/gemma4/quant_rmsnorm.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/gemma4/quant_text_decoder_layer.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/gemma4/quant_text_mlp.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/gemma4/quant_text_model.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/gemma4/quant_text_scaled_word_embedding.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/gemma4/quant_vision_attention.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/gemma4/quant_vision_encoder.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/gemma4/quant_vision_encoder_layer.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/gemma4/quant_vision_mlp.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/gemma4/quant_vision_model.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/gemma4/quant_vision_patch_embedder.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/gemma4/quant_vision_pooler.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/gemma4/rope.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/gemma4/static_vision_profile.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/gemma4/utils.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/gemma4/vision_split_export.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/gemma4_assistant/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/gemma4_assistant/export_adapters.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/gemma4_assistant/quant_backbone.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/gemma4_assistant/quant_for_causal_lm.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/gemma4_assistant/quant_masked_embedder.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/gemma4_assistant/sparse_head.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/gemma4_assistant/static_inputs.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/gemma4_assistant/utils.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/llama/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/llama/export_adapters.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/llama/position.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/llama/quant_attention.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/llama/quant_decoder_layer.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/llama/quant_mlp.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/llama/quant_model.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/llama/quant_model_for_causal_lm.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/llama/static_inputs.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/nn/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/nn/quant_conv2d.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/nn/quant_conv3d.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/nn/quant_embedding.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/nn/quant_layernorm.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/nn/quant_linear.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/nn/quant_maxpool2d.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/nn/quant_prelu.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/nn/quant_silu.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/ops/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/ops/quant_concat.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/ops/quant_resize_bilinear.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/ops/quant_rmsnorm.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/ops/quant_same_padding_conv2d.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/ptq_wrapper.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/quant_elementwise.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/quant_module_base.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/quant_stub.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/qwen_vl/export_adapters.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/qwen_vl/quant_for_conditional_generation.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/qwen_vl/quant_model.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/qwen_vl/quant_text_attention.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/qwen_vl/quant_text_decoder_layer.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/qwen_vl/quant_text_mlp.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/qwen_vl/quant_text_model.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/qwen_vl/quant_vision_attention.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/qwen_vl/quant_vision_block.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/qwen_vl/quant_vision_mlp.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/qwen_vl/quant_vision_model.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/qwen_vl/quant_vision_patch_embed.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/qwen_vl/quant_vision_patch_merger.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/qwen_vl/static_inputs.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/qwen_vl/vision_profile.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/quantization/wrapq/wrappers/registry.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/circle_binary.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/circle_graph.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/circle_mapping.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/circle_serializer.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/adapters/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/adapters/llama_rmsnorm.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/adapters/onert/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/adapters/onert/llama_attention.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/hashable_opcode.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/node_visitor.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_abs.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_add.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_alias_copy.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_any.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_arange_start_step.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_argmax.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_attention.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_avg_pool2d.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_bitwise_and.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_bmm.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_cat.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_circle_gather_nd.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_circle_shape.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_clamp.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_clone.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_constant_pad_nd.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_conv2d.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_cos.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_cumsum.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_depthwise_conv2d.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_div.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_elu.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_embedding.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_eq.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_exp.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_expand.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_full.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_full_like.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_ge.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_gelu.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_gt.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_index.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_index_select.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_instance_norm.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_le.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_leaky_relu.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_linear.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_log.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_log1p.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_logical_and.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_logical_not.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_lt.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_max_dim.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_max_pool2d_with_indices.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_maximum.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_mean.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_minimum.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_mm.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_mul.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_ne.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_neg.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_permute.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_pow.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_prelu.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_quantize_per_tensor.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_reciprocal.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_relu.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_relu6.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_repeat.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_reshape.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_resize_bilinear.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_resize_nearest_neighbor.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_rmsnorm.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_round.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_rsqrt.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_scalar_tensor.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_select_copy.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_sigmoid.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_sin.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_slice.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_softmax.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_split_with_sizes.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_sqrt.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_squeeze.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_sub.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_sum.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_tanh.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_to_copy.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_transpose_conv.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_unsqueeze.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_view.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/op_where.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/operators/utils.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/pack.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/serialize/quant_param.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/utils/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/utils/compat/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/utils/compat/torch.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/utils/compat/torch_version_policy.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/utils/compat/transformers.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/utils/define.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/utils/diff_graph.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/utils/dtype.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/utils/errors.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/utils/graph.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/utils/installed_packages.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/utils/logging.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/utils/model.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/utils/mx/__init__.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/utils/mx/dtypes.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/utils/mx/elemwise_ops.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/utils/mx/formats.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/utils/mx/mx_ops.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/utils/padding.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/utils/passes.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/utils/pytree_utils.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/utils/record_input.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/utils/register_custom_op.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/utils/serialize.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/utils/signature.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/utils/trace_decorators.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/utils/utils.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/utils/validate_args_kwargs.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/utils/version.py +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico.egg-info/dependency_links.txt +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico.egg-info/entry_points.txt +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico.egg-info/requires.txt +0 -0
- {tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tico
|
|
3
|
-
Version: 0.4.0.
|
|
3
|
+
Version: 0.4.0.dev261109
|
|
4
4
|
Summary: Convert Exported Torch Module To Circle
|
|
5
5
|
License: This file provides full text of licenses used in this project
|
|
6
6
|
|
|
@@ -391,6 +391,9 @@ quantized_model = convert(prepared_model)
|
|
|
391
391
|
|
|
392
392
|
## Documentation
|
|
393
393
|
|
|
394
|
+
Use the [documentation index](./docs/README.md) to find project guides, subsystem
|
|
395
|
+
references, worked examples, test documentation, and historical design documents.
|
|
396
|
+
|
|
394
397
|
### For users
|
|
395
398
|
|
|
396
399
|
| Document | Description |
|
|
@@ -135,6 +135,9 @@ quantized_model = convert(prepared_model)
|
|
|
135
135
|
|
|
136
136
|
## Documentation
|
|
137
137
|
|
|
138
|
+
Use the [documentation index](./docs/README.md) to find project guides, subsystem
|
|
139
|
+
references, worked examples, test documentation, and historical design documents.
|
|
140
|
+
|
|
138
141
|
### For users
|
|
139
142
|
|
|
140
143
|
| Document | Description |
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.4.0.dev261109"
|
|
@@ -117,6 +117,16 @@ class CircleGraph:
|
|
|
117
117
|
f"0..{len(subgraphs) - 1}."
|
|
118
118
|
)
|
|
119
119
|
self.subgraph = subgraphs[subgraph_index]
|
|
120
|
+
# The session pins one CircleGraph per subgraph revision, so the
|
|
121
|
+
# underlying flatbuffer vectors are immutable for this instance's
|
|
122
|
+
# lifetime. Materialize them once instead of on every accessor call.
|
|
123
|
+
self._operators_list = as_list(self.subgraph.operators)
|
|
124
|
+
self._tensors_list = as_list(self.subgraph.tensors)
|
|
125
|
+
self._operator_inputs_cache: dict[int, tuple[int, ...]] = {}
|
|
126
|
+
self._operator_outputs_cache: dict[int, tuple[int, ...]] = {}
|
|
127
|
+
self._buffers_list = as_list(model.buffers)
|
|
128
|
+
self._produced_tensor_indices_cache: frozenset[int] | None = None
|
|
129
|
+
self._live_operators_cache: frozenset[int] | None = None
|
|
120
130
|
self._producer: dict[int, int] = {}
|
|
121
131
|
self._consumers: dict[int, list[int]] = {}
|
|
122
132
|
self._build_index()
|
|
@@ -125,13 +135,13 @@ class CircleGraph:
|
|
|
125
135
|
def tensor_count(self) -> int:
|
|
126
136
|
"""Return the number of tensors in the subgraph."""
|
|
127
137
|
|
|
128
|
-
return len(
|
|
138
|
+
return len(self._tensors_list)
|
|
129
139
|
|
|
130
140
|
@property
|
|
131
141
|
def operator_count(self) -> int:
|
|
132
142
|
"""Return the number of operators in the subgraph."""
|
|
133
143
|
|
|
134
|
-
return len(
|
|
144
|
+
return len(self._operators_list)
|
|
135
145
|
|
|
136
146
|
@property
|
|
137
147
|
def inputs(self) -> tuple[int, ...]:
|
|
@@ -146,8 +156,7 @@ class CircleGraph:
|
|
|
146
156
|
return tuple(as_indices(self.subgraph.outputs))
|
|
147
157
|
|
|
148
158
|
def _build_index(self) -> None:
|
|
149
|
-
|
|
150
|
-
for operator_index, operator in enumerate(operators):
|
|
159
|
+
for operator_index, operator in enumerate(self._operators_list):
|
|
151
160
|
for tensor_index in as_indices(getattr(operator, "outputs", None)):
|
|
152
161
|
if tensor_index == OPTIONAL_TENSOR_INDEX:
|
|
153
162
|
continue
|
|
@@ -176,17 +185,25 @@ class CircleGraph:
|
|
|
176
185
|
def operator_inputs(self, operator_index: int) -> tuple[int, ...]:
|
|
177
186
|
"""Return input tensor indices for an operator."""
|
|
178
187
|
|
|
179
|
-
|
|
180
|
-
|
|
188
|
+
cached = self._operator_inputs_cache.get(operator_index)
|
|
189
|
+
if cached is None:
|
|
190
|
+
operator = self._operator(operator_index)
|
|
191
|
+
cached = tuple(as_indices(getattr(operator, "inputs", None)))
|
|
192
|
+
self._operator_inputs_cache[operator_index] = cached
|
|
193
|
+
return cached
|
|
181
194
|
|
|
182
195
|
def operator_outputs(self, operator_index: int) -> tuple[int, ...]:
|
|
183
196
|
"""Return output tensor indices for an operator."""
|
|
184
197
|
|
|
185
|
-
|
|
186
|
-
|
|
198
|
+
cached = self._operator_outputs_cache.get(operator_index)
|
|
199
|
+
if cached is None:
|
|
200
|
+
operator = self._operator(operator_index)
|
|
201
|
+
cached = tuple(as_indices(getattr(operator, "outputs", None)))
|
|
202
|
+
self._operator_outputs_cache[operator_index] = cached
|
|
203
|
+
return cached
|
|
187
204
|
|
|
188
205
|
def _operator(self, operator_index: int) -> Any:
|
|
189
|
-
operators =
|
|
206
|
+
operators = self._operators_list
|
|
190
207
|
if operator_index < 0 or operator_index >= len(operators):
|
|
191
208
|
raise IndexError(
|
|
192
209
|
f"Operator index {operator_index} is outside the valid range "
|
|
@@ -194,10 +211,40 @@ class CircleGraph:
|
|
|
194
211
|
)
|
|
195
212
|
return operators[operator_index]
|
|
196
213
|
|
|
214
|
+
def operator(self, operator_index: int) -> Any:
|
|
215
|
+
"""Return one operator with a bounds check (snapshot-cached)."""
|
|
216
|
+
|
|
217
|
+
return self._operator(operator_index)
|
|
218
|
+
|
|
219
|
+
def tensor(self, tensor_index: int) -> Any:
|
|
220
|
+
"""Return one tensor with a bounds check (snapshot-cached)."""
|
|
221
|
+
|
|
222
|
+
tensors = self._tensors_list
|
|
223
|
+
if tensor_index < 0 or tensor_index >= len(tensors):
|
|
224
|
+
raise IndexError(
|
|
225
|
+
f"Tensor index {tensor_index} is outside the valid range "
|
|
226
|
+
f"0..{len(tensors) - 1}."
|
|
227
|
+
)
|
|
228
|
+
return tensors[tensor_index]
|
|
229
|
+
|
|
230
|
+
def produced_tensor_indices(self) -> frozenset[int]:
|
|
231
|
+
"""Return indices of tensors produced by any operator, computed once.
|
|
232
|
+
|
|
233
|
+
The set is cached because instances are revision-pinned snapshots:
|
|
234
|
+
the producer topology cannot change during this instance's lifetime.
|
|
235
|
+
"""
|
|
236
|
+
|
|
237
|
+
if self._produced_tensor_indices_cache is None:
|
|
238
|
+
produced: set[int] = set()
|
|
239
|
+
for operator in self._operators_list:
|
|
240
|
+
produced.update(as_indices(getattr(operator, "outputs", None)))
|
|
241
|
+
self._produced_tensor_indices_cache = frozenset(produced)
|
|
242
|
+
return self._produced_tensor_indices_cache
|
|
243
|
+
|
|
197
244
|
def tensor_name(self, tensor_index: int) -> str:
|
|
198
245
|
"""Return a decoded tensor name."""
|
|
199
246
|
|
|
200
|
-
tensors =
|
|
247
|
+
tensors = self._tensors_list
|
|
201
248
|
if tensor_index < 0 or tensor_index >= len(tensors):
|
|
202
249
|
raise IndexError(
|
|
203
250
|
f"Tensor index {tensor_index} is outside the valid range "
|
|
@@ -208,7 +255,37 @@ class CircleGraph:
|
|
|
208
255
|
def is_constant(self, tensor_index: int) -> bool:
|
|
209
256
|
"""Return whether a tensor has constant storage, possibly zero bytes."""
|
|
210
257
|
|
|
211
|
-
|
|
258
|
+
tensors = self._tensors_list
|
|
259
|
+
if tensor_index < 0 or tensor_index >= len(tensors):
|
|
260
|
+
return False
|
|
261
|
+
tensor = tensors[tensor_index]
|
|
262
|
+
if bool(getattr(tensor, "isVariable", False)):
|
|
263
|
+
return False
|
|
264
|
+
buffer_index = int(getattr(tensor, "buffer", 0) or 0)
|
|
265
|
+
buffers = self._buffers_list
|
|
266
|
+
if buffer_index <= 0 or buffer_index >= len(buffers):
|
|
267
|
+
return False
|
|
268
|
+
buffer = buffers[buffer_index]
|
|
269
|
+
if buffer is None:
|
|
270
|
+
return False
|
|
271
|
+
if has_buffer_payload(buffer):
|
|
272
|
+
return True
|
|
273
|
+
|
|
274
|
+
# shape=[] is a scalar (one element), not an empty tensor. A zero
|
|
275
|
+
# extent in a concrete shape is required before accepting a
|
|
276
|
+
# zero-byte buffer.
|
|
277
|
+
shape = as_indices(getattr(tensor, "shape", None))
|
|
278
|
+
if 0 not in shape or any(dimension < 0 for dimension in shape):
|
|
279
|
+
return False
|
|
280
|
+
signature = as_indices(getattr(tensor, "shapeSignature", None))
|
|
281
|
+
if signature and signature != shape:
|
|
282
|
+
return False
|
|
283
|
+
|
|
284
|
+
# Do not promote a runtime zero-sized tensor to a constant merely
|
|
285
|
+
# because an imported model assigned it an empty, nonzero buffer.
|
|
286
|
+
if tensor_index in self.inputs:
|
|
287
|
+
return False
|
|
288
|
+
return tensor_index not in self.produced_tensor_indices()
|
|
212
289
|
|
|
213
290
|
def predecessors(self, operator_index: int) -> tuple[int, ...]:
|
|
214
291
|
"""Return operators that directly feed an operator."""
|
|
@@ -278,6 +355,20 @@ class CircleGraph:
|
|
|
278
355
|
queue.append(input_index)
|
|
279
356
|
return visited_operators
|
|
280
357
|
|
|
358
|
+
def live_operators(self) -> frozenset[int]:
|
|
359
|
+
"""Return operators contributing to graph outputs, computed once.
|
|
360
|
+
|
|
361
|
+
The result is cached because instances are revision-pinned snapshots:
|
|
362
|
+
the liveness set cannot change during this instance's lifetime.
|
|
363
|
+
A frozenset is returned so callers cannot corrupt the shared cache.
|
|
364
|
+
"""
|
|
365
|
+
|
|
366
|
+
if self._live_operators_cache is None:
|
|
367
|
+
self._live_operators_cache = frozenset(
|
|
368
|
+
self.backward_operators(self.outputs)
|
|
369
|
+
)
|
|
370
|
+
return self._live_operators_cache
|
|
371
|
+
|
|
281
372
|
def region_boundary(self, operator_indices: Iterable[int]) -> GraphBoundary:
|
|
282
373
|
"""Compute graph inputs and outputs for an operator-induced region."""
|
|
283
374
|
|
{tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/passes/optimization/_pattern_utils.py
RENAMED
|
@@ -86,7 +86,7 @@ def capture_supporting_operators(
|
|
|
86
86
|
def operator_is_live(graph: CircleGraph, operator_index: int) -> bool:
|
|
87
87
|
"""Return whether an operator contributes to a serialized graph output."""
|
|
88
88
|
|
|
89
|
-
return int(operator_index) in graph.
|
|
89
|
+
return int(operator_index) in graph.live_operators()
|
|
90
90
|
|
|
91
91
|
|
|
92
92
|
def operator_matches(
|
|
@@ -196,23 +196,13 @@ def operator_version(model: Any, operator: Any) -> int:
|
|
|
196
196
|
def tensor_contract(graph: Any, tensor_index: int) -> TensorContract:
|
|
197
197
|
"""Capture the contract of one subgraph-local tensor."""
|
|
198
198
|
|
|
199
|
-
|
|
200
|
-
if tensor_index < 0 or tensor_index >= len(tensors):
|
|
201
|
-
raise IndexError(
|
|
202
|
-
f"Tensor index {tensor_index} is outside 0..{len(tensors) - 1}."
|
|
203
|
-
)
|
|
204
|
-
return TensorContract.from_tensor(tensors[tensor_index])
|
|
199
|
+
return TensorContract.from_tensor(graph.tensor(tensor_index))
|
|
205
200
|
|
|
206
201
|
|
|
207
202
|
def tensor_object(graph: Any, tensor_index: int) -> Any:
|
|
208
203
|
"""Return one subgraph-local tensor with a bounds check."""
|
|
209
204
|
|
|
210
|
-
|
|
211
|
-
if tensor_index < 0 or tensor_index >= len(tensors):
|
|
212
|
-
raise IndexError(
|
|
213
|
-
f"Tensor index {tensor_index} is outside 0..{len(tensors) - 1}."
|
|
214
|
-
)
|
|
215
|
-
return tensors[tensor_index]
|
|
205
|
+
return graph.tensor(tensor_index)
|
|
216
206
|
|
|
217
207
|
|
|
218
208
|
def contract_is_fully_static(contract: TensorContract) -> bool:
|
|
@@ -104,6 +104,21 @@ class DequantizeEvaluator(ConstantEvaluator):
|
|
|
104
104
|
return None
|
|
105
105
|
if output_spec.name != "FLOAT32":
|
|
106
106
|
return None
|
|
107
|
+
# Keep row-wise lookup tables compressed even with the HEAVY profile.
|
|
108
|
+
# The runtime plans DQ -> GATHER from these serialized contracts and
|
|
109
|
+
# restores only the rows requested by dynamic indices. Folding this DQ
|
|
110
|
+
# would allocate and retain an entire FLOAT32 table before execution.
|
|
111
|
+
quantization = input_contract.quantization
|
|
112
|
+
if (
|
|
113
|
+
input_spec.name == "UINT8"
|
|
114
|
+
and len(input_contract.shape) == 2
|
|
115
|
+
and quantization is not None
|
|
116
|
+
and quantization.quantized_dimension == 0
|
|
117
|
+
and len(quantization.scale) == input_contract.shape[0]
|
|
118
|
+
and len(quantization.zero_point) == input_contract.shape[0]
|
|
119
|
+
and _feeds_dynamic_row_gather(context)
|
|
120
|
+
):
|
|
121
|
+
return None
|
|
107
122
|
|
|
108
123
|
source = context.input_value(0).data
|
|
109
124
|
if input_spec.name == "FLOAT16":
|
|
@@ -139,6 +154,29 @@ class DequantizeEvaluator(ConstantEvaluator):
|
|
|
139
154
|
)
|
|
140
155
|
|
|
141
156
|
|
|
157
|
+
def _feeds_dynamic_row_gather(context: ConstantEvaluationContext) -> bool:
|
|
158
|
+
"""Keep row lookups compressed, including cases the CPU plan must reject."""
|
|
159
|
+
|
|
160
|
+
operators = as_list(context.graph.subgraph.operators)
|
|
161
|
+
opcodes = as_list(context.document.model.operatorCodes)
|
|
162
|
+
output_index = context.output_indices[0]
|
|
163
|
+
gather_code = _schema_enum_value("BuiltinOperator", "GATHER")
|
|
164
|
+
for consumer_index in context.graph.consumers(output_index):
|
|
165
|
+
consumer = operators[consumer_index]
|
|
166
|
+
opcode = opcodes[int(consumer.opcodeIndex)]
|
|
167
|
+
inputs = tuple(int(index) for index in consumer.inputs)
|
|
168
|
+
options = getattr(consumer, "builtinOptions", None)
|
|
169
|
+
if (
|
|
170
|
+
int(opcode.builtinCode) == gather_code
|
|
171
|
+
and len(inputs) == 2
|
|
172
|
+
and inputs[0] == output_index
|
|
173
|
+
and int(getattr(options, "axis", 0)) in (0, -2)
|
|
174
|
+
and not context.graph.is_constant(inputs[1])
|
|
175
|
+
):
|
|
176
|
+
return True
|
|
177
|
+
return False
|
|
178
|
+
|
|
179
|
+
|
|
142
180
|
class FullyConnectedEvaluator(ConstantEvaluator):
|
|
143
181
|
"""Fold a static non-quantized FLOAT32 FULLY_CONNECTED operation."""
|
|
144
182
|
|
{tico-0.4.0.dev261104 → tico-0.4.0.dev261109}/tico/circle/passes/optimization/fuse/linear.py
RENAMED
|
@@ -210,7 +210,7 @@ class _LinearRuleBase(CircleRewriteRule[LinearFusionPlan]):
|
|
|
210
210
|
def _is_live(self, graph: CircleGraph, operator_index: int) -> bool:
|
|
211
211
|
"""Return whether an operator contributes to a serialized graph output."""
|
|
212
212
|
|
|
213
|
-
return operator_index in graph.
|
|
213
|
+
return operator_index in graph.live_operators()
|
|
214
214
|
|
|
215
215
|
def _linear_state(
|
|
216
216
|
self,
|
|
@@ -222,10 +222,9 @@ class _LinearRuleBase(CircleRewriteRule[LinearFusionPlan]):
|
|
|
222
222
|
) -> _LinearState | None:
|
|
223
223
|
"""Validate and decode one supported dense FLOAT32 linear operator."""
|
|
224
224
|
|
|
225
|
-
|
|
226
|
-
if operator_index < 0 or operator_index >= len(operators):
|
|
225
|
+
if operator_index < 0 or operator_index >= graph.operator_count:
|
|
227
226
|
return None
|
|
228
|
-
operator =
|
|
227
|
+
operator = graph.operator(operator_index)
|
|
229
228
|
descriptor = self.descriptors.get(
|
|
230
229
|
operator_builtin_code(document.model, operator)
|
|
231
230
|
)
|
|
@@ -397,7 +396,7 @@ class _PostAffineIntoLinearRule(_LinearRuleBase):
|
|
|
397
396
|
return None
|
|
398
397
|
if not self._is_live(graph, operator_index):
|
|
399
398
|
return None
|
|
400
|
-
operator =
|
|
399
|
+
operator = graph.operator(operator_index)
|
|
401
400
|
affine_name = _lookup_name(
|
|
402
401
|
self.affine_codes,
|
|
403
402
|
operator_builtin_code(document.model, operator),
|
|
@@ -600,7 +599,7 @@ class _PreAffineIntoFullyConnectedRule(_LinearRuleBase):
|
|
|
600
599
|
return None
|
|
601
600
|
if not self._is_live(graph, operator_index):
|
|
602
601
|
return None
|
|
603
|
-
operator =
|
|
602
|
+
operator = graph.operator(operator_index)
|
|
604
603
|
if operator_builtin_code(document.model, operator) != self.fully_connected_code:
|
|
605
604
|
return None
|
|
606
605
|
linear = self._linear_state(
|
|
@@ -614,7 +613,7 @@ class _PreAffineIntoFullyConnectedRule(_LinearRuleBase):
|
|
|
614
613
|
affine_index = graph.producer(linear.data_tensor)
|
|
615
614
|
if affine_index is None:
|
|
616
615
|
return None
|
|
617
|
-
affine =
|
|
616
|
+
affine = graph.operator(affine_index)
|
|
618
617
|
affine_name = _lookup_name(
|
|
619
618
|
self.affine_codes,
|
|
620
619
|
operator_builtin_code(document.model, affine),
|
|
@@ -788,7 +787,7 @@ class _HorizontalFullyConnectedRule(_LinearRuleBase):
|
|
|
788
787
|
return None
|
|
789
788
|
if not self._is_live(graph, operator_index):
|
|
790
789
|
return None
|
|
791
|
-
operator =
|
|
790
|
+
operator = graph.operator(operator_index)
|
|
792
791
|
if operator_builtin_code(document.model, operator) != self.add_code:
|
|
793
792
|
return None
|
|
794
793
|
if int(getattr(operator, "builtinOptionsType", 0) or 0) != (
|
|
@@ -53,6 +53,7 @@ from tico.circle.runtime.program import (
|
|
|
53
53
|
tensor_type_name,
|
|
54
54
|
)
|
|
55
55
|
from tico.circle.runtime.quantization import dequantize_array, fake_quantize_array
|
|
56
|
+
from tico.circle.runtime.rowwise_gather import plan_rowwise_gathers
|
|
56
57
|
|
|
57
58
|
|
|
58
59
|
@dataclass(frozen=True)
|
|
@@ -78,8 +79,14 @@ class CircleReferenceRuntime:
|
|
|
78
79
|
subgraph_index: int = 0,
|
|
79
80
|
registry: KernelRegistry | None = None,
|
|
80
81
|
verify: bool = True,
|
|
82
|
+
enable_rowwise_gather: bool = True,
|
|
81
83
|
) -> None:
|
|
82
|
-
"""Parse and prepare a Circle model for execution.
|
|
84
|
+
"""Parse and prepare a Circle model for execution.
|
|
85
|
+
|
|
86
|
+
``enable_rowwise_gather=False`` is a diagnostic oracle option: explicit
|
|
87
|
+
table DQ executes normally and may allocate the full float table. The
|
|
88
|
+
default prepares selected-row plans once from the serialized contracts.
|
|
89
|
+
"""
|
|
83
90
|
|
|
84
91
|
if isinstance(circle, CircleProgram):
|
|
85
92
|
program = circle
|
|
@@ -97,6 +104,16 @@ class CircleReferenceRuntime:
|
|
|
97
104
|
self._dequantized_constants: dict[int, np.ndarray] = {}
|
|
98
105
|
self._last_use = self._compute_last_use()
|
|
99
106
|
self.prepare()
|
|
107
|
+
self.rowwise_gather_plans, self._virtual_dequantizes = (
|
|
108
|
+
plan_rowwise_gathers(program) if enable_rowwise_gather else ({}, set())
|
|
109
|
+
)
|
|
110
|
+
self._rowwise_only_constants = {
|
|
111
|
+
plan.weight_index for plan in self.rowwise_gather_plans.values()
|
|
112
|
+
}
|
|
113
|
+
for operator in program.operators:
|
|
114
|
+
if operator.index not in self._virtual_dequantizes:
|
|
115
|
+
self._rowwise_only_constants.difference_update(operator.inputs)
|
|
116
|
+
self._rowwise_only_constants.difference_update(program.outputs)
|
|
100
117
|
|
|
101
118
|
# ------------------------------------------------------------------ setup
|
|
102
119
|
def prepare(self) -> None:
|
|
@@ -214,7 +231,9 @@ class CircleReferenceRuntime:
|
|
|
214
231
|
have the serialized dtype (FLOAT32 for quantized inputs in fake-quantize
|
|
215
232
|
mode). ``trace=True`` additionally keeps every intermediate tensor value
|
|
216
233
|
in ``tensor_values``; by default values are released once their last
|
|
217
|
-
consumer has executed.
|
|
234
|
+
consumer has executed. The virtual full-table DEQUANTIZE of a selected-row
|
|
235
|
+
plan is never materialized, including in trace mode, and is absent from
|
|
236
|
+
``tensor_values``.
|
|
218
237
|
"""
|
|
219
238
|
|
|
220
239
|
program = self.program
|
|
@@ -240,10 +259,16 @@ class CircleReferenceRuntime:
|
|
|
240
259
|
for tensor in program.tensors:
|
|
241
260
|
if tensor.constant is None:
|
|
242
261
|
continue
|
|
243
|
-
values[tensor.index] =
|
|
262
|
+
values[tensor.index] = (
|
|
263
|
+
tensor.constant
|
|
264
|
+
if tensor.index in self._rowwise_only_constants
|
|
265
|
+
else self._constant_value(tensor, mode)
|
|
266
|
+
)
|
|
244
267
|
|
|
245
268
|
output_set = set(program.outputs)
|
|
246
269
|
for operator in program.operators:
|
|
270
|
+
if operator.index in self._virtual_dequantizes:
|
|
271
|
+
continue
|
|
247
272
|
self._execute_operator(operator, values, mode)
|
|
248
273
|
if trace:
|
|
249
274
|
continue
|
|
@@ -294,12 +319,17 @@ class CircleReferenceRuntime:
|
|
|
294
319
|
f"No reference kernel is registered for builtin operator "
|
|
295
320
|
f"{operator.name}.\n at {program.describe_operator(operator)}"
|
|
296
321
|
)
|
|
322
|
+
plan = self.rowwise_gather_plans.get(operator.index)
|
|
297
323
|
operands: list[np.ndarray | None] = []
|
|
298
324
|
for position, tensor_index in enumerate(operator.inputs):
|
|
299
325
|
if tensor_index == OPTIONAL_INDEX:
|
|
300
326
|
operands.append(None)
|
|
301
327
|
continue
|
|
302
|
-
value =
|
|
328
|
+
value = (
|
|
329
|
+
program.tensor(plan.weight_index).constant
|
|
330
|
+
if plan is not None and position == 0
|
|
331
|
+
else values.get(tensor_index)
|
|
332
|
+
)
|
|
303
333
|
if value is None:
|
|
304
334
|
raise CircleRuntimeValidationError(
|
|
305
335
|
f"Operator {operator.index} ({operator.name}) input {position} "
|
|
@@ -326,7 +356,7 @@ class CircleReferenceRuntime:
|
|
|
326
356
|
)
|
|
327
357
|
try:
|
|
328
358
|
with np.errstate(all="ignore"):
|
|
329
|
-
results = kernel(context)
|
|
359
|
+
results = plan.execute(context) if plan is not None else kernel(context)
|
|
330
360
|
except CircleRuntimeError:
|
|
331
361
|
raise
|
|
332
362
|
except (
|
|
@@ -374,7 +374,7 @@ def _pad_v2(ctx: KernelContext) -> tuple[np.ndarray, ...]:
|
|
|
374
374
|
return (_pad_common(ctx, constant.reshape(())),)
|
|
375
375
|
|
|
376
376
|
|
|
377
|
-
def
|
|
377
|
+
def check_indices(
|
|
378
378
|
ctx: KernelContext, indices: np.ndarray, limit: int, *, what: str
|
|
379
379
|
) -> np.ndarray:
|
|
380
380
|
if indices.dtype.kind not in {"i", "u"}:
|
|
@@ -407,7 +407,7 @@ def _gather(ctx: KernelContext) -> tuple[np.ndarray, ...]:
|
|
|
407
407
|
f"GATHER batch dimensions of params {params.shape} and indices "
|
|
408
408
|
f"{indices.shape} differ."
|
|
409
409
|
)
|
|
410
|
-
normalized =
|
|
410
|
+
normalized = check_indices(ctx, indices, params.shape[axis], what="indices")
|
|
411
411
|
if batch_dims == 0:
|
|
412
412
|
return (np.take(params, normalized, axis=axis),)
|
|
413
413
|
batch_shape = params.shape[:batch_dims]
|
|
@@ -443,7 +443,7 @@ def _gather_nd(ctx: KernelContext) -> tuple[np.ndarray, ...]:
|
|
|
443
443
|
coordinates = []
|
|
444
444
|
for position in range(depth):
|
|
445
445
|
coordinates.append(
|
|
446
|
-
|
|
446
|
+
check_indices(
|
|
447
447
|
ctx,
|
|
448
448
|
indices[..., position],
|
|
449
449
|
params.shape[position],
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
# Copyright (c) 2026 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
|
+
"""Prepare selected-row execution of explicit constant DEQUANTIZE -> GATHER.
|
|
16
|
+
|
|
17
|
+
The serialized graph keeps ordinary float GATHER semantics. Only its execution
|
|
18
|
+
plan changes: the full float DEQUANTIZE result is virtual, and each GATHER
|
|
19
|
+
materializes its selected rows. Q/DQ and MUL after GATHER remain separate kernels.
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
from __future__ import annotations
|
|
23
|
+
|
|
24
|
+
from dataclasses import dataclass
|
|
25
|
+
|
|
26
|
+
import numpy as np
|
|
27
|
+
|
|
28
|
+
from tico.circle.runtime.errors import UnsupportedCircleOperatorError
|
|
29
|
+
from tico.circle.runtime.kernels.base import KernelContext
|
|
30
|
+
from tico.circle.runtime.kernels.shape_ops import check_indices
|
|
31
|
+
from tico.circle.runtime.program import CircleProgram, RuntimeOperator
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
@dataclass(frozen=True)
|
|
35
|
+
class RowwiseGatherPlan:
|
|
36
|
+
"""One GATHER's immutable execution plan, containing O(V) metadata only."""
|
|
37
|
+
|
|
38
|
+
weight_index: int
|
|
39
|
+
dequantize_index: int
|
|
40
|
+
scale: np.ndarray
|
|
41
|
+
zero_point: np.ndarray
|
|
42
|
+
|
|
43
|
+
def execute(self, ctx: KernelContext) -> tuple[np.ndarray, ...]:
|
|
44
|
+
"""Gather integer rows and their qparams, then restore only those rows."""
|
|
45
|
+
|
|
46
|
+
weight = ctx.input(0)
|
|
47
|
+
indices = check_indices(ctx, ctx.input(1), weight.shape[0], what="indices")
|
|
48
|
+
selected = np.take(weight, indices, axis=0).astype(np.float32)
|
|
49
|
+
# In-place arithmetic bounds FP32 working storage to selected.shape.
|
|
50
|
+
selected -= np.take(self.zero_point, indices)[..., None]
|
|
51
|
+
selected *= np.take(self.scale, indices)[..., None]
|
|
52
|
+
return (selected,)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def plan_rowwise_gathers(
|
|
56
|
+
program: CircleProgram,
|
|
57
|
+
) -> tuple[dict[int, RowwiseGatherPlan], set[int]]:
|
|
58
|
+
"""Plan row-wise constant UINT8 lookups once, rejecting unsafe target cases.
|
|
59
|
+
|
|
60
|
+
Other DQ graphs retain ordinary execution. A constant rank-2 quantized table
|
|
61
|
+
feeding axis-0 GATHER is a target: an unsupported target receives a diagnostic
|
|
62
|
+
rather than silently allocating the full FP32 table. Multiple GATHER consumers
|
|
63
|
+
of one DQ are supported; other DQ consumers and a visible full-table output
|
|
64
|
+
cannot be served by selected rows and are rejected.
|
|
65
|
+
"""
|
|
66
|
+
|
|
67
|
+
consumers: dict[int, list[RuntimeOperator]] = {}
|
|
68
|
+
for operator in program.operators:
|
|
69
|
+
for index in operator.inputs:
|
|
70
|
+
consumers.setdefault(index, []).append(operator)
|
|
71
|
+
plans: dict[int, RowwiseGatherPlan] = {}
|
|
72
|
+
virtual: set[int] = set()
|
|
73
|
+
for dq in program.operators:
|
|
74
|
+
if dq.name != "DEQUANTIZE" or len(dq.inputs) != 1 or len(dq.outputs) != 1:
|
|
75
|
+
continue
|
|
76
|
+
weight = program.tensor(dq.inputs[0])
|
|
77
|
+
uses = consumers.get(dq.outputs[0], [])
|
|
78
|
+
qparams = weight.quantization
|
|
79
|
+
if (
|
|
80
|
+
not weight.is_constant
|
|
81
|
+
or len(weight.shape) != 2
|
|
82
|
+
or not weight.is_quantized_integer
|
|
83
|
+
or qparams is None
|
|
84
|
+
or weight.dtype != np.dtype(np.uint8)
|
|
85
|
+
or (len(qparams.scale) == 1 and weight.shape[0] != 1)
|
|
86
|
+
or not any(
|
|
87
|
+
use.name == "GATHER"
|
|
88
|
+
and len(use.inputs) == 2
|
|
89
|
+
and use.inputs[0] == dq.outputs[0]
|
|
90
|
+
and int(getattr(use.options, "axis", 0)) in (0, -2)
|
|
91
|
+
for use in uses
|
|
92
|
+
)
|
|
93
|
+
):
|
|
94
|
+
continue
|
|
95
|
+
|
|
96
|
+
def unsupported(reason: str) -> None:
|
|
97
|
+
raise UnsupportedCircleOperatorError(
|
|
98
|
+
"Selected-row DEQUANTIZE -> GATHER cannot execute this table: "
|
|
99
|
+
f"{reason}. No full-table fallback is used.\n"
|
|
100
|
+
f" at {program.describe_operator(dq)}"
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
assert qparams is not None
|
|
104
|
+
if weight.dtype != np.dtype(np.uint8) or weight.is_variable:
|
|
105
|
+
unsupported("requires constant UINT8 weight")
|
|
106
|
+
if (
|
|
107
|
+
qparams.quantized_dimension != 0
|
|
108
|
+
or len(qparams.scale) != weight.shape[0]
|
|
109
|
+
or len(qparams.zero_point) != weight.shape[0]
|
|
110
|
+
):
|
|
111
|
+
unsupported("requires one scale/zero_point per vocabulary row on axis 0")
|
|
112
|
+
scales = np.asarray(qparams.scale, dtype=np.float32)
|
|
113
|
+
zero_points = np.asarray(qparams.zero_point, dtype=np.float32)
|
|
114
|
+
if not np.all(np.isfinite(scales)) or np.any(scales <= 0):
|
|
115
|
+
unsupported("row scales must be finite and positive")
|
|
116
|
+
if np.any(zero_points < 0) or np.any(zero_points > 255):
|
|
117
|
+
unsupported("UINT8 row zero_points must lie in [0, 255]")
|
|
118
|
+
float_table = program.tensor(dq.outputs[0])
|
|
119
|
+
if (
|
|
120
|
+
float_table.dtype != np.dtype(np.float32)
|
|
121
|
+
or float_table.is_quantized
|
|
122
|
+
or float_table.shape != weight.shape
|
|
123
|
+
or float_table.is_dynamic
|
|
124
|
+
):
|
|
125
|
+
unsupported("requires an unquantized FLOAT32 DQ result matching the table")
|
|
126
|
+
if dq.outputs[0] in program.outputs:
|
|
127
|
+
unsupported("full DQ result is a graph output")
|
|
128
|
+
for gather in uses:
|
|
129
|
+
if (
|
|
130
|
+
gather.name != "GATHER"
|
|
131
|
+
or len(gather.inputs) != 2
|
|
132
|
+
or len(gather.outputs) != 1
|
|
133
|
+
or gather.inputs[0] != dq.outputs[0]
|
|
134
|
+
or gather.index <= dq.index
|
|
135
|
+
or int(getattr(gather.options, "axis", 0)) not in (0, -2)
|
|
136
|
+
or int(getattr(gather.options, "batchDims", 0)) != 0
|
|
137
|
+
):
|
|
138
|
+
unsupported(
|
|
139
|
+
"DQ result has a consumer other than axis-0 batchDims=0 GATHER"
|
|
140
|
+
)
|
|
141
|
+
indices = program.tensor(gather.inputs[1])
|
|
142
|
+
output = program.tensor(gather.outputs[0])
|
|
143
|
+
if (
|
|
144
|
+
indices.dtype not in (np.dtype(np.int32), np.dtype(np.int64))
|
|
145
|
+
or indices.is_quantized
|
|
146
|
+
):
|
|
147
|
+
unsupported("indices must be unquantized INT32 or INT64 (any rank)")
|
|
148
|
+
if output.dtype != np.dtype(np.float32) or output.is_quantized:
|
|
149
|
+
unsupported("GATHER must select FLOAT32 values without a domain change")
|
|
150
|
+
plans[gather.index] = RowwiseGatherPlan(
|
|
151
|
+
weight.index, dq.index, scales, zero_points
|
|
152
|
+
)
|
|
153
|
+
scales.setflags(write=False)
|
|
154
|
+
zero_points.setflags(write=False)
|
|
155
|
+
virtual.add(dq.index)
|
|
156
|
+
return plans, virtual
|
|
@@ -28,6 +28,8 @@ class CompileConfigV1(CompileConfigBase):
|
|
|
28
28
|
eliminate_rank_round_trip: bool = False
|
|
29
29
|
# Apply Circle O1 to the built Circle document, independently of the FX passes.
|
|
30
30
|
circle_optimize: bool = True
|
|
31
|
+
# Preserve explicit quantization boundaries in supported embedding paths during Circle export.
|
|
32
|
+
preserve_embedding_quantization: bool = False
|
|
31
33
|
|
|
32
34
|
def get(self, name: str):
|
|
33
35
|
return super().get(name)
|