From cdb874a94247b9dfc2714bc07dd2b047f72e452c Mon Sep 17 00:00:00 2001 From: reku1997 Date: Tue, 20 Sep 2022 19:13:20 +0800 Subject: [PATCH] not process non task split when kernel by kernel --- .../ccsrc/plugin/device/ascend/hal/hardware/ascend_somas.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mindspore/ccsrc/plugin/device/ascend/hal/hardware/ascend_somas.cc b/mindspore/ccsrc/plugin/device/ascend/hal/hardware/ascend_somas.cc index b3af6c154b4..3161035ab6e 100644 --- a/mindspore/ccsrc/plugin/device/ascend/hal/hardware/ascend_somas.cc +++ b/mindspore/ccsrc/plugin/device/ascend/hal/hardware/ascend_somas.cc @@ -194,6 +194,12 @@ void AscendSomas::IndependentNodeOutputProcess(const session::KernelGraph &graph } void AscendSomas::NonTaskSplitProcess(const session::KernelGraph &graph) { + // When not used task sink mode, should not process non task split mem-reuse. + // Because the logic for processing non task split memory offset is in the function TaskGenerator:: GetTaskInput, + // only run in task sink mode. + if (!graph.is_graph_run_mode()) { + return; + } auto &kernel_cnodes = graph.execution_order(); for (const auto &kernel : kernel_cnodes) { auto op_name = common::AnfAlgo::GetCNodeName(kernel);