diff --git a/mindspore/core/ops/equal.cc b/mindspore/core/ops/equal.cc index 2c36270df6c..8cc3712fa01 100644 --- a/mindspore/core/ops/equal.cc +++ b/mindspore/core/ops/equal.cc @@ -56,7 +56,8 @@ TypePtr InferType(const PrimitivePtr &prim, const std::vector & AbstractBasePtr EqualInfer(const abstract::AnalysisEnginePtr &, const PrimitivePtr &primitive, const std::vector &input_args) { - return abstract::MakeAbstract(InferShape(primitive, input_args), InferType(primitive, input_args)); + (void)InferType(primitive, input_args); + return abstract::MakeAbstract(InferShape(primitive, input_args), kBool); } REGISTER_PRIMITIVE_C(kNameEqual, Equal); } // namespace ops diff --git a/mindspore/core/ops/not_equal.cc b/mindspore/core/ops/not_equal.cc index da906079ba2..9b49ce7c746 100644 --- a/mindspore/core/ops/not_equal.cc +++ b/mindspore/core/ops/not_equal.cc @@ -53,7 +53,8 @@ TypePtr InferType(const PrimitivePtr &prim, const std::vector & AbstractBasePtr NotEqualInfer(const abstract::AnalysisEnginePtr &, const PrimitivePtr &primitive, const std::vector &input_args) { - return abstract::MakeAbstract(InferShape(primitive, input_args), InferType(primitive, input_args)); + (void)InferType(primitive, input_args); + return abstract::MakeAbstract(InferShape(primitive, input_args), kBool); } REGISTER_PRIMITIVE_C(kNameNotEqual, NotEqual); } // namespace ops