message: Missing test case added for Conv2D
diff: @@ -930,6 +930,44 @@ TEST_F(OperatorTest, VersioningFullyConnectedTest) {
  EXPECT_EQ(op->GetVersion(int8_signature), 4);
  }
  +TEST_F(OperatorTest, VersioningConv2DTest) {
  + ConvOperator conv_op;
  + conv_op.inputs = {"input", "filter"};
  + conv_op.outputs = {"output"};
  + auto operator_by_type_map = BuildOperatorByTypeMap(false /*enable_flex_ops*/);
  + const BaseOperator* op = operator_by_type_map.at(conv_op.type).get();
  +
  + Model uint8_model;
  + Array& input_uint8_array = uint8_model.GetOrCreateArray(conv_op.inputs[0]);
  + input_uint8_array.data_type = ArrayDataType::kUint8;
  + Array& filter_uint8_array = uint8_model.GetOrCreateArray(conv_op.inputs[1]);
  + filter_uint8_array.data_type = ArrayDataType::kUint8;
  + Array& output_uint8_array = uint8_model.GetOrCreateArray(conv_op.outputs[0]);
  + output_uint8_array.data_type = ArrayDataType::kUint8;
  + OperatorSignature uint8_signature = {.op = &conv_op, .model = &uint8_model};
  + EXPECT_EQ(op->GetVersion(uint8_signature), 1);
  +
  + Model int8_model;
  + Array& input_int8_array = int8_model.GetOrCreateArray(conv_op.inputs[0]);
  + input_int8_array.data_type = ArrayDataType::kInt8;
  + Array& filter_int8_array = int8_model.GetOrCreateArray(conv_op.inputs[1]);
  + filter_int8_array.data_type = ArrayDataType::kInt8;
  + Array& output_int8_array = int8_model.GetOrCreateArray(conv_op.outputs[0]);
  + output_int8_array.data_type = ArrayDataType::kInt8;
  + OperatorSignature int8_signature = {.op = &conv_op, .model = &int8_model};
  + EXPECT_EQ(op->GetVersion(int8_signature), 3);
  +
  + Model float_model;
  + Array& input_float_array = float_model.GetOrCreateArray(conv_op.inputs[0]);
  + input_float_array.data_type = ArrayDataType::kFloat;
  + Array& filter_int8_array1 = float_model.GetOrCreateArray(conv_op.inputs[1]);
  + filter_int8_array1.data_type = ArrayDataType::kInt8;
  + Array& output_float_array = float_model.GetOrCreateArray(conv_op.outputs[0]);
  + output_float_array.data_type = ArrayDataType::kFloat;
  + OperatorSignature float_signature = {.op = &conv_op, .model = &float_model};
  + EXPECT_EQ(op->GetVersion(float_signature), 2);
  +}
  +
  } // namespace
  } // namespace tflite
  