Skip to content
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

Adds implementation for folding stablehlo.constant->stablehlo.transpose patterns. #63394

Merged
merged 1 commit into from
Mar 12, 2024

Conversation

copybara-service[bot]
Copy link

Adds implementation for folding stablehlo.constant->stablehlo.transpose patterns.

Introduces a new pattern FoldConstantTransposePass that folds constants followed by a transpose op.
This is required to correctly compose quantized TFLite ops legalized from quantized stablehlo graphs where weights have stablehlo.constant->stablehlo.transpose patterns.
Since this should be handled early on before quantization, this pass is added to the pre-calibration component.

…spose` patterns.

Introduces a new pattern `FoldConstantTransposePass` that folds constants followed by a transpose op.
This is required to correctly compose quantized TFLite ops legalized from quantized stablehlo graphs where weights have `stablehlo.constant`->`stablehlo.transpose` patterns.
Since this should be handled early on before quantization, this pass is added to the pre-calibration component.

PiperOrigin-RevId: 614943176
@copybara-service copybara-service bot merged commit 45a424a into master Mar 12, 2024
1 check passed
@copybara-service copybara-service bot deleted the test_614567418 branch March 12, 2024 08:06
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.

None yet

1 participant