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

Adding the missing quantized-type support in the ODS #1608

Merged
merged 2 commits into from
Jun 29, 2023

Conversation

sdasgup3
Copy link
Member

@sdasgup3 sdasgup3 commented Jun 9, 2023

Some of the stablehlo ops does not have support for quantized types in their tablegen specification, prohibits writing StableHLO quantized programs using those ops. The PR is about adding the missing support for the following ops. Also, I believe the ongoing specification work, should not deviate much from the proposed changes here.

stablehlo.atan2
stablehlo.divide
stablehlo.power
stablehlo.remainder
stablehlo.subtract

stablehlo.abs
stablehlo.cbrt
stablehlo.cosine
stablehlo.exponential
stablehlo.exponential_minus_one
stablehlo.log
stablehlo.log_plus_one
stablehlo.logistic
stablehlo.negate
stablehlo.rsqrt
stablehlo.sign
stablehlo.sine
stablehlo.sqrt
stablehlo.tanh

stablehlo.cholesky
stablehlo.triangular_solve

Other than these ops, we have fft, rng, and rng_bit_generator (or something else which I might be missing) which could be potential candidates for the support. I propose that we add the support after adding the specification of those op as adding the support might need some non-trivial discussion.

@sdasgup3 sdasgup3 added the Spec label Jun 9, 2023
@sdasgup3 sdasgup3 requested a review from burmako June 9, 2023 18:21
@burmako burmako changed the title Adding the missing quantized-type support in the tablegen specification for some ops Adding the missing quantized-type support in the ODS Jun 9, 2023
@GleasonK
Copy link
Member

This may need some VHLO changes to preserve forward compatibility. Will take a closer look shortly.

stablehlo/tests/ops_stablehlo.mlir Outdated Show resolved Hide resolved
stablehlo/dialect/Base.td Show resolved Hide resolved
@burmako burmako assigned GleasonK and unassigned burmako Jun 15, 2023
@GleasonK
Copy link
Member

Per #1652, quantization is an unspecced feature and therefore there are no compatibility guarantees regarding changes to these features. Good to proceed.

@sdasgup3 sdasgup3 merged commit 1e33939 into openxla:main Jun 29, 2023
@burmako burmako added the Migrate to MHLO PR that needs to be migrated to MLIR-HLO label Jul 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Migrate to MHLO PR that needs to be migrated to MLIR-HLO Spec
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants