-
Notifications
You must be signed in to change notification settings - Fork 116
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
Quantization Verifiers based on T2x set of Traits #2041
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few initial comments. Will add more related to per-op changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some of the unhandled cases:
-
compare op
: Per the spec it usesbaseline_element_type(lhs) = baseline_element_type(rhs)
. However, this check is implemented asstablehlo/stablehlo/dialect/StablehloOps.td
Line 1534 in 70db15a
SameOperandsElementType /*compare_c1*/, HLO_CompatibleOperandsElementType
equivant to
SameOperandsElementType
but work with baseline_element_types. -
triangular_solve
: UseHLO_CompatibleOperandsAndResultElementType
instead
ofSameOperandsAndResultElementType
. -
batch_norm_grad
,batch_norm_training
, andbatch_norm_inference
: The
verifier usesAllElementTypesMatch
whereas the spec wants the operand to
matgch using baseline type. Can we introduceHLO_AllElementTypesCompatible
. -
collective_broadcast
,collective_permute
: They are currently using
HLO_CompatibleOperandsAndResultType
, but per the spec the type checks should
be implemented usingSameOperandsAndResultType
-
reshape
: Currently usesHLO_CompatibleOperandsAndResultType
but per the
spec needs stricter type checks usingSameOperandsAndResultType
.
Thanks again for the review. |
ffd0da2
to
f731558
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few test recommendations to ensure this is all working as expected.
isCompatibleElementTypeForHloTypeInference
stricter to return error for {not Quantize, Quantize}, {per-axis Quantized, per-tensor Quantized} casesAddOp
VHLO Test failures : addressed test failures because {not Quantize, Quantize} is not allowedCholeskyOp
andClampOp
to match it with the specNote: This PR is based on in review PR #2007Follow up PR will add/update OP verifiers for OPs which need special handling