stablehlo-legalize-quant-to-intcs has been used for decomposing quantized stablehlo programs for purposes like interpretation XLA compilation.
However, the pass has partial support for a selected ops (add, dot_general, dot, convolution, max. min) to decomposed their quantized versions to integer math.
However, the following valid program errors out with error: stablehlo.maximum with different quantization parameters for operands and results is not supported.: An unsupported feature of the pass.
However, the fact that stablehlo-legalize-quant-to-int errors out for certain scenarios prohibits the use of stablehlo-legalize-quantized-op-to-qdq as a fallback.
The goal of this issue is to enhance the stablehlo-legalize-quant-to-int pass to gracefully handle scenarios where it cannot directly decompose quantized operations. In such cases, it should allow the stablehlo-legalize-quantized-op-to-qdq pass to be used as a fallback to ensure the overall transformation pipeline continues without errors.
stablehlo-legalize-quant-to-int
cs has been used for decomposing quantized stablehlo programs for purposes like interpretation XLA compilation.However, the pass has partial support for a selected ops (
add, dot_general, dot, convolution, max. min
) to decomposed their quantized versions to integer math.For example, the following is supported
However, the following valid program errors out with
error: stablehlo.maximum with different quantization parameters for operands and results is not supported.
: An unsupported feature of the pass.Moreover, we have a pass
stablehlo-legalize-quantized-op-to-qdq
which can be ideally be used as a fallback convertng the above toHowever, the fact that
stablehlo-legalize-quant-to-int
errors out for certain scenarios prohibits the use ofstablehlo-legalize-quantized-op-to-qdq
as a fallback.The goal of this issue is to enhance the
stablehlo-legalize-quant-to-int
pass to gracefully handle scenarios where it cannot directly decompose quantized operations. In such cases, it should allow thestablehlo-legalize-quantized-op-to-qdq
pass to be used as a fallback to ensure the overall transformation pipeline continues without errors.