Skip to content

Commit

Permalink
address cr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
guoyu-wang committed Feb 1, 2022
1 parent d460f5b commit 55e536c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2262,9 +2262,7 @@ class ResizeOpBuilder : public BaseOpBuilder {
};

/* static */ bool ResizeOpBuilder::IsQuantizedOp(const NodeUnit& node_unit) {
static bool is_quant_op_type =
GetQuantizedOpType(node_unit) == QuantizedOpType::QDQResize;
return is_quant_op_type;
return GetQuantizedOpType(node_unit) == QuantizedOpType::QDQResize;
}

void ResizeOpBuilder::AddInitializersToSkip(ModelBuilder& model_builder, const NodeUnit& node_unit) const {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1471,9 +1471,7 @@ class ResizeOpSupportChecker : public BaseOpSupportChecker {
};

/* static */ bool ResizeOpSupportChecker::IsQuantizedOp(const NodeUnit& node_unit) {
static bool is_quant_op_type =
GetQuantizedOpType(node_unit) == QuantizedOpType::QDQResize;
return is_quant_op_type;
return GetQuantizedOpType(node_unit) == QuantizedOpType::QDQResize;
}

bool ResizeOpSupportChecker::IsOpSupportedImpl(const InitializedTensorSet& initializers, const NodeUnit& node_unit,
Expand Down Expand Up @@ -1598,6 +1596,8 @@ bool ResizeOpSupportChecker::IsOpSupportedImpl(const InitializedTensorSet& initi

if (IsQuantizedOp(node_unit)) {
// For QDQResize, we only support uint8 output now
// TODO, add int8 support to NNAPI, and maybe move all the output type check into a virtual function
// similar to HasSupportedInputsImpl
int32_t output_type;
if (!GetType(node_unit.Outputs()[0].node_arg, output_type))
return false;
Expand Down

0 comments on commit 55e536c

Please sign in to comment.