@@ -31,6 +31,8 @@ enum DataType | |||||
DT_STRING_REF = 24; // string_ref type | DT_STRING_REF = 24; // string_ref type | ||||
DT_DUAL = 25; /**< dual output type */ | DT_DUAL = 25; /**< dual output type */ | ||||
DT_VARIANT = 26; // variant type | DT_VARIANT = 26; // variant type | ||||
DT_BF16 = 27; // bf16 type | |||||
DT_INT4 = 28; // int4 type | |||||
} | } | ||||
message AttrDef | message AttrDef | ||||
@@ -31,6 +31,8 @@ enum DataType | |||||
DT_STRING_REF = 24; // string_ref type | DT_STRING_REF = 24; // string_ref type | ||||
DT_DUAL = 25; /**< dual output type */ | DT_DUAL = 25; /**< dual output type */ | ||||
DT_VARIANT = 26; // variant type | DT_VARIANT = 26; // variant type | ||||
DT_BF16 = 27; // bf16 type | |||||
DT_INT4 = 28; // int4 type | |||||
} | } | ||||
message AttrDef | message AttrDef | ||||
@@ -31,6 +31,8 @@ enum DataType | |||||
DT_STRING_REF = 24; // string_ref type | DT_STRING_REF = 24; // string_ref type | ||||
DT_DUAL = 25; /**< dual output type */ | DT_DUAL = 25; /**< dual output type */ | ||||
DT_VARIANT = 26; // variant type | DT_VARIANT = 26; // variant type | ||||
DT_BF16 = 27; // bf16 type | |||||
DT_INT4 = 28; // int4 type | |||||
} | } | ||||
message AttrDef | message AttrDef | ||||
@@ -31,6 +31,8 @@ enum DataType | |||||
DT_STRING_REF = 24; // string_ref type | DT_STRING_REF = 24; // string_ref type | ||||
DT_DUAL = 25; /**< dual output type */ | DT_DUAL = 25; /**< dual output type */ | ||||
DT_VARIANT = 26; // variant type | DT_VARIANT = 26; // variant type | ||||
DT_BF16 = 27; // bf16 type | |||||
DT_INT4 = 28; // int4 type | |||||
} | } | ||||
message AttrDef | message AttrDef | ||||
@@ -31,6 +31,8 @@ enum DataType | |||||
DT_STRING_REF = 24; // string_ref type | DT_STRING_REF = 24; // string_ref type | ||||
DT_DUAL = 25; /**< dual output type */ | DT_DUAL = 25; /**< dual output type */ | ||||
DT_VARIANT = 26; // variant type | DT_VARIANT = 26; // variant type | ||||
DT_BF16 = 27; // bf16 type | |||||
DT_INT4 = 28; // int4 type | |||||
} | } | ||||
message AttrDef | message AttrDef | ||||
@@ -1 +1 @@ | |||||
Subproject commit fcebf37d7428caf4e0bd6e6c3a4f8143f6eac8b7 | |||||
Subproject commit 72bcde72074856e6cb1e8ba19df43b358bdb0160 |
@@ -1 +1 @@ | |||||
Subproject commit 424ac0609fe17f455865436462a2c62f85aea2b1 | |||||
Subproject commit 88c66a63b382bb54b338859e44b6321da979b22e |
@@ -51,35 +51,5 @@ TEST_F(UtestFormatTransfer, build_unsupported_transfer) { | |||||
auto transfer2 = BuildFormatTransfer(args2); | auto transfer2 = BuildFormatTransfer(args2); | ||||
EXPECT_EQ(transfer2, nullptr); | EXPECT_EQ(transfer2, nullptr); | ||||
} | } | ||||
TEST_F(UtestFormatTransfer, get_size_by_data_type) { | |||||
EXPECT_EQ(GetSizeByDataType(DT_FLOAT), 4); | |||||
EXPECT_EQ(GetSizeByDataType(DT_FLOAT16), 2); | |||||
EXPECT_EQ(GetSizeByDataType(DT_INT8), 1); | |||||
EXPECT_EQ(GetSizeByDataType(DT_INT16), 2); | |||||
EXPECT_EQ(GetSizeByDataType(DT_UINT16), 2); | |||||
EXPECT_EQ(GetSizeByDataType(DT_UINT8), 1); | |||||
EXPECT_EQ(GetSizeByDataType(DT_INT32), 4); | |||||
EXPECT_EQ(GetSizeByDataType(DT_INT64), 8); | |||||
EXPECT_EQ(GetSizeByDataType(DT_UINT32), 4); | |||||
EXPECT_EQ(GetSizeByDataType(DT_UINT64), 8); | |||||
EXPECT_EQ(GetSizeByDataType(DT_BOOL), 1); | |||||
EXPECT_EQ(GetSizeByDataType(DT_DOUBLE), 8); | |||||
EXPECT_EQ(GetSizeByDataType(DT_STRING), -1); | |||||
EXPECT_EQ(GetSizeByDataType(DT_DUAL_SUB_INT8), 1); | |||||
EXPECT_EQ(GetSizeByDataType(DT_DUAL_SUB_UINT8), 1); | |||||
EXPECT_EQ(GetSizeByDataType(DT_COMPLEX64), 8); | |||||
EXPECT_EQ(GetSizeByDataType(DT_COMPLEX128), 16); | |||||
EXPECT_EQ(GetSizeByDataType(DT_QINT8), 1); | |||||
EXPECT_EQ(GetSizeByDataType(DT_QINT16), 2); | |||||
EXPECT_EQ(GetSizeByDataType(DT_QINT32), 4); | |||||
EXPECT_EQ(GetSizeByDataType(DT_QUINT8), 1); | |||||
EXPECT_EQ(GetSizeByDataType(DT_QUINT16), 2); | |||||
EXPECT_EQ(GetSizeByDataType(DT_RESOURCE), 8); | |||||
EXPECT_EQ(GetSizeByDataType(DT_STRING_REF), -1); | |||||
EXPECT_EQ(GetSizeByDataType(DT_DUAL), 5); | |||||
EXPECT_EQ(GetSizeByDataType(DT_UNDEFINED), -1); | |||||
EXPECT_EQ(DT_UNDEFINED, 28); | |||||
} | |||||
} // namespace formats | } // namespace formats | ||||
} // namespace ge | } // namespace ge |