Browse Source

VerifyConstOp

tags/v1.2.0
lianghao 3 years ago
parent
commit
b9d632bbd9
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      ge/graph/preprocess/graph_preprocess.cc

+ 3
- 0
ge/graph/preprocess/graph_preprocess.cc View File

@@ -1665,6 +1665,9 @@ Status GraphPrepare::VerifyConstOp(const NodePtr &node) {
auto ge_tensor_desc = ge_tensor_ptr->GetTensorDesc(); auto ge_tensor_desc = ge_tensor_ptr->GetTensorDesc();
int64_t shape_size = ge_tensor_desc.GetShape().GetShapeSize(); int64_t shape_size = ge_tensor_desc.GetShape().GetShapeSize();
auto data_type = ge_tensor_desc.GetDataType(); auto data_type = ge_tensor_desc.GetDataType();
if (data_type == DT_STRING) {
return SUCCESS;
}
uint32_t length = 1; uint32_t length = 1;
bool type_ret = TypeUtils::GetDataTypeLength(data_type, length); bool type_ret = TypeUtils::GetDataTypeLength(data_type, length);
if (!type_ret) { if (!type_ret) {


Loading…
Cancel
Save