这是indexloc提供的服务,不要输入任何密码
Skip to content

Add quantization utility functions for PropagateQSVPass. #97470

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

copybara-service[bot]
Copy link

@copybara-service copybara-service bot commented Jul 23, 2025

Add quantization utility functions for PropagateQSVPass.

This change introduces several helper functions to be used in the upcoming PropagateQSVPass. These functions provide core utilities for inspecting and manipulating quantization operations in the MLIR graph.

The new functions include:

  • IsProducedByDQ: Checks if a value is the result of a DequantizeOp.
  • IsDefiningQ: Checks if a value's only use is a QuantizeOp.
  • InsertQDQ: Inserts a QuantizeOp/DequantizeOp pair for a given value.

These helpers are essential for the logic in PropagateQSVPass, which will handle the propagation of quantization parameters.

This change introduces several helper functions to be used in the upcoming `PropagateQSVPass`. These functions provide core utilities for inspecting and manipulating quantization operations in the MLIR graph.

The new functions include:
- `IsProducedByDQ`: Checks if a value is the result of a `DequantizeOp`.
- `IsDefiningQ`: Checks if a value's only use is a `QuantizeOp`.
- `InsertQDQ`: Inserts a `QuantizeOp`/`DequantizeOp` pair for a given value.

These helpers are essential for the logic in `PropagateQSVPass`, which will handle the propagation of quantization parameters.

PiperOrigin-RevId: 786055947
@copybara-service copybara-service bot force-pushed the exported_pr_786055947 branch from 29b6b0b to 963dd03 Compare July 24, 2025 21:40
@copybara-service copybara-service bot changed the title Add helpers needed for PropagateQSVPass Add quantization utility functions for PropagateQSVPass. Jul 24, 2025
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