forked from mindspore-Ecosystem/mindspore
!48900 Disable internal device address relationship in zero copy.
Merge pull request !48900 from gaoyong10/dynamic_shape_03
This commit is contained in:
commit
f0694b2f0c
|
@ -669,7 +669,10 @@ void KernelRuntime::AssignStaticMemoryInput(const session::KernelGraph &graph) {
|
|||
MS_LOG(INFO) << "It is not suggested to use a lonely weight parameter as the output of graph";
|
||||
continue;
|
||||
}
|
||||
DeviceAddressPtr device_address = GetInternalDeviceAddress(graph, item);
|
||||
// If kernel has flag kFlagEnableZeroCopyInGraph, the internal parameter and the corresponding
|
||||
// cnode cannot use the same device address.
|
||||
DeviceAddressPtr device_address =
|
||||
(graph.has_flag(kFlagEnableZeroCopyInGraph) ? nullptr : GetInternalDeviceAddress(graph, item));
|
||||
GetDeviceAddress(item, shadow_backend_node_map, index, graph, &device_address);
|
||||
AnfAlgo::SetOutputAddr(device_address, index, item.get());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue