diff --git a/onnxruntime/core/providers/nnapi/nnapi_builtin/builders/op_builder.cc b/onnxruntime/core/providers/nnapi/nnapi_builtin/builders/op_builder.cc index 65c593810c27b..e29c3c6401a38 100644 --- a/onnxruntime/core/providers/nnapi/nnapi_builtin/builders/op_builder.cc +++ b/onnxruntime/core/providers/nnapi/nnapi_builtin/builders/op_builder.cc @@ -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 { diff --git a/onnxruntime/core/providers/nnapi/nnapi_builtin/builders/op_support_checker.cc b/onnxruntime/core/providers/nnapi/nnapi_builtin/builders/op_support_checker.cc index 7c4329fc3c3dd..a8b299e6d1ba8 100644 --- a/onnxruntime/core/providers/nnapi/nnapi_builtin/builders/op_support_checker.cc +++ b/onnxruntime/core/providers/nnapi/nnapi_builtin/builders/op_support_checker.cc @@ -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, @@ -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;