-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[Relay] Improved multiply_rewrite
for gluoncv_ssd quantization
#2848
Conversation
@@ -166,7 +166,7 @@ def multiply_rewrite(ref_call, new_args, ctx): | |||
|
|||
if lhs_kind is None and rhs_kind is None: | |||
return None | |||
if lhs_kind == QAnnotateKind.ACTIVATION and rhs_kind is None: | |||
if lhs_kind in [QAnnotateKind.ACTIVATION, QAnnotateKind.INPUT] and rhs_kind is None: |
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.
add a check to attach_simulated_quantize
below to prevent quantizing lhs to INPUT if lhs_kind is INPUT
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.
I'm not quite familiar with this, but what shall lhs_expr
be if lhs_kind
is INPUT?
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.
it is the same from input, new_args[0]
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.
okay, i will revise accordingly.
…lhs to INPUT if lhs_kind is INPUT;
multiply_rewrite
for gluoncv_ssd quantizationmultiply_rewrite
for gluoncv_ssd quantization
…che#2848) * improved `multiply_rewrite` for gluoncv_ssd quantization * add a check to attach_simulated_quantize below to prevent quantizing lhs to INPUT if lhs_kind is INPUT;
…che#2848) * improved `multiply_rewrite` for gluoncv_ssd quantization * add a check to attach_simulated_quantize below to prevent quantizing lhs to INPUT if lhs_kind is INPUT;
…che#2848) * improved `multiply_rewrite` for gluoncv_ssd quantization * add a check to attach_simulated_quantize below to prevent quantizing lhs to INPUT if lhs_kind is INPUT;
@ZihengJiang @vinx13 please review.