forked from huawei/mindspore2022
!18262 fixed ps data_parallel case result is error
Merge pull request !18262 from anancds/error
This commit is contained in:
commit
7f731faa9b
|
|
@ -538,7 +538,7 @@ void GPUSession::UpdateOutputTensors(const VectorRef *outputs,
|
|||
// address, to avoid that the device address context of tensor be rewritten in the next step or next loop.
|
||||
// But one time memory application scenarios need to be skipped, because the memory is not allocated next step:
|
||||
// 1. Non cnode 2. Communication kernel.
|
||||
if (node->isa<CNode>() && !AnfAlgo::IsCommunicationOp(node)) {
|
||||
if (node->isa<CNode>() && !AnfAlgo::IsCommunicationOp(node) && !ps::PSContext::instance()->is_ps_mode()) {
|
||||
auto new_address = std::make_shared<device::gpu::GPUDeviceAddress>(nullptr, address->GetSize());
|
||||
AnfAlgo::SetOutputAddr(new_address, output_index, node.get());
|
||||
if (context::GraphKernelFlags::GetInstance().IsEnableGraphKernel()) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue