Skip to content

feat: support ignore_op_types and ignore_op_names in static quantization - #50

Open
oscar1229 wants to merge 1 commit into
spacemit-com:mainfrom
oscar1229:feat/support-ignore-op-in-static-quantization
Open

oscar1229 wants to merge 1 commit into
spacemit-com:mainfrom
oscar1229:feat/support-ignore-op-in-static-quantization

Conversation

@oscar1229

Copy link
Copy Markdown
Contributor

Add support for skipping specific operator types and names during static quantization (precision_level: 2). Previously these parameters only worked for FP16 and dynamic quantization.

Changes:

  • Read ignore_op_types and ignore_op_names from xslim_setting
  • Skip quantization for operators matching these filters
  • Set filtered operators to FP32 platform

Example usage:

  • "quantization_parameters": {
    "ignore_op_types": ["Clip"]
    }

This allows users to keep certain operators (like Clip) in FP32 precision when they cause quantization accuracy issues or hardware compatibility problems.

Add support for skipping specific operator types and names during static
quantization (precision_level: 2). Previously these parameters only worked
for FP16 and dynamic quantization.

Changes:
- Read ignore_op_types and ignore_op_names from xslim_setting
- Skip quantization for operators matching these filters
- Set filtered operators to FP32 platform

Example usage:
- Config: "ignore_op_types": ["Clip"]
- CLI: --ignore_op_types Clip

This allows users to keep certain operators (like Clip) in FP32 precision
when they cause quantization accuracy issues or hardware compatibility problems.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant