| @@ -161,7 +161,7 @@ static uint8_t GetUint8ValByMan(uint8_t s_ret, const uint64_t &long_int_m, const | |||||
| if (m_ret == 0) { | if (m_ret == 0) { | ||||
| s_ret = 0; | s_ret = 0; | ||||
| } | } | ||||
| return static_cast<uint8_t>((s_ret << kBitShift7) | (m_ret)); | |||||
| return static_cast<uint8_t>((s_ret << static_cast<uint8_t>(kBitShift7)) | (m_ret)); | |||||
| } | } | ||||
| /// @ingroup fp16_t math conversion static method | /// @ingroup fp16_t math conversion static method | ||||
| @@ -562,7 +562,7 @@ static uint16_t Fp16Add(uint16_t v_1, uint16_t v_2) { | |||||
| int16_t e_ret = std::max(e_a, e_b); | int16_t e_ret = std::max(e_a, e_b); | ||||
| int16_t e_tmp = std::abs(e_a - e_b); | int16_t e_tmp = std::abs(e_a - e_b); | ||||
| if (e_a > e_b) { | if (e_a > e_b) { | ||||
| m_trunc = (m_b << (kBitShift32 - static_cast<uint16_t>(e_tmp))); | |||||
| m_trunc = (m_b << (static_cast<uint16_t>(kBitShift32) - static_cast<uint16_t>(e_tmp))); | |||||
| m_b = RightShift(m_b, e_tmp); | m_b = RightShift(m_b, e_tmp); | ||||
| } else if (e_a < e_b) { | } else if (e_a < e_b) { | ||||
| m_trunc = (m_a << (kBitShift32 - static_cast<uint16_t>(e_tmp))); | m_trunc = (m_a << (kBitShift32 - static_cast<uint16_t>(e_tmp))); | ||||
| @@ -199,7 +199,7 @@ Status OnnxConstantParser::ParseConvertDataType(const ge::onnx::TensorProto &ten | |||||
| Status OnnxConstantParser::ParseConstFromInput(const ge::onnx::NodeProto *op_src, ge::Operator &op_def) { | Status OnnxConstantParser::ParseConstFromInput(const ge::onnx::NodeProto *op_src, ge::Operator &op_def) { | ||||
| GE_CHECK_NOTNULL(op_src); | GE_CHECK_NOTNULL(op_src); | ||||
| const NodeProto *node = PtrToPtr<const ge::onnx::NodeProto, const NodeProto>(op_src); | |||||
| const NodeProto *node = reinterpret_cast<const NodeProto *>(op_src); | |||||
| // Get const Tensor from node | // Get const Tensor from node | ||||
| Tensor tensor; | Tensor tensor; | ||||
| @@ -226,7 +226,7 @@ Status OnnxConstantParser::ParseConstFromInput(const ge::onnx::NodeProto *op_src | |||||
| Status OnnxConstantParser::ParseParams(const Message *op_src, ge::Operator &op_def) { | Status OnnxConstantParser::ParseParams(const Message *op_src, ge::Operator &op_def) { | ||||
| GE_CHECK_NOTNULL(op_src); | GE_CHECK_NOTNULL(op_src); | ||||
| const ge::onnx::NodeProto *node = PtrToPtr<const Message, const ge::onnx::NodeProto>(op_src); | |||||
| const ge::onnx::NodeProto *node = reinterpret_cast<const ge::onnx::NodeProto *>(op_src); | |||||
| GE_CHECK_NOTNULL(node); | GE_CHECK_NOTNULL(node); | ||||
| GELOGD("Onnx op node name = %s, op type= %s, parse params", node->name().c_str(), node->op_type().c_str()); | GELOGD("Onnx op node name = %s, op type= %s, parse params", node->name().c_str(), node->op_type().c_str()); | ||||
| @@ -32,7 +32,7 @@ const char *const kSerializeFormat = "serialize_format"; | |||||
| Status ParseParams(const Message *op_src, ArgOpOperator *const op) { | Status ParseParams(const Message *op_src, ArgOpOperator *const op) { | ||||
| GE_CHECK_NOTNULL(op_src); | GE_CHECK_NOTNULL(op_src); | ||||
| GE_CHECK_NOTNULL(op); | GE_CHECK_NOTNULL(op); | ||||
| const domi::tensorflow::NodeDef *node = PtrToPtr<const Message, const domi::tensorflow::NodeDef>(op_src); | |||||
| const domi::tensorflow::NodeDef *node = reinterpret_cast<const domi::tensorflow::NodeDef *>(op_src); | |||||
| GELOGD("TF op node name = %s, op type= %s, parse params", node->name().c_str(), node->op().c_str()); | GELOGD("TF op node name = %s, op type= %s, parse params", node->name().c_str(), node->op().c_str()); | ||||
| domi::tensorflow::AttrValue output_attr_value; | domi::tensorflow::AttrValue output_attr_value; | ||||
| if (TensorFlowUtil::FindAttrValue(node, ge::ATTR_NAME_OUTPUT_TENSOR_DESC, output_attr_value)) { | if (TensorFlowUtil::FindAttrValue(node, ge::ATTR_NAME_OUTPUT_TENSOR_DESC, output_attr_value)) { | ||||
| @@ -31,7 +31,7 @@ namespace ge { | |||||
| Status ParseParams(const Message *op_src, FrameworkOpOperator *op) { | Status ParseParams(const Message *op_src, FrameworkOpOperator *op) { | ||||
| GE_CHECK_NOTNULL(op_src); | GE_CHECK_NOTNULL(op_src); | ||||
| GE_CHECK_NOTNULL(op); | GE_CHECK_NOTNULL(op); | ||||
| const domi::tensorflow::NodeDef *node = PtrToPtr<const Message, const domi::tensorflow::NodeDef>(op_src); | |||||
| const domi::tensorflow::NodeDef *node = reinterpret_cast<const domi::tensorflow::NodeDef *>(op_src); | |||||
| GELOGD("TF op node name = %s, op type= %s, parse params", node->name().c_str(), node->op().c_str()); | GELOGD("TF op node name = %s, op type= %s, parse params", node->name().c_str(), node->op().c_str()); | ||||
| string type = node->op(); | string type = node->op(); | ||||
| @@ -33,8 +33,7 @@ Status TensorFlowFusionCustomParserAdapter::ParseParams(const vector<const NodeD | |||||
| std::vector<const google::protobuf::Message *> inside_nodes; | std::vector<const google::protobuf::Message *> inside_nodes; | ||||
| for (auto inside_node : v_input_const) { | for (auto inside_node : v_input_const) { | ||||
| GE_CHECK_NOTNULL(inside_node); | GE_CHECK_NOTNULL(inside_node); | ||||
| const google::protobuf::Message *node_src = | |||||
| PtrToPtr<const google::protobuf::Message, const google::protobuf::Message>(inside_node); | |||||
| const google::protobuf::Message *node_src = reinterpret_cast<const google::protobuf::Message *>(inside_node); | |||||
| inside_nodes.push_back(node_src); | inside_nodes.push_back(node_src); | ||||
| } | } | ||||
| std::string ori_type = op_dest->GetType(); | std::string ori_type = op_dest->GetType(); | ||||