From 1cd413e687b8b7cc2466e0b2e87266899b331657 Mon Sep 17 00:00:00 2001 From: lichun Date: Tue, 8 Jun 2021 11:40:01 +0800 Subject: [PATCH] add complex64 support, add data_type support and fix release error in aclgrphGenerateForOp --- ge/offline/single_op_parser.cc | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/ge/offline/single_op_parser.cc b/ge/offline/single_op_parser.cc index 94d4d579..38ac5a39 100644 --- a/ge/offline/single_op_parser.cc +++ b/ge/offline/single_op_parser.cc @@ -203,16 +203,11 @@ void SetAttrValue(const Json &j, SingleOpAttr &attr) { // when attr type is "data_type", we support two kinds of attr value. // 1. value: "DT_FLOAT", "DT_INT32", "DT_INT8" ... // 2. value: 1, 3 ... - if (j.at(kKeyType).get() == "data_type") { - if (AttrValueIsString(j, kKeyValue)) { - string type_str = j.at(kKeyValue).get(); - DataType dtype = GetValue(kDataTypeStringToEnum, type_str, DT_UNDEFINED); - attr.value.SetValue(dtype); - return; - } else { - attr.value.SetValue(j.at(kKeyValue).get()); - return; - } + if (j.at(kKeyType).get() == "data_type" && AttrValueIsString(j, kKeyValue)) { + string type_str = j.at(kKeyValue).get(); + DataType dtype = GetValue(kDataTypeStringToEnum, type_str, DT_UNDEFINED); + attr.value.SetValue(dtype); + return; } attr.value.SetValue(j.at(kKeyValue).get()); }