Browse Source

!701 add dt_variant type.

From: @yangyongqiang5033
Reviewed-by: @xchu42,@ji_chen
Signed-off-by: @ji_chen
tags/v1.2.0
mindspore-ci-bot Gitee 3 years ago
parent
commit
de36ef764a
12 changed files with 12 additions and 3 deletions
  1. +1
    -0
      ge/client/proto/ge_ir.proto
  2. +1
    -0
      ge/common/ge/datatype_util.cc
  3. +1
    -0
      ge/common/proto/ge_ir.proto
  4. +1
    -0
      ge/executor/proto/dump_task.proto
  5. +1
    -0
      ge/executor/proto/ge_ir.proto
  6. +1
    -0
      ge/graph/load/new_model_manager/data_dumper.cc
  7. +1
    -0
      ge/offline/proto/ge_ir.proto
  8. +1
    -0
      ge/proto/dump_task.proto
  9. +1
    -0
      ge/proto/ge_ir.proto
  10. +1
    -1
      metadef
  11. +1
    -1
      parser
  12. +1
    -1
      tests/ut/ge/common/format_transfer_unittest.cc

+ 1
- 0
ge/client/proto/ge_ir.proto View File

@@ -30,6 +30,7 @@ enum DataType
DT_RESOURCE = 23; // resource type
DT_STRING_REF = 24; // string_ref type
DT_DUAL = 25; /**< dual output type */
DT_VARIANT = 26; // variant type
}

message AttrDef


+ 1
- 0
ge/common/ge/datatype_util.cc View File

@@ -62,6 +62,7 @@ std::map<ge::DataType, ge::proto::DataType> g_dump_data_type_map = {
{ge::DT_RESOURCE, ge::proto::DT_RESOURCE},
{ge::DT_STRING_REF, ge::proto::DT_STRING_REF},
{ge::DT_STRING, ge::proto::DT_STRING},
{ge::DT_VARIANT, ge::proto::DT_VARIANT},
};
} // namespace



+ 1
- 0
ge/common/proto/ge_ir.proto View File

@@ -30,6 +30,7 @@ enum DataType
DT_RESOURCE = 23; // resource type
DT_STRING_REF = 24; // string_ref type
DT_DUAL = 25; /**< dual output type */
DT_VARIANT = 26; // variant type
}

message AttrDef


+ 1
- 0
ge/executor/proto/dump_task.proto View File

@@ -28,6 +28,7 @@ enum OutputDataType {
DT_RESOURCE = 23;
DT_STRING_REF = 24;
DT_DUAL = 25;
DT_VARIANT = 26;
}

enum OutputFormat {


+ 1
- 0
ge/executor/proto/ge_ir.proto View File

@@ -30,6 +30,7 @@ enum DataType
DT_RESOURCE = 23; // resource type
DT_STRING_REF = 24; // string_ref type
DT_DUAL = 25; /**< dual output type */
DT_VARIANT = 26; // variant type
}

message AttrDef


+ 1
- 0
ge/graph/load/new_model_manager/data_dumper.cc View File

@@ -120,6 +120,7 @@ static int32_t GetIrDataType(ge::DataType data_type) {
{ge::DT_RESOURCE, ge::proto::DT_RESOURCE},
{ge::DT_STRING_REF, ge::proto::DT_STRING_REF},
{ge::DT_STRING, ge::proto::DT_STRING},
{ge::DT_VARIANT, ge::proto::DT_VARIANT},
};

auto iter = data_type_map.find(data_type);


+ 1
- 0
ge/offline/proto/ge_ir.proto View File

@@ -30,6 +30,7 @@ enum DataType
DT_RESOURCE = 23; // resource type
DT_STRING_REF = 24; // string_ref type
DT_DUAL = 25; /**< dual output type */
DT_VARIANT = 26; // variant type
}

message AttrDef


+ 1
- 0
ge/proto/dump_task.proto View File

@@ -28,6 +28,7 @@ enum OutputDataType {
DT_RESOURCE = 23;
DT_STRING_REF = 24;
DT_DUAL = 25;
DT_VARIANT = 26;
}

enum OutputFormat {


+ 1
- 0
ge/proto/ge_ir.proto View File

@@ -30,6 +30,7 @@ enum DataType
DT_RESOURCE = 23; // resource type
DT_STRING_REF = 24; // string_ref type
DT_DUAL = 25; /**< dual output type */
DT_VARIANT = 26; // variant type
}

message AttrDef


+ 1
- 1
metadef

@@ -1 +1 @@
Subproject commit 8c89c521f5d682327b2f975cf06f7093960eb2f0
Subproject commit c14d2be38171eed63416e71178774103faf1f5cd

+ 1
- 1
parser

@@ -1 +1 @@
Subproject commit 54ec7731e3a2951191693e02ff3165220975ed0c
Subproject commit 34559943b6cb645042a87d99bc88ead016b15b64

+ 1
- 1
tests/ut/ge/common/format_transfer_unittest.cc View File

@@ -79,7 +79,7 @@ TEST_F(UtestFormatTransfer, get_size_by_data_type) {
EXPECT_EQ(GetSizeByDataType(DT_STRING_REF), -1);
EXPECT_EQ(GetSizeByDataType(DT_DUAL), 5);
EXPECT_EQ(GetSizeByDataType(DT_UNDEFINED), -1);
EXPECT_EQ(DT_UNDEFINED, 26);
EXPECT_EQ(DT_UNDEFINED, 27);
}
} // namespace formats
} // namespace ge

Loading…
Cancel
Save