From: @zhao_zhixuan Reviewed-by: @xchu42 Signed-off-by:tags/v1.3.0
| @@ -355,13 +355,13 @@ generate_package() | |||||
| if [ "x${PLATFORM}" = "xtrain" ] | if [ "x${PLATFORM}" = "xtrain" ] | ||||
| then | then | ||||
| tar -cf graphengine_lib.tar fwkacllib | |||||
| tar -zcf graphengine_lib.tar fwkacllib | |||||
| elif [ "x${PLATFORM}" = "xinference" ] | elif [ "x${PLATFORM}" = "xinference" ] | ||||
| then | then | ||||
| tar -cf graphengine_lib.tar acllib atc | |||||
| tar -zcf graphengine_lib.tar acllib atc | |||||
| elif [ "x${PLATFORM}" = "xall" ] | elif [ "x${PLATFORM}" = "xall" ] | ||||
| then | then | ||||
| tar -cf graphengine_lib.tar fwkacllib acllib atc | |||||
| tar -zcf graphengine_lib.tar fwkacllib acllib atc | |||||
| fi | fi | ||||
| } | } | ||||
| @@ -371,6 +371,6 @@ elif [ "X$MINDSPORE_MODE" = "Xon" ] | |||||
| then | then | ||||
| cd "${OUTPUT_PATH}" | cd "${OUTPUT_PATH}" | ||||
| find ./ -name graphengine_lib.tar -exec rm {} \; | find ./ -name graphengine_lib.tar -exec rm {} \; | ||||
| tar -cf graphengine_lib.tar lib | |||||
| tar -zcf graphengine_lib.tar lib | |||||
| fi | fi | ||||
| echo "---------------- GraphEngine package archive generated ----------------" | echo "---------------- GraphEngine package archive generated ----------------" | ||||
| @@ -25,7 +25,7 @@ | |||||
| #include "single_op/task/build_task_utils.h" | #include "single_op/task/build_task_utils.h" | ||||
| #include "single_op/task/tbe_task_builder.h" | #include "single_op/task/tbe_task_builder.h" | ||||
| using optiling::OpRunInfo; | |||||
| using optiling::utils::OpRunInfo; | |||||
| namespace ge { | namespace ge { | ||||
| namespace hybrid { | namespace hybrid { | ||||
| @@ -359,9 +359,7 @@ Status AiCoreOpTask::UpdateTilingInfo(TaskContext &context) { | |||||
| GE_CHECK_NOTNULL(op_desc); | GE_CHECK_NOTNULL(op_desc); | ||||
| GELOGD("[%s] Start to update tiling info for task: [%s]", node->GetName().c_str(), stub_name_.c_str()); | GELOGD("[%s] Start to update tiling info for task: [%s]", node->GetName().c_str(), stub_name_.c_str()); | ||||
| OpRunInfo tiling_info; | |||||
| tiling_info.block_dim = -1; // codex: Using uninitialized value | |||||
| tiling_info.clear_atomic = true; | |||||
| OpRunInfo tiling_info(-1, true, 0); | |||||
| auto execution_context = context.GetExecutionContext(); | auto execution_context = context.GetExecutionContext(); | ||||
| @@ -370,12 +368,14 @@ Status AiCoreOpTask::UpdateTilingInfo(TaskContext &context) { | |||||
| RECORD_EXECUTION_EVENT(execution_context, context.GetNodeName(), "[CalcTilingInfo] End"); | RECORD_EXECUTION_EVENT(execution_context, context.GetNodeName(), "[CalcTilingInfo] End"); | ||||
| // update op args by tiling info | // update op args by tiling info | ||||
| block_dim_ = static_cast<uint32_t>(tiling_info.block_dim); | |||||
| op_desc->SetWorkspaceBytes(tiling_info.workspaces); | |||||
| clear_atomic_ = tiling_info.clear_atomic; | |||||
| tiling_data_ = tiling_info.tiling_data.str(); | |||||
| tiling_key_ = tiling_info.tiling_key; | |||||
| block_dim_ = tiling_info.GetBlockDim(); | |||||
| clear_atomic_ = tiling_info.GetClearAtomic(); | |||||
| std::vector<int64_t> workspaces; | |||||
| tiling_info.GetAllWorkspaces(workspaces); | |||||
| op_desc->SetWorkspaceBytes(workspaces); | |||||
| tiling_data_ = tiling_info.GetAllTilingData().str(); | |||||
| tiling_key_ = tiling_info.GetTilingKey(); | |||||
| GELOGD("Successfully getting [tiling_key] : %u", tiling_key_); | GELOGD("Successfully getting [tiling_key] : %u", tiling_key_); | ||||
| if (tiling_data_.empty()) { | if (tiling_data_.empty()) { | ||||
| GELOGD("[%s] Tiling data is empty.", op_desc->GetName().c_str()); | GELOGD("[%s] Tiling data is empty.", op_desc->GetName().c_str()); | ||||
| @@ -412,7 +412,7 @@ Status AiCoreOpTask::UpdateTilingInfo(TaskContext &context) { | |||||
| Status AiCoreOpTask::CalcTilingInfo(const NodePtr &node, OpRunInfo &tiling_info) { | Status AiCoreOpTask::CalcTilingInfo(const NodePtr &node, OpRunInfo &tiling_info) { | ||||
| GELOGD("[%s] Start to invoke OpParaCalculate.", node->GetName().c_str()); | GELOGD("[%s] Start to invoke OpParaCalculate.", node->GetName().c_str()); | ||||
| GE_CHK_STATUS_RET(OpParaCalculate(*node, tiling_info), | |||||
| GE_CHK_STATUS_RET(optiling::OpParaCalculateV2(*node, tiling_info), | |||||
| "[Invoke][OpParaCalculate]Failed calc tiling data of node %s.", | "[Invoke][OpParaCalculate]Failed calc tiling data of node %s.", | ||||
| node->GetName().c_str()); | node->GetName().c_str()); | ||||
| GELOGD("[%s] Done invoking OpParaCalculate successfully.", node->GetName().c_str()); | GELOGD("[%s] Done invoking OpParaCalculate successfully.", node->GetName().c_str()); | ||||
| @@ -633,7 +633,7 @@ std::string AtomicAddrCleanOpTask::GetKeyForKernelName(const OpDesc &op_desc) co | |||||
| Status AtomicAddrCleanOpTask::CalcTilingInfo(const NodePtr &node, OpRunInfo &tiling_info) { | Status AtomicAddrCleanOpTask::CalcTilingInfo(const NodePtr &node, OpRunInfo &tiling_info) { | ||||
| GELOGD("[%s] Start to invoke OpAtomicCalculate.", node->GetName().c_str()); | GELOGD("[%s] Start to invoke OpAtomicCalculate.", node->GetName().c_str()); | ||||
| GE_CHK_STATUS_RET(OpAtomicCalculate(*node, tiling_info), | |||||
| GE_CHK_STATUS_RET(optiling::OpAtomicCalculateV2(*node, tiling_info), | |||||
| "[Invoke][OpAtomicCalculate]Failed calc tiling data of node %s.", | "[Invoke][OpAtomicCalculate]Failed calc tiling data of node %s.", | ||||
| node->GetName().c_str()); | node->GetName().c_str()); | ||||
| GELOGD("[%s] Done invoking OpAtomicCalculate successfully.", node->GetName().c_str()); | GELOGD("[%s] Done invoking OpAtomicCalculate successfully.", node->GetName().c_str()); | ||||
| @@ -85,7 +85,7 @@ class AiCoreOpTask { | |||||
| virtual std::string GetKeyForTvmMagic() const; | virtual std::string GetKeyForTvmMagic() const; | ||||
| virtual std::string GetKeyForTvmMetaData() const; | virtual std::string GetKeyForTvmMetaData() const; | ||||
| virtual std::string GetKeyForKernelName(const OpDesc &op_desc) const; | virtual std::string GetKeyForKernelName(const OpDesc &op_desc) const; | ||||
| virtual Status CalcTilingInfo(const NodePtr &node, optiling::OpRunInfo &tiling_info); | |||||
| virtual Status CalcTilingInfo(const NodePtr &node, optiling::utils::OpRunInfo &tiling_info); | |||||
| std::unique_ptr<TensorBuffer> tiling_buffer_ = nullptr; | std::unique_ptr<TensorBuffer> tiling_buffer_ = nullptr; | ||||
| std::string tiling_data_; | std::string tiling_data_; | ||||
| @@ -130,7 +130,7 @@ class AtomicAddrCleanOpTask : public AiCoreOpTask { | |||||
| std::string GetKeyForTvmMagic() const override; | std::string GetKeyForTvmMagic() const override; | ||||
| std::string GetKeyForTvmMetaData() const override; | std::string GetKeyForTvmMetaData() const override; | ||||
| std::string GetKeyForKernelName(const OpDesc &op_desc) const override; | std::string GetKeyForKernelName(const OpDesc &op_desc) const override; | ||||
| Status CalcTilingInfo(const NodePtr &node, optiling::OpRunInfo &tiling_info) override; | |||||
| Status CalcTilingInfo(const NodePtr &node, optiling::utils::OpRunInfo &tiling_info) override; | |||||
| private: | private: | ||||
| Status InitAtomicAddrCleanIndices(const OpDesc &op_desc); | Status InitAtomicAddrCleanIndices(const OpDesc &op_desc); | ||||
| @@ -224,18 +224,17 @@ Status TbeOpTask::LaunchKernel(rtStream_t stream) { | |||||
| Status TbeOpTask::UpdateRunInfo() { | Status TbeOpTask::UpdateRunInfo() { | ||||
| // invoke OpParaCalculate | // invoke OpParaCalculate | ||||
| GELOGD("Start to invoke OpParaCalculate."); | GELOGD("Start to invoke OpParaCalculate."); | ||||
| optiling::OpRunInfo run_info; | |||||
| run_info.block_dim = 0; | |||||
| auto ret = optiling::OpParaCalculate(*node_, run_info); | |||||
| optiling::utils::OpRunInfo run_info(0, true, 0); | |||||
| auto ret = optiling::OpParaCalculateV2(*node_, run_info); | |||||
| if (ret != GRAPH_SUCCESS) { | if (ret != GRAPH_SUCCESS) { | ||||
| GELOGE(ACL_ERROR_GE_INTERNAL_ERROR, "[Invoke][OpParaCalculate] failed, ret = %u.", ret); | GELOGE(ACL_ERROR_GE_INTERNAL_ERROR, "[Invoke][OpParaCalculate] failed, ret = %u.", ret); | ||||
| REPORT_INNER_ERROR("E19999", "invoke OpParaCalculate failed, ret = %u.", ret); | REPORT_INNER_ERROR("E19999", "invoke OpParaCalculate failed, ret = %u.", ret); | ||||
| return ACL_ERROR_GE_INTERNAL_ERROR; | return ACL_ERROR_GE_INTERNAL_ERROR; | ||||
| } | } | ||||
| block_dim_ = run_info.block_dim; | |||||
| tiling_data_ = run_info.tiling_data.str(); | |||||
| tiling_key_ = run_info.tiling_key; | |||||
| run_info_workspaces_ = run_info.workspaces; | |||||
| block_dim_ = run_info.GetBlockDim(); | |||||
| tiling_data_ = run_info.GetAllTilingData().str(); | |||||
| tiling_key_ = run_info.GetTilingKey(); | |||||
| run_info.GetAllWorkspaces(run_info_workspaces_); | |||||
| GELOGD("Done invoking OpParaCalculate successfully. block_dim = %u, tiling size = %zu, tiling_key = %u", block_dim_, | GELOGD("Done invoking OpParaCalculate successfully. block_dim = %u, tiling size = %zu, tiling_key = %u", block_dim_, | ||||
| tiling_data_.size(), tiling_key_); | tiling_data_.size(), tiling_key_); | ||||
| return SUCCESS; | return SUCCESS; | ||||
| @@ -1 +1 @@ | |||||
| Subproject commit 8c5fd4486f870d8b63213565aa39fdf1ba1e497a | |||||
| Subproject commit e189fc7f4da9f7714f009d70da4db627de17955d | |||||
| @@ -1 +1 @@ | |||||
| Subproject commit 3073129b68c0fae12a8b7531d60782e39128a28c | |||||
| Subproject commit db5ce472de0086c3e2abdaab3b0685c1d2656c96 | |||||