!40239 Unset ref node copy in graph run mode.

Merge pull request !40239 from gaoyong10/dynamic_shape_03
This commit is contained in:
i-robot 2022-08-11 04:10:24 +00:00 committed by Gitee
commit ada75a4e88
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ bool is_need_copy_device_tensor(const AnfNodePtr &backend_node, size_t index) {
auto kernel_graph = AnfAlgo::FetchKernelGraph(backend_node);
MS_EXCEPTION_IF_NULL(kernel_graph);
if (kernel_graph->IsInRefOutputMap({backend_node, index})) {
if ((!kernel_graph->is_graph_run_mode()) && kernel_graph->IsInRefOutputMap({backend_node, index})) {
return false;
}