Skip to content

Commit

Permalink
minor update
Browse files Browse the repository at this point in the history
  • Loading branch information
guoyu-wang committed Feb 3, 2022
1 parent 7196cdf commit 7849f07
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ bool HasValidUnaryOpQuantizedInputs(const NodeUnit& node_unit) {
return true;
}

bool HasValidBinaryOpQuantizedInputs(const NodeUnit& node_unit) {
bool HasValidBinaryOpQuantizedInputTypes(const NodeUnit& node_unit) {
auto quant_op_type = GetQuantizedOpType(node_unit);
int32_t a_input_type, b_input_type;
if (!IsQuantizedBinaryOp(quant_op_type)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ bool IsQuantizedBinaryOp(QuantizedOpType quant_op_type);
// Check if a qlinear unary op has valid inputs, Qlinear[Sigmoid/AveragePool]
bool HasValidUnaryOpQuantizedInputs(const NodeUnit& node_unit);
// Check if a qlinear binary op has valid inputs, Qlinear[Conv/MatMul/Add]
bool HasValidBinaryOpQuantizedInputs(const NodeUnit& node_unit);
bool HasValidBinaryOpQuantizedInputTypes(const NodeUnit& node_unit);

// Check if the given quantized input(s) or output(s) is supported
bool IsQuantizedIOSupported(const InitializedTensorSet& initializers, const NodeUnit& node_unit,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ bool BinaryOpSupportChecker::HasSupportedInputOutputsImpl(const NodeUnit& node_u

if (is_qlinear_add) {
// QLinearAdd
if (!HasValidBinaryOpQuantizedInputs(node_unit))
if (!HasValidBinaryOpQuantizedInputTypes(node_unit))
return false;
}

Expand Down Expand Up @@ -751,7 +751,7 @@ bool ConvOpSupportChecker::HasSupportedInputOutputsImpl(const NodeUnit& node_uni
return BaseOpSupportChecker::HasSupportedInputOutputsImpl(node_unit);

// QLinearConv only supports input of uint8 for now
if (!HasValidBinaryOpQuantizedInputs(node_unit))
if (!HasValidBinaryOpQuantizedInputTypes(node_unit))
return false;

return true;
Expand Down Expand Up @@ -925,7 +925,7 @@ bool GemmOpSupportChecker::HasSupportedInputOutputsImpl(const NodeUnit& node_uni
return BaseOpSupportChecker::HasSupportedInputOutputsImpl(node_unit);

// QLinearMatMul
if (!HasValidBinaryOpQuantizedInputs(node_unit))
if (!HasValidBinaryOpQuantizedInputTypes(node_unit))
return false;

return true;
Expand Down

0 comments on commit 7849f07

Please sign in to comment.