add fp16 for const input -> valuenode

This commit is contained in:
simson 2021-03-18 17:04:12 +08:00
parent eaecc83ec2
commit dc8a279eb6
1 changed files with 2 additions and 1 deletions
mindspore/ccsrc/pipeline/pynative

View File

@ -294,7 +294,8 @@ std::string GetSingleOpGraphInfo(const OpExecInfoPtr &op_exec_info,
if (input_tensors[index]->Dtype()->type_id() == kNumberTypeInt64) {
(void)graph_info.append(std::to_string(*reinterpret_cast<int *>(input_tensors[index]->data_c())));
graph_info += "_";
} else if (input_tensors[index]->Dtype()->type_id() == kNumberTypeFloat32) {
} else if (input_tensors[index]->Dtype()->type_id() == kNumberTypeFloat32 ||
input_tensors[index]->Dtype()->type_id() == kNumberTypeFloat16) {
(void)graph_info.append(std::to_string(*reinterpret_cast<float *>(input_tensors[index]->data_c())));
graph_info += "_";
} else {