| @@ -134,7 +134,7 @@ Status GEInitialize(const std::map<string, string> &options) { | |||||
| Status GEInitialize(const std::map<AscendString, AscendString> &options) { | Status GEInitialize(const std::map<AscendString, AscendString> &options) { | ||||
| std::map<std::string, std::string> str_options; | std::map<std::string, std::string> str_options; | ||||
| for (auto & option : options) { | |||||
| for (auto &option : options) { | |||||
| if (option.first.GetString() == nullptr || option.second.GetString() == nullptr) { | if (option.first.GetString() == nullptr || option.second.GetString() == nullptr) { | ||||
| GELOGE(FAILED, "GEInitialize options is nullptr."); | GELOGE(FAILED, "GEInitialize options is nullptr."); | ||||
| return FAILED; | return FAILED; | ||||
| @@ -2676,7 +2676,7 @@ Status DavinciModel::ReturnResult(uint32_t data_id, const bool rslt_flg, const b | |||||
| cur_dynamic_dims_.clear(); | cur_dynamic_dims_.clear(); | ||||
| cur_dynamic_dims_.resize(shape_of_cur_dynamic_dims_); | cur_dynamic_dims_.resize(shape_of_cur_dynamic_dims_); | ||||
| GE_CHK_RT_RET(rtMemcpy(cur_dynamic_dims_.data(), shape_of_cur_dynamic_dims_ * sizeof(int64_t), | GE_CHK_RT_RET(rtMemcpy(cur_dynamic_dims_.data(), shape_of_cur_dynamic_dims_ * sizeof(int64_t), | ||||
| netoutput_last_input_addr_, netoutput_last_input_size_, RT_MEMCPY_DEVICE_TO_HOST)); | |||||
| netoutput_last_input_addr_, netoutput_last_input_size_, RT_MEMCPY_DEVICE_TO_HOST)); | |||||
| } | } | ||||
| GELOGD("Cur dynamic dims is %s.", formats::JoinToString(cur_dynamic_dims_).c_str()); | GELOGD("Cur dynamic dims is %s.", formats::JoinToString(cur_dynamic_dims_).c_str()); | ||||
| if (GenOutputTensorInfo(op_desc, data_index, output_data, outputs) != SUCCESS) { | if (GenOutputTensorInfo(op_desc, data_index, output_data, outputs) != SUCCESS) { | ||||
| @@ -1055,7 +1055,7 @@ Status ModelManager::GenSessionId(uint64_t &session_id) { | |||||
| Status ModelManager::LoadModelOffline(uint32_t &model_id, const ModelData &model, shared_ptr<ModelListener> listener, | Status ModelManager::LoadModelOffline(uint32_t &model_id, const ModelData &model, shared_ptr<ModelListener> listener, | ||||
| void *dev_ptr, size_t mem_size, void *weight_ptr, size_t weight_size) { | void *dev_ptr, size_t mem_size, void *weight_ptr, size_t weight_size) { | ||||
| GE_CHK_BOOL_RET_STATUS(model.key.empty() || mmAccess2(model.key.c_str(), M_F_OK) == EN_OK, | GE_CHK_BOOL_RET_STATUS(model.key.empty() || mmAccess2(model.key.c_str(), M_F_OK) == EN_OK, | ||||
| ACL_ERROR_GE_PARAM_INVALID, | |||||
| ACL_ERROR_GE_PARAM_INVALID, | |||||
| "input key file path %s is invalid, %s", model.key.c_str(), strerror(errno)); | "input key file path %s is invalid, %s", model.key.c_str(), strerror(errno)); | ||||
| GenModelId(&model_id); | GenModelId(&model_id); | ||||
| @@ -643,7 +643,7 @@ Status HandleAllreduceDuplicateInput(ComputeGraphPtr &compute_graph) { | |||||
| auto ret = GraphUtils::InsertNodeBetweenDataAnchors(pre_out_anchor, in_data_anchor, identity_node); | auto ret = GraphUtils::InsertNodeBetweenDataAnchors(pre_out_anchor, in_data_anchor, identity_node); | ||||
| GE_CHK_STATUS_RET(ret, "Fail to insert identity."); | GE_CHK_STATUS_RET(ret, "Fail to insert identity."); | ||||
| GELOGI("InsertNode %s between %s and %s successfully.", identity_node->GetName().c_str(), | GELOGI("InsertNode %s between %s and %s successfully.", identity_node->GetName().c_str(), | ||||
| pre_node->GetName().c_str(), node->GetName().c_str()); | |||||
| pre_node->GetName().c_str(), node->GetName().c_str()); | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| @@ -284,8 +284,10 @@ void StridedSliceKernel::ExpandDimsWithNewAxis(const ConstGeTensorPtr &begin_ten | |||||
| } | } | ||||
| void StridedSliceKernel::ExpandStrideWithEllipsisMask(const size_t x_dims_num, | void StridedSliceKernel::ExpandStrideWithEllipsisMask(const size_t x_dims_num, | ||||
| const vector<int64_t> &x_dims, vector<int64_t> &orig_begin_vec, | |||||
| vector<int64_t> &orig_end_vec, vector<int64_t> &orig_stride_vec) { | |||||
| const vector<int64_t> &x_dims, | |||||
| vector<int64_t> &orig_begin_vec, | |||||
| vector<int64_t> &orig_end_vec, | |||||
| vector<int64_t> &orig_stride_vec) { | |||||
| if (attr_value_map_.at(STRIDE_SLICE_ATTR_ELLIPSIS_MASK) != 0) { | if (attr_value_map_.at(STRIDE_SLICE_ATTR_ELLIPSIS_MASK) != 0) { | ||||
| auto end_mask = attr_value_map_.at(STRIDE_SLICE_ATTR_END_MASK); | auto end_mask = attr_value_map_.at(STRIDE_SLICE_ATTR_END_MASK); | ||||
| @@ -313,9 +313,9 @@ Status HybridModelBuilder::ParseDependentForFusedSubgraph(NodeItem &node_item) { | |||||
| uint32_t parent_index = 0; | uint32_t parent_index = 0; | ||||
| if (!AttrUtils::GetInt(*op_desc, ATTR_NAME_PARENT_NODE_INDEX, parent_index)) { | if (!AttrUtils::GetInt(*op_desc, ATTR_NAME_PARENT_NODE_INDEX, parent_index)) { | ||||
| GELOGE(INTERNAL_ERROR, | GELOGE(INTERNAL_ERROR, | ||||
| "[%s] Failed to get attr [%s]", | |||||
| op_desc->GetName().c_str(), | |||||
| ATTR_NAME_PARENT_NODE_INDEX.c_str()); | |||||
| "[%s] Failed to get attr [%s]", | |||||
| op_desc->GetName().c_str(), | |||||
| ATTR_NAME_PARENT_NODE_INDEX.c_str()); | |||||
| return INTERNAL_ERROR; | return INTERNAL_ERROR; | ||||
| } | } | ||||
| @@ -724,7 +724,7 @@ Status AicpuNodeTask::UpdateIoAddr(TaskContext &context) { | |||||
| auto io_addr = args_.get() + sizeof(aicpu::AicpuParamHead); | auto io_addr = args_.get() + sizeof(aicpu::AicpuParamHead); | ||||
| // if has input and output, need copy to ioaddr | // if has input and output, need copy to ioaddr | ||||
| int cpy_ret = memcpy_s(io_addr, args_size_ - sizeof(aicpu::AicpuParamHead), | int cpy_ret = memcpy_s(io_addr, args_size_ - sizeof(aicpu::AicpuParamHead), | ||||
| &io_addrs[0], sizeof(uint64_t) * io_addrs.size()); | |||||
| &io_addrs[0], sizeof(uint64_t) * io_addrs.size()); | |||||
| GE_CHK_BOOL_RET_STATUS(cpy_ret == 0, INTERNAL_ERROR, | GE_CHK_BOOL_RET_STATUS(cpy_ret == 0, INTERNAL_ERROR, | ||||
| "Node[%s] memcpy io addr to AicpuParamHead failed, ret=%d, args_size=%u, io nums=%zu.", | "Node[%s] memcpy io addr to AicpuParamHead failed, ret=%d, args_size=%u, io nums=%zu.", | ||||
| node_name_.c_str(), cpy_ret, args_size_, io_addrs.size()); | node_name_.c_str(), cpy_ret, args_size_, io_addrs.size()); | ||||
| @@ -233,9 +233,7 @@ Status TaskContext::AllocateOutput(int index, | |||||
| } else { | } else { | ||||
| GE_CHK_STATUS_RET_NOLOG(AllocateTensor(tensor_desc, outputs_start_[index], attr)); | GE_CHK_STATUS_RET_NOLOG(AllocateTensor(tensor_desc, outputs_start_[index], attr)); | ||||
| GELOGD("Allocating output successfully. node: %s. index = %d, size = %zu", | GELOGD("Allocating output successfully. node: %s. index = %d, size = %zu", | ||||
| node_item_->NodeName().c_str(), | |||||
| index, | |||||
| outputs_start_[index].GetSize()); | |||||
| node_item_->NodeName().c_str(), index, outputs_start_[index].GetSize()); | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| @@ -58,7 +58,7 @@ | |||||
| /// @param [in] value: vector parameter value | /// @param [in] value: vector parameter value | ||||
| /// | /// | ||||
| void ErrorManager::ATCReportErrMessage(std::string error_code, const std::vector<std::string> &key, | void ErrorManager::ATCReportErrMessage(std::string error_code, const std::vector<std::string> &key, | ||||
| const std::vector<std::string> &value) { | |||||
| const std::vector<std::string> &value) { | |||||
| } | } | ||||
| /// | /// | ||||
| @@ -19,26 +19,26 @@ | |||||
| #include "hccl/hcom.h" | #include "hccl/hcom.h" | ||||
| HcclResult hcom_all_gather(const char *tag, void *input_count_ptr, void *output_ptr, u64 input_count, | HcclResult hcom_all_gather(const char *tag, void *input_count_ptr, void *output_ptr, u64 input_count, | ||||
| HcclDataType data_type, const char *group, rtStream_t stream) { | |||||
| HcclDataType data_type, const char *group, rtStream_t stream) { | |||||
| return HCCL_SUCCESS; | return HCCL_SUCCESS; | ||||
| } | } | ||||
| HcclResult hcom_broadcast(const char *tag, void *ptr, u64 count, HcclDataType data_type, u32 root, | HcclResult hcom_broadcast(const char *tag, void *ptr, u64 count, HcclDataType data_type, u32 root, | ||||
| const char *group, rtStream_t stream) { | |||||
| const char *group, rtStream_t stream) { | |||||
| return HCCL_SUCCESS; | return HCCL_SUCCESS; | ||||
| } | } | ||||
| HcclResult hcom_all_reduce(const char *tag, void *input_ptr, void *output_ptr, u64 count, HcclDataType data_type, | HcclResult hcom_all_reduce(const char *tag, void *input_ptr, void *output_ptr, u64 count, HcclDataType data_type, | ||||
| HcclReduceOp op, const char *group, rtStream_t stream) { | |||||
| HcclReduceOp op, const char *group, rtStream_t stream) { | |||||
| return HCCL_SUCCESS; | return HCCL_SUCCESS; | ||||
| } | } | ||||
| HcclResult hcom_get_split_strategy(const char *group, const struct model_feature *feature, u32 max_segment_num, | HcclResult hcom_get_split_strategy(const char *group, const struct model_feature *feature, u32 max_segment_num, | ||||
| u32 *segment_num, u32 *segment_idx) { | |||||
| u32 *segment_num, u32 *segment_idx) { | |||||
| return HCCL_SUCCESS; | return HCCL_SUCCESS; | ||||
| } | } | ||||
| HcclResult hcom_reduce_scatter(const char *tag, void *input_ptr, void *output_ptr, u64 count, | HcclResult hcom_reduce_scatter(const char *tag, void *input_ptr, void *output_ptr, u64 count, | ||||
| HcclDataType data_type, HcclReduceOp op, const char *group, rtStream_t stream) { | |||||
| HcclDataType data_type, HcclReduceOp op, const char *group, rtStream_t stream) { | |||||
| return HCCL_SUCCESS; | return HCCL_SUCCESS; | ||||
| } | } | ||||
| @@ -325,7 +325,7 @@ rtError_t rtSetTaskFailCallback(rtTaskFailCallback callback) | |||||
| } | } | ||||
| rtError_t rtMallocHostSharedMemory(rtMallocHostSharedMemoryIn *in, | rtError_t rtMallocHostSharedMemory(rtMallocHostSharedMemoryIn *in, | ||||
| rtMallocHostSharedMemoryOut *out) | |||||
| rtMallocHostSharedMemoryOut *out) | |||||
| { | { | ||||
| out->ptr = new uint8_t[in->size]; | out->ptr = new uint8_t[in->size]; | ||||
| out->devPtr = new uint8_t[in->size]; | out->devPtr = new uint8_t[in->size]; | ||||
| @@ -306,8 +306,8 @@ class UtestLogicalStreamAllocator : public testing::Test { | |||||
| max_parallel_num["aicpu"] = parallel_num; | max_parallel_num["aicpu"] = parallel_num; | ||||
| Status status = AssignLogicalStreams({const1, const2, get_next, genmask1, genmask2, domask, subgraph4, subgraph5, | Status status = AssignLogicalStreams({const1, const2, get_next, genmask1, genmask2, domask, subgraph4, subgraph5, | ||||
| subgraph6, allreduce1, allreduce2, apply1, apply2}, | |||||
| confs, max_parallel_num); | |||||
| subgraph6, allreduce1, allreduce2, apply1, apply2}, | |||||
| confs, max_parallel_num); | |||||
| EXPECT_EQ(status, ge::SUCCESS); | EXPECT_EQ(status, ge::SUCCESS); | ||||
| EXPECT_EQ(GetStream(get_next), 0); | EXPECT_EQ(GetStream(get_next), 0); | ||||
| @@ -154,7 +154,7 @@ class OmeTestOpUtils { | |||||
| if (model->HasAttr(MODEL_ATTR_TASKS)) { | if (model->HasAttr(MODEL_ATTR_TASKS)) { | ||||
| ge::Buffer task_buffer; | ge::Buffer task_buffer; | ||||
| GE_CHK_BOOL_RET_STATUS(ge::AttrUtils::GetZeroCopyBytes(model, MODEL_ATTR_TASKS, task_buffer), FAILED, | GE_CHK_BOOL_RET_STATUS(ge::AttrUtils::GetZeroCopyBytes(model, MODEL_ATTR_TASKS, task_buffer), FAILED, | ||||
| "Get bytes failed."); | |||||
| "Get bytes failed."); | |||||
| std::shared_ptr<ModelTaskDef> task = ge::MakeShared<ModelTaskDef>(); | std::shared_ptr<ModelTaskDef> task = ge::MakeShared<ModelTaskDef>(); | ||||
| GE_CHECK_NOTNULL(task); | GE_CHECK_NOTNULL(task); | ||||
| GE_IF_BOOL_EXEC(task_buffer.GetData() == nullptr, GELOGE(FAILED, "Get data fail"); return FAILED); | GE_IF_BOOL_EXEC(task_buffer.GetData() == nullptr, GELOGE(FAILED, "Get data fail"); return FAILED); | ||||