From 77ab6691913d01707b1da47f743f3d866a05e048 Mon Sep 17 00:00:00 2001 From: "gengchao4@huawei.com" Date: Mon, 21 Dec 2020 16:07:18 +0800 Subject: [PATCH] p2p offset set for zero --- ge/graph/build/memory/graph_mem_assigner.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ge/graph/build/memory/graph_mem_assigner.cc b/ge/graph/build/memory/graph_mem_assigner.cc index a6da4682..f44e40f0 100755 --- a/ge/graph/build/memory/graph_mem_assigner.cc +++ b/ge/graph/build/memory/graph_mem_assigner.cc @@ -99,7 +99,7 @@ Status GraphMemoryAssigner::AssignMemory() { MemoryOffset memory_offset(RT_MEMORY_HBM, mem_assigner->GetMemOffset()); memory_offset_.emplace(RT_MEMORY_HBM, memory_offset); - if (mem_assigner->GetP2PMemOffset() > 0) { + if (mem_assigner->GetP2PMemOffset() >= 0) { MemoryOffset p2p_memory_offset(RT_MEMORY_P2P_DDR, mem_assigner->GetP2PMemOffset()); memory_offset_.emplace(RT_MEMORY_P2P_DDR, p2p_memory_offset); }