Skip to content

Commit

Permalink
Revert REDUCE_PROD to version 1
Browse files Browse the repository at this point in the history
  • Loading branch information
tomsmeding committed Jun 30, 2023
1 parent fdfc646 commit af91592
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion tensorflow/lite/kernels/register.cc
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ BuiltinOpResolver::BuiltinOpResolver() {
/* max_version = */ 2);
AddBuiltin(BuiltinOperator_REDUCE_PROD, Register_REDUCE_PROD(),
/* min_version = */ 1,
/* max_version = */ 2);
/* max_version = */ 1);
AddBuiltin(BuiltinOperator_REDUCE_MAX, Register_REDUCE_MAX(),
/* min_version = */ 1,
/* max_version = */ 3);
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/lite/kernels/register_ref.cc
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ BuiltinRefOpResolver::BuiltinRefOpResolver() {
/* max_version = */ 2);
AddBuiltin(BuiltinOperator_REDUCE_PROD, Register_REDUCE_PROD_REF(),
/* min_version = */ 1,
/* max_version = */ 2);
/* max_version = */ 1);
AddBuiltin(BuiltinOperator_REDUCE_MAX, Register_REDUCE_MAX_REF(),
/* min_version = */ 1,
/* max_version = */ 3);
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/lite/tools/optimize/operator_property.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1096,7 +1096,7 @@ OperatorProperty GetOperatorProperty(OpVariant op_variant) {
case BuiltinOperator_REDUCE_PROD:
property.inputs = {{0, {}}};
property.outputs = {{0, {}}};
property.version = 2;
property.version = 1;
break;
case BuiltinOperator_REDUCE_MAX:
case BuiltinOperator_REDUCE_MIN:
Expand Down
8 changes: 4 additions & 4 deletions tensorflow/lite/tools/versioning/op_version.cc
Original file line number Diff line number Diff line change
Expand Up @@ -805,10 +805,10 @@ int GetBuiltinOperatorVersion(const OpSignature& op_sig) {
return 1;

case BuiltinOperator_REDUCE_PROD:
if (op_sig.inputs.at(0).type == kTfLiteInt8 ||
op_sig.inputs.at(0).type == kTfLiteInt16) {
return 2;
}
// if (op_sig.inputs.at(0).type == kTfLiteInt8 ||
// op_sig.inputs.at(0).type == kTfLiteInt16) {
// return 2;
// }
return 1;

// The version one of broadcast to op won't be not supported since the
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/lite/tools/versioning/runtime_version.cc
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ std::string FindMinimumRuntimeVersionForOp(tflite::BuiltinOperator op_code,
{{BuiltinOperator_REDUCE_MIN, 2}, "1.14.0"},
{{BuiltinOperator_REDUCE_MIN, 3}, "2.5.0"},
{{BuiltinOperator_REDUCE_PROD, 1}, "1.11.0"},
{{BuiltinOperator_REDUCE_PROD, 2}, "2.6.0"},
// {{BuiltinOperator_REDUCE_PROD, 2}, "2.6.0"},
{{BuiltinOperator_REDUCE_ANY, 1}, "1.11.0"},
{{BuiltinOperator_RELU6, 1}, "1.5.0"},
{{BuiltinOperator_RELU6, 2}, "1.14.0"},
Expand Down

0 comments on commit af91592

Please sign in to comment.