openxla / stablehlo

Backward compatible ML compute opset inspired by HLO/MHLO
Apache License 2.0
357 stars 100 forks source link

Add verifier for missing constraint for UniformQuantize Op #2386

Closed sdasgup3 closed 4 weeks ago

sdasgup3 commented 4 weeks ago

Here is the constraint this PR is adding verifier for

(C2) expressed_type(result) = is_float(operand) ? element_type(operand) : expressed_type(operand).

link

Note: Per the guidelines (P3) Maintain verification code in verifiers and shape functions , we are adding the logic in the verifier (not in the type inference) as the element type for this op cannot be inferred.