Created
June 11, 2019 22:31
-
-
Save ajtulloch/8a2d68deec59045d471b3debdf5aeefc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/relay/pass/quantize.cc b/src/relay/pass/quantize.cc | |
index 3a2e54c8..4059dc3a 100644 | |
--- a/src/relay/pass/quantize.cc | |
+++ b/src/relay/pass/quantize.cc | |
@@ -340,18 +340,9 @@ Expr MulRealize(const Call& ref_call, | |
const auto* rhs = new_args[1].as<QRealizeIntExprNode>(); | |
Expr ldata = lhs->data; | |
Expr rdata = rhs->data; | |
- | |
DataType dtype = cfg->dtype_activation; | |
- if (lhs->dtype == Float(32)) { | |
- ldata = Cast(ldata, dtype); | |
- } else { | |
- CHECK_EQ(lhs->dtype, dtype); | |
- } | |
- if (rhs->dtype == Float(32)) { | |
- rdata = Cast(rdata, dtype); | |
- } else { | |
- CHECK_EQ(rhs->dtype, dtype); | |
- } | |
+ ldata = Cast(ldata, dtype); | |
+ rdata = Cast(rdata, dtype); | |
Expr ret = ForwardOp(ref_call, {ldata, rdata}); | |
Expr dom_scale = FoldConstant(Multiply(lhs->dom_scale, rhs->dom_scale)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment