提交 b4794d63 编写于 作者: K Kavya Srinet

Fixed data_type_transform.cc

上级 5c0ca47d
...@@ -65,19 +65,19 @@ void TransDataType(const OpKernelType& kernel_type_for_var, ...@@ -65,19 +65,19 @@ void TransDataType(const OpKernelType& kernel_type_for_var,
auto ctx = pool.Get(in.place()); auto ctx = pool.Get(in.place());
switch (src_type) { switch (src_type) {
case proto::DataType::FP32: case proto::VarType::FP32:
framework::VisitDataType(dst_type, CastDataType<float>(in, out, ctx)); framework::VisitDataType(dst_type, CastDataType<float>(in, out, ctx));
break; break;
case proto::DataType::FP64: case proto::VarType::FP64:
framework::VisitDataType(dst_type, CastDataType<double>(in, out, ctx)); framework::VisitDataType(dst_type, CastDataType<double>(in, out, ctx));
break; break;
case proto::DataType::INT32: case proto::VarType::INT32:
framework::VisitDataType(dst_type, CastDataType<int>(in, out, ctx)); framework::VisitDataType(dst_type, CastDataType<int>(in, out, ctx));
break; break;
case proto::DataType::INT64: case proto::VarType::INT64:
framework::VisitDataType(dst_type, CastDataType<int64_t>(in, out, ctx)); framework::VisitDataType(dst_type, CastDataType<int64_t>(in, out, ctx));
break; break;
case proto::DataType::BOOL: case proto::VarType::BOOL:
framework::VisitDataType(dst_type, CastDataType<bool>(in, out, ctx)); framework::VisitDataType(dst_type, CastDataType<bool>(in, out, ctx));
break; break;
default: default:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册