Merge pull request !6180 from laiyongqiang/codextags/v1.0.0
| @@ -178,7 +178,6 @@ void BestFitMemReuse::AssignCommonNodeOutputOffset() { | |||||
| void BestFitMemReuse::AssignCommunicationNodeOutputOffset() { | void BestFitMemReuse::AssignCommunicationNodeOutputOffset() { | ||||
| size_t total_kernel_output_size = 0; | size_t total_kernel_output_size = 0; | ||||
| size_t output_num = 0; | |||||
| // get all output size | // get all output size | ||||
| MS_EXCEPTION_IF_NULL(current_kernel_); | MS_EXCEPTION_IF_NULL(current_kernel_); | ||||
| for (const auto &tensor_idx : current_kernel_->GetOutputRefIndexs()) { | for (const auto &tensor_idx : current_kernel_->GetOutputRefIndexs()) { | ||||
| @@ -205,7 +204,7 @@ void BestFitMemReuse::AssignCommunicationNodeOutputOffset() { | |||||
| size_t index = GetTensorIndex(tensor_idx); | size_t index = GetTensorIndex(tensor_idx); | ||||
| auto tensor_desc = tensor_ptr_list_[index]; | auto tensor_desc = tensor_ptr_list_[index]; | ||||
| MS_EXCEPTION_IF_NULL(tensor_desc); | MS_EXCEPTION_IF_NULL(tensor_desc); | ||||
| if (output_index == 0 || output_index == output_num - 1) { | |||||
| if (output_index == 0 || output_index == output_ref_indexes.size() - 1) { | |||||
| tensor_desc->size_ += kDefaultMemAlignSize; | tensor_desc->size_ += kDefaultMemAlignSize; | ||||
| } | } | ||||
| @@ -339,7 +339,7 @@ void KernelRuntime::AssignStaticMemoryInput(const session::KernelGraph *graph) { | |||||
| } | } | ||||
| } | } | ||||
| void KernelRuntime::AssignStaticMemoryOutput(session::KernelGraph *graph) { | |||||
| void KernelRuntime::AssignStaticMemoryOutput(const session::KernelGraph *graph) { | |||||
| MS_EXCEPTION_IF_NULL(graph); | MS_EXCEPTION_IF_NULL(graph); | ||||
| auto nodes = AnfAlgo::GetAllOutput(graph->output(), {prim::kPrimTupleGetItem}); | auto nodes = AnfAlgo::GetAllOutput(graph->output(), {prim::kPrimTupleGetItem}); | ||||
| std::vector<session::KernelWithIndex> non_communication_op; | std::vector<session::KernelWithIndex> non_communication_op; | ||||
| @@ -96,7 +96,7 @@ class KernelRuntime { | |||||
| void AssignCommunicationNodeMem(MemType type, const AnfNodePtr &node); | void AssignCommunicationNodeMem(MemType type, const AnfNodePtr &node); | ||||
| private: | private: | ||||
| void AssignStaticMemoryOutput(session::KernelGraph *graph); | |||||
| void AssignStaticMemoryOutput(const session::KernelGraph *graph); | |||||
| void GenLaunchArgs(const mindspore::kernel::KernelMod &kernel_mod, const AnfNodePtr &kernel, | void GenLaunchArgs(const mindspore::kernel::KernelMod &kernel_mod, const AnfNodePtr &kernel, | ||||
| AddressPtrList *kernel_inputs, AddressPtrList *kernel_workspaces, AddressPtrList *kernel_outputs); | AddressPtrList *kernel_inputs, AddressPtrList *kernel_workspaces, AddressPtrList *kernel_outputs); | ||||
| bool LaunchKernelMod(const session::KernelGraph &graph); | bool LaunchKernelMod(const session::KernelGraph &graph); | ||||