tico 0.4.0.dev261021__tar.gz → 0.4.0.dev261024__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.dev261021 → tico-0.4.0.dev261024}/PKG-INFO +1 -1
- tico-0.4.0.dev261024/tico/_version.py +1 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/analysis/tensor_contract.py +9 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/passes/optimization/simplify/transpose_region.py +6 -1
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/value/dtype.py +10 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/passes/fold_quant_ops.py +100 -55
- tico-0.4.0.dev261024/tico/quantization/passes/mx_qparam.py +270 -0
- tico-0.4.0.dev261024/tico/quantization/passes/propagate_qparam_backward.py +212 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/passes/propagate_qparam_forward.py +45 -5
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/adapters/gemma4.py +281 -6
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/gemma4/export_adapters.py +39 -2
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/gemma4/quant_text_attention.py +538 -40
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/gemma4/quant_text_decoder_layer.py +14 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/gemma4/quant_text_model.py +106 -2
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/gemma4/utils.py +37 -6
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/gemma4_assistant/export_adapters.py +17 -1
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/gemma4_assistant/quant_backbone.py +15 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_quantize_per_tensor.py +9 -3
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_split_with_sizes.py +25 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/utils/mx/dtypes.py +9 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/utils/register_custom_op.py +7 -1
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico.egg-info/PKG-INFO +1 -1
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico.egg-info/SOURCES.txt +1 -0
- tico-0.4.0.dev261021/tico/_version.py +0 -1
- tico-0.4.0.dev261021/tico/quantization/passes/propagate_qparam_backward.py +0 -95
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/LICENSE +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/README.md +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/pyproject.toml +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/setup.cfg +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/_buffer.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/_object.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/_schema.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/analysis/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/analysis/effects.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/analysis/purity.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/analysis/structural_hash.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/builder.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/cli/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/cli/__main__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/cli/main.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/document.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/errors.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/export.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/graph.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/inspect/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/inspect/printer.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/inspect/summary.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/io.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/mutation.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/operations/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/operations/extract.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/passes/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/passes/base.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/passes/cleanup/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/passes/cleanup/compact_indices.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/passes/cleanup/dead_code_elimination.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/passes/cleanup/graph_inputs.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/passes/manager.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/passes/optimization/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/passes/optimization/_pattern_utils.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/passes/optimization/_utils.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/passes/optimization/canonicalize/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/passes/optimization/canonicalize/equivalent_ops.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/passes/optimization/compatibility/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/passes/optimization/compatibility/custom_ops.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/passes/optimization/compatibility/fc_gelu_fc.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/passes/optimization/cse.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/passes/optimization/fold/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/passes/optimization/fold/constant_subgraph.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/passes/optimization/fold/evaluators/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/passes/optimization/fold/evaluators/base.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/passes/optimization/fold/evaluators/elementwise.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/passes/optimization/fold/evaluators/heavy.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/passes/optimization/fold/evaluators/indexing.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/passes/optimization/fold/evaluators/shape.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/passes/optimization/fold/profiles.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/passes/optimization/fuse/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/passes/optimization/fuse/activation.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/passes/optimization/fuse/composite.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/passes/optimization/fuse/linear.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/passes/optimization/fuse/requantize.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/passes/optimization/fuse/spatial.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/passes/optimization/legalize/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/passes/optimization/legalize/dynamic_fully_connected.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/passes/optimization/policy.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/passes/optimization/simplify/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/passes/optimization/simplify/_layout_utils.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/passes/optimization/simplify/arithmetic.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/passes/optimization/simplify/identity_ops.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/passes/optimization/simplify/reductions.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/passes/optimization/simplify/transpose_region_rules.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/passes/optimization/simplify/views.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/passes/presets.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/passes/rules.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/passes/worklist.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/rewrite.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/runtime/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/runtime/errors.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/runtime/executor.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/runtime/kernels/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/runtime/kernels/base.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/runtime/kernels/elementwise.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/runtime/kernels/nn.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/runtime/kernels/quantize.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/runtime/kernels/reduction.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/runtime/kernels/shape_ops.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/runtime/program.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/runtime/quantization.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/selector.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/session.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/value/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/value/codec.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/value/tensor.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/circle/verify.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/config/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/config/base.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/config/factory.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/config/v1.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/experimental/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/interpreter/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/interpreter/backends.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/interpreter/infer.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/interpreter/interpreter.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/ops/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/ops/concat.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/ops/resize_bilinear.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/ops/same_padding_conv2d.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/passes/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/passes/cast_aten_where_arg_type.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/passes/cast_clamp_mixed_type_args.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/passes/cast_mixed_type_args.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/passes/const_prop_pass.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/passes/convert_conv1d_to_conv2d.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/passes/convert_conv3d_to_conv2d.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/passes/convert_expand_to_slice_cat.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/passes/convert_gather_to_gather_nd.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/passes/convert_layout_op_to_reshape.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/passes/convert_matmul_to_linear.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/passes/convert_repeat_to_expand_copy.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/passes/convert_sym_size_to_circle_shape.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/passes/convert_to_relu6.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/passes/decompose_addmm.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/passes/decompose_batch_norm.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/passes/decompose_fake_quantize.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/passes/decompose_fake_quantize_tensor_qparams.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/passes/decompose_group_norm.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/passes/decompose_grouped_conv2d.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/passes/decompose_slice_scatter.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/passes/eliminate_rank_round_trip_region.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/passes/extract_dtype_kwargs.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/passes/fill_meta_val.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/passes/fuse_leading_unsqueeze_reshape.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/passes/fuse_redundant_reshape_to_mean.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/passes/legalize_causal_mask_value.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/passes/legalize_predefined_layout_operators.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/passes/lower_copy.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/passes/lower_multi_index_to_gather_nd.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/passes/lower_pow2_to_mul.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/passes/lower_to_resize_nearest_neighbor.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/passes/lower_to_slice.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/passes/merge_consecutive_cat.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/passes/ops.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/passes/remove_empty_cat_inputs.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/passes/remove_nop.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/passes/remove_redundant_assert_nodes.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/passes/remove_redundant_expand.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/passes/remove_redundant_permute.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/passes/remove_redundant_reshape.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/passes/remove_redundant_slice.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/passes/remove_redundant_to_copy.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/passes/remove_unused_placeholder.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/passes/restore_linear.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/passes/segment_index_select.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/pt2_to_circle.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/algorithm/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/algorithm/adaround/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/algorithm/adaround/discrete_refinement.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/algorithm/adaround/global_refinement.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/algorithm/adaround/joint.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/algorithm/adaround/joint_runner.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/algorithm/adaround/rounding.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/algorithm/adaround/runner.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/algorithm/adaround/screened_refinement.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/algorithm/block_reconstruction/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/algorithm/block_reconstruction/cache.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/algorithm/block_reconstruction/multistart.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/algorithm/block_reconstruction/observer.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/algorithm/block_reconstruction/qdrop.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/algorithm/block_reconstruction/runner.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/algorithm/block_reconstruction/selection.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/algorithm/cle/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/algorithm/cle/cle.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/algorithm/cle/quantizer.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/algorithm/fpi_gptq/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/algorithm/fpi_gptq/fpi_gptq.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/algorithm/fpi_gptq/quantizer.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/algorithm/fpi_gptq/util.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/algorithm/gemma4_gptq/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/algorithm/gemma4_gptq/gptq.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/algorithm/gemma4_gptq/quantizer.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/algorithm/gemma4_gptq/utils.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/algorithm/gptq/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/algorithm/gptq/gptq.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/algorithm/gptq/quant.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/algorithm/gptq/quantizer.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/algorithm/gptq/utils.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/algorithm/qwen3_vl_gptq/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/algorithm/qwen3_vl_gptq/gptq.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/algorithm/qwen3_vl_gptq/quantizer.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/algorithm/qwen3_vl_gptq/utils.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/algorithm/smoothquant/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/algorithm/smoothquant/observer.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/algorithm/smoothquant/quantizer.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/algorithm/smoothquant/smooth_quant.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/algorithm/spinquant/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/algorithm/spinquant/fuse_norm_utils.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/algorithm/spinquant/hadamard_utils.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/algorithm/spinquant/quantizer.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/algorithm/spinquant/qwen3_vl_model_utils.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/algorithm/spinquant/qwen3_vl_quantizer.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/algorithm/spinquant/qwen3_vl_rotation_utils.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/algorithm/spinquant/rotation_utils.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/algorithm/spinquant/spin_llama.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/algorithm/spinquant/spin_qwen3_vl.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/algorithm/universal_gptq/quantizer.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/analysis/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/analysis/ablation.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/analysis/clipping.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/analysis/inputs.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/analysis/metrics.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/analysis/output_quantization.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/analysis/outputs.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/analysis/profile.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/analysis/report.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/analysis/selector.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/analysis/sensitivity.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/config/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/config/base.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/config/builders.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/config/cle.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/config/fpi_gptq.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/config/gemma4_assistant_builders.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/config/gemma4_attention.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/config/gemma4_builders.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/config/gemma4_gptq.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/config/gptq.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/config/llama_attention.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/config/ptq.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/config/qwen3_vl_attention.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/config/qwen3_vl_gptq.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/config/qwen3_vl_spinquant.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/config/smoothquant.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/config/specs.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/config/spinquant.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/config/utils.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/evaluation/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/evaluation/backend.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/evaluation/evaluate.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/evaluation/executor/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/evaluation/executor/backend_executor.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/evaluation/executor/circle_executor.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/evaluation/executor/triv24_executor.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/evaluation/hellaswag_eval_utils.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/evaluation/llava_bench_judge_eval_utils.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/evaluation/lmms_eval_utils.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/evaluation/lmms_gemma4.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/evaluation/lmms_tasks/videomme_mini/utils.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/evaluation/metric.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/evaluation/mmlu_eval_utils.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/evaluation/mmmu_eval_utils.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/evaluation/optional_deps.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/evaluation/script/llm_tasks_eval.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/evaluation/script/mini_vqa_eval.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/evaluation/utils.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/evaluation/vlm_eval_utils.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/evaluation/vlm_generation_utils.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/examples/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/examples/compare_side_by_side.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/examples/configs/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/examples/evaluate.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/examples/export.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/examples/generate.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/examples/inspector.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/examples/quantize.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/passes/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/passes/concat_qparam.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/passes/insert_quantize_on_dtype_mismatch.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/passes/legalize_quantized_clamp.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/passes/qparam_safe_const_prop.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/passes/quantize_bias.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/passes/remove_weight_dequant_op.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/public_interface.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/quant_stub.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/quantizer.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/quantizer_registry.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/adapters/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/adapters/base.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/adapters/gemma4_assistant.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/adapters/llama.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/adapters/qwen3_vl.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/config.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/context.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/data/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/data/dataset_config.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/data/dataset_usage.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/data/llm.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/data/vlm.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/debug/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/debug/static_gemma4_assistant_runtime.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/debug/static_gemma4_runtime.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/debug/static_llama_runtime.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/debug/static_qwen3_vl_runtime.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/debug/tied_embedding.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/debug/token_mask.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/debug/trace.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/debug/wrapper_smoke/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/debug/wrapper_smoke/case.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/debug/wrapper_smoke/cases/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/debug/wrapper_smoke/cases/gemma4.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/debug/wrapper_smoke/cases/gemma4_assistant.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/debug/wrapper_smoke/cases/llama.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/debug/wrapper_smoke/cases/nn.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/debug/wrapper_smoke/cases/qwen3_vl.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/debug/wrapper_smoke/registry.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/debug/wrapper_smoke/result.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/debug/wrapper_smoke/runner.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/debug/wrapper_smoke/utils.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/evaluation/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/evaluation/hellaswag.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/evaluation/llava_bench.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/evaluation/llava_bench_judge.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/evaluation/llm.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/evaluation/mmlu.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/evaluation/mmmu.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/evaluation/selection.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/evaluation/video_mme.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/evaluation/vlm.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/export/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/export/checkpoint.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/export/circle.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/export/gemma4.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/export/gemma4_assistant.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/export/llama.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/export/llama_bundle.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/export/qwen3_vl.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/extensions.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/override_policies.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/qparams.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/runner.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/runtime/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/runtime/llama.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/stages/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/stages/base.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/stages/cle.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/stages/gptq.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/stages/ptq.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/stages/smoothquant.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/stages/spinquant.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/recipes/utils.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/control.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/dtypes.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/examples/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/examples/compare_ppl.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/examples/debug_quant_outputs.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/examples/evaluate_fk_llama_model.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/examples/gemma4/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/examples/gemma4/quantize_for_causal_lm.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/examples/gemma4/quantize_for_conditional_generation.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/examples/gemma4/quantize_model.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/examples/gemma4/quantize_multimodal_embedder.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/examples/gemma4/quantize_text_scaled_word_embedding.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/examples/gemma4/quantize_vision_model.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/examples/gemma4/quantize_vision_patch_embedder.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/examples/gemma4/quantize_vision_pooler.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/examples/llama/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/examples/llama/quantize_attention_decode.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/examples/llama/quantize_attention_prefill.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/examples/llama/quantize_decoder_layer_decode.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/examples/llama/quantize_decoder_layer_prefill.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/examples/llama/quantize_mlp.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/examples/nn/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/examples/nn/quantize_conv3d.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/examples/nn/quantize_conv3d_special_case.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/examples/nn/quantize_layernorm.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/examples/nn/quantize_linear.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/examples/nn/quantize_tied_embedding.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/examples/quantize_full_qmodel_with_gptq.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/examples/quantize_qwen3_vl_with_gptq.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/examples/quantize_with_gptq.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/examples/qwen/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/examples/qwen/quantize_for_conditional_generation.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/examples/qwen/quantize_model.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/examples/qwen/quantize_text_attention.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/examples/qwen/quantize_text_decoder_layer.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/examples/qwen/quantize_text_mlp.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/examples/qwen/quantize_text_model.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/examples/qwen/quantize_vision_attention.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/examples/qwen/quantize_vision_block.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/examples/qwen/quantize_vision_mlp.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/examples/qwen/quantize_vision_model.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/examples/qwen/quantize_vision_patch_embed.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/examples/qwen/quantize_vision_patch_merger.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/examples/qwen/trace_qwen.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/examples/static_llama_layer_runtime.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/mode.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/observers/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/observers/affine_base.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/observers/base.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/observers/ema.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/observers/identity.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/observers/minmax.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/observers/mx.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/observers/percentile.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/qscheme.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/quantizer.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/utils/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/utils/check_missing_qparam.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/utils/introspection.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/utils/linear_folding.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/utils/metrics.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/utils/reduce_utils.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/utils/utils.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/utils/version.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrap_helper.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/fairseq/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/fairseq/decoder_export_single_step.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/fairseq/quant_decoder.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/fairseq/quant_decoder_layer.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/fairseq/quant_encoder.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/fairseq/quant_encoder_layer.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/fairseq/quant_mha.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/gemma4/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/gemma4/embedding_scale_fusion.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/gemma4/ple_embedding_host.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/gemma4/quant_clippable_linear.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/gemma4/quant_for_causal_lm.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/gemma4/quant_for_conditional_generation.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/gemma4/quant_model.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/gemma4/quant_multimodal_embedder.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/gemma4/quant_rmsnorm.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/gemma4/quant_text_mlp.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/gemma4/quant_text_scaled_word_embedding.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/gemma4/quant_vision_attention.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/gemma4/quant_vision_encoder.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/gemma4/quant_vision_encoder_layer.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/gemma4/quant_vision_mlp.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/gemma4/quant_vision_model.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/gemma4/quant_vision_patch_embedder.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/gemma4/quant_vision_pooler.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/gemma4/rope.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/gemma4/static_vision_profile.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/gemma4/vision_split_export.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/gemma4_assistant/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/gemma4_assistant/quant_for_causal_lm.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/gemma4_assistant/quant_masked_embedder.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/gemma4_assistant/sparse_head.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/gemma4_assistant/static_inputs.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/gemma4_assistant/utils.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/llama/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/llama/export_adapters.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/llama/quant_attention.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/llama/quant_decoder_layer.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/llama/quant_mlp.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/llama/quant_model.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/llama/quant_model_for_causal_lm.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/nn/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/nn/quant_conv2d.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/nn/quant_conv3d.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/nn/quant_conv3d_decomposed.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/nn/quant_conv_transpose2d.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/nn/quant_embedding.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/nn/quant_layernorm.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/nn/quant_linear.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/nn/quant_maxpool2d.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/nn/quant_prelu.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/nn/quant_silu.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/ops/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/ops/quant_concat.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/ops/quant_resize_bilinear.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/ops/quant_rmsnorm.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/ops/quant_same_padding_conv2d.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/ptq_wrapper.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/quant_elementwise.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/quant_module_base.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/quant_stub.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/qwen_vl/export_adapters.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/qwen_vl/quant_for_conditional_generation.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/qwen_vl/quant_model.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/qwen_vl/quant_text_attention.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/qwen_vl/quant_text_decoder_layer.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/qwen_vl/quant_text_mlp.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/qwen_vl/quant_text_model.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/qwen_vl/quant_vision_attention.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/qwen_vl/quant_vision_block.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/qwen_vl/quant_vision_mlp.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/qwen_vl/quant_vision_model.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/qwen_vl/quant_vision_patch_embed.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/qwen_vl/quant_vision_patch_merger.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/qwen_vl/vision_profile.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/quantization/wrapq/wrappers/registry.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/circle_binary.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/circle_graph.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/circle_mapping.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/circle_serializer.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/adapters/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/adapters/llama_rmsnorm.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/adapters/onert/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/adapters/onert/llama_attention.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/hashable_opcode.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/node_visitor.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_abs.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_add.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_alias_copy.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_any.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_arange_start_step.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_argmax.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_attention.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_avg_pool2d.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_bitwise_and.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_bmm.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_cat.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_circle_gather_nd.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_circle_shape.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_clamp.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_clone.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_constant_pad_nd.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_conv2d.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_cos.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_cumsum.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_depthwise_conv2d.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_dequantize_per_channel.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_dequantize_per_tensor.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_div.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_elu.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_embedding.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_eq.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_exp.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_expand.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_full.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_full_like.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_ge.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_gelu.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_gt.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_index.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_index_select.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_instance_norm.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_le.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_leaky_relu.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_linear.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_log.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_log1p.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_logical_and.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_logical_not.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_lt.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_max_dim.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_max_pool2d_with_indices.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_maximum.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_mean.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_minimum.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_mm.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_mul.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_ne.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_neg.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_permute.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_pow.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_prelu.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_reciprocal.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_relu.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_relu6.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_repeat.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_reshape.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_resize_bilinear.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_resize_nearest_neighbor.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_rmsnorm.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_round.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_rsqrt.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_scalar_tensor.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_select_copy.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_sigmoid.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_sin.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_slice.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_softmax.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_sqrt.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_squeeze.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_sub.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_sum.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_tanh.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_to_copy.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_transpose_conv.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_unsqueeze.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_view.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/op_where.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/operators/utils.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/pack.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/serialize/quant_param.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/utils/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/utils/compat/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/utils/compat/torch.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/utils/compat/torch_version_policy.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/utils/compat/transformers.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/utils/convert.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/utils/define.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/utils/diff_graph.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/utils/dtype.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/utils/errors.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/utils/graph.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/utils/installed_packages.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/utils/logging.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/utils/model.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/utils/mx/__init__.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/utils/mx/elemwise_ops.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/utils/mx/formats.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/utils/mx/mx_ops.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/utils/padding.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/utils/passes.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/utils/pytree_utils.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/utils/record_input.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/utils/serialize.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/utils/signature.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/utils/trace_decorators.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/utils/utils.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/utils/validate_args_kwargs.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico/utils/version.py +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico.egg-info/dependency_links.txt +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico.egg-info/entry_points.txt +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico.egg-info/requires.txt +0 -0
- {tico-0.4.0.dev261021 → tico-0.4.0.dev261024}/tico.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.4.0.dev261024"
|
|
@@ -26,6 +26,7 @@ from tico.circle._object import (
|
|
|
26
26
|
vector_as_tuple,
|
|
27
27
|
)
|
|
28
28
|
from tico.circle.errors import CircleValueError
|
|
29
|
+
from tico.circle.value.dtype import is_mx_tensor_type
|
|
29
30
|
from tico.circle.value.tensor import TensorQuantization, TensorValue
|
|
30
31
|
|
|
31
32
|
|
|
@@ -252,6 +253,14 @@ class TensorContract:
|
|
|
252
253
|
raise CircleValueError(
|
|
253
254
|
"Static shape signature dimensions must match shape values."
|
|
254
255
|
)
|
|
256
|
+
if (
|
|
257
|
+
self.quantization is not None
|
|
258
|
+
and is_mx_tensor_type(self.tensor_type)
|
|
259
|
+
and self.quantization.quantized_dimension >= self.rank
|
|
260
|
+
):
|
|
261
|
+
raise CircleValueError(
|
|
262
|
+
"MX quantized_dimension must be within the tensor rank."
|
|
263
|
+
)
|
|
255
264
|
if self.quantization is not None and self.quantization.scale:
|
|
256
265
|
if self.rank == 0 and len(self.quantization.scale) > 1:
|
|
257
266
|
raise CircleValueError(
|
|
@@ -29,6 +29,7 @@ from tico.circle.passes.optimization.simplify._layout_utils import (
|
|
|
29
29
|
_is_transpose_op,
|
|
30
30
|
)
|
|
31
31
|
from tico.circle.rewrite import replace_tensor_uses
|
|
32
|
+
from tico.circle.value.dtype import is_mx_tensor_type
|
|
32
33
|
from .transpose_region_rules import (
|
|
33
34
|
_ADD_BUILTIN_CODE,
|
|
34
35
|
_OperatorRewritePlan,
|
|
@@ -171,9 +172,13 @@ def _permuted_shape(
|
|
|
171
172
|
|
|
172
173
|
|
|
173
174
|
def _per_tensor_encoding(tensor: Any) -> _PerTensorEncoding | None:
|
|
174
|
-
"""Return one
|
|
175
|
+
"""Return one encoding, excluding per-channel and MX activation qparams."""
|
|
175
176
|
|
|
176
177
|
tensor_type = int(getattr(tensor, "type", 0))
|
|
178
|
+
# MX has no affine scale vector, but its block axis is layout-sensitive.
|
|
179
|
+
# Keep these regions until their internal qparams can be remapped safely.
|
|
180
|
+
if is_mx_tensor_type(tensor_type):
|
|
181
|
+
return None
|
|
177
182
|
quantization = getattr(tensor, "quantization", None)
|
|
178
183
|
if quantization is None:
|
|
179
184
|
return _PerTensorEncoding(tensor_type, None, None)
|
|
@@ -151,6 +151,16 @@ def circle_tensor_type_value(name: str) -> int:
|
|
|
151
151
|
return int(getattr(enum_type, name))
|
|
152
152
|
|
|
153
153
|
|
|
154
|
+
@lru_cache(maxsize=None)
|
|
155
|
+
def is_mx_tensor_type(tensor_type: int) -> bool:
|
|
156
|
+
"""Return whether a Circle tensor uses axis-sensitive MX block encoding."""
|
|
157
|
+
|
|
158
|
+
return int(tensor_type) in (
|
|
159
|
+
circle_tensor_type_value("MXINT8"),
|
|
160
|
+
circle_tensor_type_value("MXFP4"),
|
|
161
|
+
)
|
|
162
|
+
|
|
163
|
+
|
|
154
164
|
@lru_cache(maxsize=1)
|
|
155
165
|
def default_tensor_type_registry() -> TensorTypeRegistry:
|
|
156
166
|
"""Return codecs for the dense and four-bit tensor types used by TICO."""
|
|
@@ -18,10 +18,12 @@ if TYPE_CHECKING:
|
|
|
18
18
|
import torch.fx
|
|
19
19
|
|
|
20
20
|
import copy
|
|
21
|
+
import operator
|
|
21
22
|
|
|
22
23
|
import torch
|
|
23
24
|
from torch.export import ExportedProgram
|
|
24
25
|
|
|
26
|
+
from tico.quantization.passes.mx_qparam import remap_mx_qparam
|
|
25
27
|
from tico.serialize.quant_param import QPARAM_KEY, QuantParam
|
|
26
28
|
from tico.utils import logging
|
|
27
29
|
from tico.utils.errors import NotYetSupportedError
|
|
@@ -29,6 +31,7 @@ from tico.utils.mx.dtypes import (
|
|
|
29
31
|
assert_supported_mx_export_options,
|
|
30
32
|
is_mx_dtype,
|
|
31
33
|
mx_dtype_from_elem_format,
|
|
34
|
+
normalize_mx_axis,
|
|
32
35
|
normalize_mx_elem_format,
|
|
33
36
|
)
|
|
34
37
|
from tico.utils.passes import PassBase, PassResult
|
|
@@ -45,6 +48,7 @@ _QPARAM_PRESERVING_VIEW_TARGETS = frozenset(
|
|
|
45
48
|
torch.ops.aten.permute.default,
|
|
46
49
|
torch.ops.aten.reshape.default,
|
|
47
50
|
torch.ops.aten.slice.Tensor,
|
|
51
|
+
torch.ops.aten.expand.default,
|
|
48
52
|
}
|
|
49
53
|
)
|
|
50
54
|
|
|
@@ -101,7 +105,7 @@ def _restore_float_inputs(graph: torch.fx.Graph) -> None:
|
|
|
101
105
|
|
|
102
106
|
|
|
103
107
|
def _inherit_qparam_from_view_chain(node: torch.fx.Node) -> bool:
|
|
104
|
-
"""Seed
|
|
108
|
+
"""Seed a view chain with its source's affine or remapped MX domain.
|
|
105
109
|
|
|
106
110
|
``FoldQuantOps`` runs before ``PropagateQParamForward``. A
|
|
107
111
|
requantization after a slice/view chain must therefore discover
|
|
@@ -110,8 +114,8 @@ def _inherit_qparam_from_view_chain(node: torch.fx.Node) -> bool:
|
|
|
110
114
|
the target Q-DQ pair can be folded into RESHAPE and the required Quantize
|
|
111
115
|
operation disappears.
|
|
112
116
|
|
|
113
|
-
|
|
114
|
-
|
|
117
|
+
MX views must preserve the shared-exponent blocks. Affine per-channel
|
|
118
|
+
propagation is not handled here.
|
|
115
119
|
"""
|
|
116
120
|
if QPARAM_KEY in node.meta:
|
|
117
121
|
return False
|
|
@@ -134,30 +138,52 @@ def _inherit_qparam_from_view_chain(node: torch.fx.Node) -> bool:
|
|
|
134
138
|
_inherit_qparam_from_view_chain(source)
|
|
135
139
|
qparams = [source.meta.get(QPARAM_KEY) for source in sources]
|
|
136
140
|
first_qparam = qparams[0]
|
|
141
|
+
if first_qparam is None or any(qparam is None for qparam in qparams):
|
|
142
|
+
return False
|
|
143
|
+
if is_mx_dtype(first_qparam.dtype):
|
|
144
|
+
current.meta[QPARAM_KEY] = remap_mx_qparam(first_qparam, current)
|
|
145
|
+
else:
|
|
146
|
+
if first_qparam.quantized_dimension is not None or any(
|
|
147
|
+
qparam != first_qparam for qparam in qparams[1:]
|
|
148
|
+
):
|
|
149
|
+
return False
|
|
150
|
+
current.meta[QPARAM_KEY] = copy.deepcopy(first_qparam)
|
|
151
|
+
break
|
|
152
|
+
if current.target == operator.getitem:
|
|
153
|
+
split = current.args[0]
|
|
137
154
|
if (
|
|
138
|
-
|
|
139
|
-
or
|
|
140
|
-
or any(qparam != first_qparam for qparam in qparams[1:])
|
|
155
|
+
not isinstance(split, torch.fx.Node)
|
|
156
|
+
or split.target != torch.ops.aten.split_with_sizes.default
|
|
141
157
|
):
|
|
142
158
|
return False
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
159
|
+
source = split.args[0]
|
|
160
|
+
elif current.target in _QPARAM_PRESERVING_VIEW_TARGETS or current.target == (
|
|
161
|
+
torch.ops.aten.constant_pad_nd.default
|
|
162
|
+
):
|
|
163
|
+
source = current.args[0]
|
|
164
|
+
else:
|
|
148
165
|
return False
|
|
149
|
-
|
|
150
|
-
source = current.args[0]
|
|
151
166
|
if not isinstance(source, torch.fx.Node):
|
|
152
167
|
return False
|
|
153
168
|
chain.append(current)
|
|
154
169
|
current = source
|
|
155
170
|
|
|
156
171
|
source_qparam: QuantParam = current.meta[QPARAM_KEY]
|
|
157
|
-
if source_qparam.quantized_dimension is not None
|
|
172
|
+
if source_qparam.quantized_dimension is not None and not is_mx_dtype(
|
|
173
|
+
source_qparam.dtype
|
|
174
|
+
):
|
|
175
|
+
return False
|
|
176
|
+
if not is_mx_dtype(source_qparam.dtype) and any(
|
|
177
|
+
view.target in {operator.getitem, torch.ops.aten.constant_pad_nd.default}
|
|
178
|
+
for view in chain
|
|
179
|
+
):
|
|
158
180
|
return False
|
|
159
181
|
|
|
160
182
|
for view in reversed(chain):
|
|
183
|
+
if is_mx_dtype(source_qparam.dtype):
|
|
184
|
+
mapped = remap_mx_qparam(source_qparam, view)
|
|
185
|
+
assert mapped is not None
|
|
186
|
+
source_qparam = mapped
|
|
161
187
|
view.meta[QPARAM_KEY] = copy.deepcopy(source_qparam)
|
|
162
188
|
return bool(chain)
|
|
163
189
|
|
|
@@ -167,7 +193,14 @@ def _mx_op_params(node) -> tuple[str, int, str, str]:
|
|
|
167
193
|
assert len(node.args) >= 3
|
|
168
194
|
elem_format = normalize_mx_elem_format(node.args[1])
|
|
169
195
|
axis = node.args[2]
|
|
170
|
-
|
|
196
|
+
source = node.args[0]
|
|
197
|
+
assert isinstance(source, torch.fx.Node)
|
|
198
|
+
# DecomposeFakeQuantize may not have refreshed the new Q node's value
|
|
199
|
+
# metadata yet. Q/DQ preserve shape, so use the quantizer's real input.
|
|
200
|
+
if node.target == torch.ops.circle_custom.dequantize_mx.default:
|
|
201
|
+
source = source.args[0]
|
|
202
|
+
assert isinstance(source, torch.fx.Node)
|
|
203
|
+
axis = normalize_mx_axis(axis, source.meta["val"].ndim)
|
|
171
204
|
shared_exp_method = node.kwargs.get(
|
|
172
205
|
"shared_exp_method", node.args[3] if len(node.args) > 3 else "max"
|
|
173
206
|
)
|
|
@@ -202,6 +235,51 @@ def _same_mx_qparam(lhs: QuantParam, rhs: QuantParam) -> bool:
|
|
|
202
235
|
)
|
|
203
236
|
|
|
204
237
|
|
|
238
|
+
def _fold_mx_qdq(dq: torch.fx.Node) -> None:
|
|
239
|
+
"""Fold an MX pair only after resolving its producer's existing domain."""
|
|
240
|
+
q = dq.args[0]
|
|
241
|
+
if not isinstance(q, torch.fx.Node):
|
|
242
|
+
return
|
|
243
|
+
if q.target != torch.ops.circle_custom.quantize_mx.default:
|
|
244
|
+
return
|
|
245
|
+
op = q.args[0]
|
|
246
|
+
if not isinstance(op, torch.fx.Node):
|
|
247
|
+
return
|
|
248
|
+
if _mx_op_params(q) != _mx_op_params(dq):
|
|
249
|
+
return
|
|
250
|
+
|
|
251
|
+
_inherit_qparam_from_view_chain(op)
|
|
252
|
+
qparam = _mx_qparam_from_quant_node(q)
|
|
253
|
+
existing = op.meta.get(QPARAM_KEY)
|
|
254
|
+
if existing is None:
|
|
255
|
+
# An explicit quantizer on a shared float value must not change its
|
|
256
|
+
# other users. Layout ops also cannot quantize their own inputs.
|
|
257
|
+
layout_output = op.target in _QPARAM_PRESERVING_VIEW_TARGETS or op.target in {
|
|
258
|
+
torch.ops.aten.cat.default,
|
|
259
|
+
torch.ops.aten.constant_pad_nd.default,
|
|
260
|
+
operator.getitem,
|
|
261
|
+
}
|
|
262
|
+
if (
|
|
263
|
+
layout_output
|
|
264
|
+
or op.target == torch.ops.aten.embedding.default
|
|
265
|
+
or any(user is not q for user in op.users)
|
|
266
|
+
):
|
|
267
|
+
if not layout_output:
|
|
268
|
+
op.meta[_PRESERVE_FLOAT_INPUTS_KEY] = True
|
|
269
|
+
q.meta[QPARAM_KEY] = qparam
|
|
270
|
+
dq.replace_all_uses_with(q, propagate_meta=False)
|
|
271
|
+
else:
|
|
272
|
+
op.meta[QPARAM_KEY] = qparam
|
|
273
|
+
dq.replace_all_uses_with(op, propagate_meta=False)
|
|
274
|
+
elif _same_mx_qparam(existing, qparam):
|
|
275
|
+
dq.replace_all_uses_with(op, propagate_meta=False)
|
|
276
|
+
else:
|
|
277
|
+
# A different axis or element format requires an explicit QUANTIZE,
|
|
278
|
+
# even when both sides use the same MX dtype.
|
|
279
|
+
q.meta[QPARAM_KEY] = qparam
|
|
280
|
+
dq.replace_all_uses_with(q, propagate_meta=False)
|
|
281
|
+
|
|
282
|
+
|
|
205
283
|
@trace_graph_diff_on_pass
|
|
206
284
|
class FoldQuantOps(PassBase):
|
|
207
285
|
"""
|
|
@@ -227,7 +305,8 @@ class FoldQuantOps(PassBase):
|
|
|
227
305
|
|
|
228
306
|
Algorithm
|
|
229
307
|
---------
|
|
230
|
-
1. Iterate over
|
|
308
|
+
1. Iterate over affine and MX Dequantize nodes in graph order, so mixed
|
|
309
|
+
quantization boundaries see the preceding domain.
|
|
231
310
|
2. For each DQ, verify it is driven by a Quantize node `q` and that
|
|
232
311
|
`q` and `dq` share identical (scale, zero-point, dtype).
|
|
233
312
|
3. a) If the producer op has **no** QPARAM, attach one, then replace
|
|
@@ -251,7 +330,8 @@ class FoldQuantOps(PassBase):
|
|
|
251
330
|
|
|
252
331
|
Discover an existing source domain through slices, views, and same-domain
|
|
253
332
|
concatenations before deciding whether a trailing Q is a requantization.
|
|
254
|
-
A float producer behind a layout view can still adopt its first Q
|
|
333
|
+
A float producer behind a layout view can still adopt its first affine Q
|
|
334
|
+
domain. MX keeps an explicit Q after an unquantized layout operation.
|
|
255
335
|
"""
|
|
256
336
|
|
|
257
337
|
def __init__(self):
|
|
@@ -265,6 +345,9 @@ class FoldQuantOps(PassBase):
|
|
|
265
345
|
for dq in graph.nodes:
|
|
266
346
|
if dq.op != "call_function":
|
|
267
347
|
continue
|
|
348
|
+
if dq.target == torch.ops.circle_custom.dequantize_mx.default:
|
|
349
|
+
_fold_mx_qdq(dq)
|
|
350
|
+
continue
|
|
268
351
|
if (
|
|
269
352
|
dq.target
|
|
270
353
|
!= torch.ops.quantized_decomposed.dequantize_per_tensor.default
|
|
@@ -344,44 +427,6 @@ class FoldQuantOps(PassBase):
|
|
|
344
427
|
dq.replace_all_uses_with(op, propagate_meta=False)
|
|
345
428
|
logger.debug(f"Removed redundant {dq.name}")
|
|
346
429
|
|
|
347
|
-
for dq in graph.nodes:
|
|
348
|
-
if dq.op != "call_function":
|
|
349
|
-
continue
|
|
350
|
-
if dq.target != torch.ops.circle_custom.dequantize_mx.default:
|
|
351
|
-
continue
|
|
352
|
-
|
|
353
|
-
q = dq.args[0]
|
|
354
|
-
if not isinstance(q, torch.fx.Node):
|
|
355
|
-
continue
|
|
356
|
-
if q.target != torch.ops.circle_custom.quantize_mx.default:
|
|
357
|
-
continue
|
|
358
|
-
|
|
359
|
-
source = q.args[0]
|
|
360
|
-
if not isinstance(source, torch.fx.Node):
|
|
361
|
-
continue
|
|
362
|
-
op = source
|
|
363
|
-
|
|
364
|
-
if _mx_op_params(q) != _mx_op_params(dq):
|
|
365
|
-
continue
|
|
366
|
-
|
|
367
|
-
qparam = _mx_qparam_from_quant_node(q)
|
|
368
|
-
|
|
369
|
-
if QPARAM_KEY not in op.meta:
|
|
370
|
-
op.meta[QPARAM_KEY] = qparam
|
|
371
|
-
dq.replace_all_uses_with(op, propagate_meta=False)
|
|
372
|
-
logger.debug(f"{q.name} and {dq.name} are folded to {op.name}.")
|
|
373
|
-
else:
|
|
374
|
-
op_qparam = op.meta[QPARAM_KEY]
|
|
375
|
-
if not _same_mx_qparam(op_qparam, qparam):
|
|
376
|
-
if QPARAM_KEY not in q.meta:
|
|
377
|
-
q.meta[QPARAM_KEY] = qparam
|
|
378
|
-
assert len(q.users) == 1, "Fix me unless"
|
|
379
|
-
dq.replace_all_uses_with(q, propagate_meta=False)
|
|
380
|
-
logger.debug(f"{dq.name} is folded ({q.name} is left).")
|
|
381
|
-
else:
|
|
382
|
-
dq.replace_all_uses_with(op, propagate_meta=False)
|
|
383
|
-
logger.debug(f"Removed redundant {dq.name}")
|
|
384
|
-
|
|
385
430
|
_restore_float_inputs(graph)
|
|
386
431
|
graph.eliminate_dead_code()
|
|
387
432
|
graph.lint()
|
|
@@ -0,0 +1,270 @@
|
|
|
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
|
+
"""Preserve MX block membership when tensor layouts change."""
|
|
16
|
+
|
|
17
|
+
from __future__ import annotations
|
|
18
|
+
|
|
19
|
+
import copy
|
|
20
|
+
import math
|
|
21
|
+
import operator
|
|
22
|
+
from typing import cast
|
|
23
|
+
|
|
24
|
+
import torch
|
|
25
|
+
|
|
26
|
+
from tico.serialize.quant_param import QPARAM_KEY, QuantParam
|
|
27
|
+
from tico.utils.errors import NotYetSupportedError
|
|
28
|
+
from tico.utils.mx.dtypes import is_mx_dtype, normalize_mx_axis
|
|
29
|
+
from tico.utils.validate_args_kwargs import (
|
|
30
|
+
CatArgs,
|
|
31
|
+
PermuteArgs,
|
|
32
|
+
SliceArgs,
|
|
33
|
+
SplitWithSizesArgs,
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
_MX_BLOCK_SIZE = 32
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def _axis(qparam: QuantParam, rank: int) -> int:
|
|
41
|
+
if qparam.quantized_dimension is None:
|
|
42
|
+
raise ValueError("MX qparams require an explicit quantized dimension.")
|
|
43
|
+
return normalize_mx_axis(qparam.quantized_dimension, rank)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def _shape(node: torch.fx.Node, *, static: bool = False) -> tuple:
|
|
47
|
+
shape = getattr(node.meta.get("val"), "shape", None)
|
|
48
|
+
if shape is None:
|
|
49
|
+
raise NotYetSupportedError(
|
|
50
|
+
f"MX axis propagation requires tensor shape metadata for {node.name}."
|
|
51
|
+
)
|
|
52
|
+
shape = tuple(shape)
|
|
53
|
+
if static and any(type(size) is not int or size <= 0 for size in shape):
|
|
54
|
+
raise NotYetSupportedError(
|
|
55
|
+
"MX block-preserving layout changes require positive static dimensions; "
|
|
56
|
+
f"{node.name} has shape {shape}."
|
|
57
|
+
)
|
|
58
|
+
return shape
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def _unsupported(node: torch.fx.Node, reason: str) -> NotYetSupportedError:
|
|
62
|
+
return NotYetSupportedError(
|
|
63
|
+
f"Cannot preserve MX blocks through {node.name} ({node.target}): {reason}. "
|
|
64
|
+
"An explicit dequantize/requantize boundary is required."
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def _reshape_axis(
|
|
69
|
+
input_shape: tuple,
|
|
70
|
+
output_shape: tuple,
|
|
71
|
+
axis: int,
|
|
72
|
+
node: torch.fx.Node,
|
|
73
|
+
) -> int:
|
|
74
|
+
"""Find an output axis with exactly the same flat-index block partition.
|
|
75
|
+
|
|
76
|
+
The trailing-element stride fixes the spacing between block members. Axis
|
|
77
|
+
lengths may differ only when both reset at complete 32-element boundaries.
|
|
78
|
+
This permits splitting/merging heads with aligned head dimensions without
|
|
79
|
+
allowing an arbitrary reshape to regroup already quantized values.
|
|
80
|
+
"""
|
|
81
|
+
if math.prod(input_shape) != math.prod(output_shape):
|
|
82
|
+
raise _unsupported(node, "reshape changes the number of elements")
|
|
83
|
+
length = input_shape[axis]
|
|
84
|
+
stride = math.prod(input_shape[axis + 1 :])
|
|
85
|
+
for output_axis, output_length in enumerate(output_shape):
|
|
86
|
+
if math.prod(output_shape[output_axis + 1 :]) != stride:
|
|
87
|
+
continue
|
|
88
|
+
if length == output_length or (
|
|
89
|
+
length % _MX_BLOCK_SIZE == 0 and output_length % _MX_BLOCK_SIZE == 0
|
|
90
|
+
):
|
|
91
|
+
return output_axis
|
|
92
|
+
raise _unsupported(
|
|
93
|
+
node,
|
|
94
|
+
f"reshape {input_shape} -> {output_shape} changes the groups on axis {axis}",
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
def _check_slice(
|
|
99
|
+
node: torch.fx.Node, length: int, start: int, end: int, step: int
|
|
100
|
+
) -> None:
|
|
101
|
+
if (
|
|
102
|
+
step != 1
|
|
103
|
+
or start % _MX_BLOCK_SIZE != 0
|
|
104
|
+
or (end % _MX_BLOCK_SIZE != 0 and end != length)
|
|
105
|
+
):
|
|
106
|
+
raise _unsupported(
|
|
107
|
+
node,
|
|
108
|
+
f"slice [{start}:{end}:{step}] cuts or regroups an MX block",
|
|
109
|
+
)
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
def _cat_axis(qparam: QuantParam, node: torch.fx.Node, *, backward: bool) -> int:
|
|
113
|
+
args = CatArgs(*node.args, **node.kwargs) # type: ignore[arg-type]
|
|
114
|
+
output_shape = _shape(node, static=True)
|
|
115
|
+
axis = _axis(qparam, len(output_shape))
|
|
116
|
+
dim = normalize_mx_axis(args.dim, len(output_shape))
|
|
117
|
+
if not args.tensors:
|
|
118
|
+
raise _unsupported(node, "concatenation has no tensor inputs")
|
|
119
|
+
for index, source in enumerate(args.tensors):
|
|
120
|
+
shape = _shape(source, static=True)
|
|
121
|
+
if len(shape) != len(output_shape):
|
|
122
|
+
raise _unsupported(node, "concatenation input ranks differ")
|
|
123
|
+
if not backward:
|
|
124
|
+
source_qparam = source.meta.get(QPARAM_KEY)
|
|
125
|
+
if (
|
|
126
|
+
source_qparam is None
|
|
127
|
+
or source_qparam.dtype != qparam.dtype
|
|
128
|
+
or _axis(source_qparam, len(shape)) != axis
|
|
129
|
+
):
|
|
130
|
+
raise _unsupported(
|
|
131
|
+
node, "concatenation inputs use different MX domains"
|
|
132
|
+
)
|
|
133
|
+
if (
|
|
134
|
+
dim == axis
|
|
135
|
+
and index < len(args.tensors) - 1
|
|
136
|
+
and shape[axis] % _MX_BLOCK_SIZE != 0
|
|
137
|
+
):
|
|
138
|
+
raise _unsupported(node, "concatenation joins incomplete MX blocks")
|
|
139
|
+
return axis
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
def remap_mx_split_output(
|
|
143
|
+
qparam: QuantParam,
|
|
144
|
+
split: torch.fx.Node,
|
|
145
|
+
index: int,
|
|
146
|
+
) -> QuantParam | None:
|
|
147
|
+
"""Return one split output's MX domain, including an unused output slot."""
|
|
148
|
+
if not is_mx_dtype(qparam.dtype):
|
|
149
|
+
return None
|
|
150
|
+
if split.target != torch.ops.aten.split_with_sizes.default:
|
|
151
|
+
raise _unsupported(split, "only split_with_sizes outputs are supported")
|
|
152
|
+
args = SplitWithSizesArgs(*split.args, **split.kwargs) # type: ignore[arg-type]
|
|
153
|
+
shape = _shape(args.input, static=True)
|
|
154
|
+
axis = _axis(qparam, len(shape))
|
|
155
|
+
dim = normalize_mx_axis(args.dim, len(shape))
|
|
156
|
+
if any(type(size) is not int or size <= 0 for size in args.split_sizes):
|
|
157
|
+
raise _unsupported(split, "split requires positive static sizes")
|
|
158
|
+
sizes = cast(list[int], args.split_sizes)
|
|
159
|
+
if sum(sizes) != shape[dim]:
|
|
160
|
+
raise _unsupported(split, "split sizes do not cover its input dimension")
|
|
161
|
+
if type(index) is not int or not -len(sizes) <= index < len(sizes):
|
|
162
|
+
raise _unsupported(split, "split output index is invalid")
|
|
163
|
+
index %= len(sizes)
|
|
164
|
+
if dim == axis:
|
|
165
|
+
start = sum(sizes[:index])
|
|
166
|
+
_check_slice(split, shape[axis], start, start + sizes[index], 1)
|
|
167
|
+
result = copy.deepcopy(qparam)
|
|
168
|
+
result.quantized_dimension = axis
|
|
169
|
+
return result
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
def remap_mx_qparam(
|
|
173
|
+
qparam: QuantParam,
|
|
174
|
+
node: torch.fx.Node,
|
|
175
|
+
*,
|
|
176
|
+
backward: bool = False,
|
|
177
|
+
) -> QuantParam | None:
|
|
178
|
+
"""Copy MX metadata across a proven block-preserving layout operation.
|
|
179
|
+
|
|
180
|
+
``qparam`` belongs to the input in the forward direction, or to ``node``
|
|
181
|
+
in the backward direction. Affine qparams return ``None`` so callers retain
|
|
182
|
+
their existing affine policy. Unsupported MX transformations raise rather
|
|
183
|
+
than silently losing quantization or assigning a different block partition.
|
|
184
|
+
|
|
185
|
+
Split outputs are represented by their ``getitem`` nodes. Concatenation
|
|
186
|
+
requires matching input domains in the forward direction. The returned
|
|
187
|
+
metadata always uses a nonnegative tensor axis and never aliases the input.
|
|
188
|
+
"""
|
|
189
|
+
if not is_mx_dtype(qparam.dtype):
|
|
190
|
+
return None
|
|
191
|
+
|
|
192
|
+
if node.target == torch.ops.aten.cat.default:
|
|
193
|
+
axis = _cat_axis(qparam, node, backward=backward)
|
|
194
|
+
elif node.target == operator.getitem:
|
|
195
|
+
split = node.args[0]
|
|
196
|
+
if (
|
|
197
|
+
backward
|
|
198
|
+
or not isinstance(split, torch.fx.Node)
|
|
199
|
+
or split.target != torch.ops.aten.split_with_sizes.default
|
|
200
|
+
):
|
|
201
|
+
raise _unsupported(node, "only forward split outputs are supported")
|
|
202
|
+
index = node.args[1]
|
|
203
|
+
if not isinstance(index, int):
|
|
204
|
+
raise _unsupported(node, "split output index is invalid")
|
|
205
|
+
return remap_mx_split_output(qparam, split, index)
|
|
206
|
+
else:
|
|
207
|
+
source = node.args[0] if node.args else None
|
|
208
|
+
if not isinstance(source, torch.fx.Node):
|
|
209
|
+
raise _unsupported(node, "tensor input is unavailable")
|
|
210
|
+
input_shape = _shape(source)
|
|
211
|
+
output_shape = _shape(node)
|
|
212
|
+
shape = output_shape if backward else input_shape
|
|
213
|
+
axis = _axis(qparam, len(shape))
|
|
214
|
+
|
|
215
|
+
if node.target == torch.ops.aten.permute.default:
|
|
216
|
+
permute_args = PermuteArgs(*node.args, **node.kwargs) # type: ignore[arg-type]
|
|
217
|
+
rank = len(input_shape)
|
|
218
|
+
dims = [normalize_mx_axis(dim, rank) for dim in permute_args.dims]
|
|
219
|
+
if len(dims) != rank or len(set(dims)) != rank:
|
|
220
|
+
raise _unsupported(node, "permutation is not a bijection")
|
|
221
|
+
axis = dims[axis] if backward else dims.index(axis)
|
|
222
|
+
elif node.target == torch.ops.aten.reshape.default:
|
|
223
|
+
input_shape = _shape(source, static=True)
|
|
224
|
+
output_shape = _shape(node, static=True)
|
|
225
|
+
if backward:
|
|
226
|
+
input_shape, output_shape = output_shape, input_shape
|
|
227
|
+
axis = _reshape_axis(input_shape, output_shape, axis, node)
|
|
228
|
+
elif node.target == torch.ops.aten.slice.Tensor and not backward:
|
|
229
|
+
slice_args = SliceArgs(*node.args, **node.kwargs) # type: ignore[arg-type]
|
|
230
|
+
input_shape = _shape(source, static=True)
|
|
231
|
+
dim = normalize_mx_axis(slice_args.dim, len(input_shape))
|
|
232
|
+
if dim == axis:
|
|
233
|
+
start, end, step = slice(
|
|
234
|
+
slice_args.start, slice_args.end, slice_args.step
|
|
235
|
+
).indices(input_shape[axis])
|
|
236
|
+
_check_slice(node, input_shape[axis], start, end, step)
|
|
237
|
+
elif node.target == torch.ops.aten.expand.default and not backward:
|
|
238
|
+
input_shape = _shape(source, static=True)
|
|
239
|
+
output_shape = _shape(node, static=True)
|
|
240
|
+
offset = len(output_shape) - len(input_shape)
|
|
241
|
+
if offset < 0 or any(
|
|
242
|
+
size != 1 and size != output_shape[index + offset]
|
|
243
|
+
for index, size in enumerate(input_shape)
|
|
244
|
+
):
|
|
245
|
+
raise _unsupported(node, "expand is not a broadcast of its input")
|
|
246
|
+
# Expanding a singleton MX axis repeats the same value in each new
|
|
247
|
+
# block; its exponent and rounded value therefore remain unchanged.
|
|
248
|
+
axis += offset
|
|
249
|
+
elif node.target == torch.ops.aten.constant_pad_nd.default and not backward:
|
|
250
|
+
input_shape = _shape(source, static=True)
|
|
251
|
+
pads = node.args[1]
|
|
252
|
+
value = node.kwargs.get("value", node.args[2] if len(node.args) > 2 else 0)
|
|
253
|
+
if (
|
|
254
|
+
not isinstance(pads, (tuple, list))
|
|
255
|
+
or len(pads) % 2
|
|
256
|
+
or len(pads) > 2 * len(input_shape)
|
|
257
|
+
or any(type(pad) is not int or pad < 0 for pad in pads)
|
|
258
|
+
or value != 0
|
|
259
|
+
):
|
|
260
|
+
raise _unsupported(node, "only nonnegative zero padding is supported")
|
|
261
|
+
pads = cast(list[int], pads)
|
|
262
|
+
pair = len(input_shape) - 1 - axis
|
|
263
|
+
if pair < len(pads) // 2 and pads[2 * pair] % _MX_BLOCK_SIZE != 0:
|
|
264
|
+
raise _unsupported(node, "padding shifts the start of an MX block")
|
|
265
|
+
else:
|
|
266
|
+
raise _unsupported(node, "operation has no MX block-preservation rule")
|
|
267
|
+
|
|
268
|
+
result = copy.deepcopy(qparam)
|
|
269
|
+
result.quantized_dimension = axis
|
|
270
|
+
return result
|