From ffa2ec19e47244624f58fadf1c12b2b356063eb6 Mon Sep 17 00:00:00 2001 From: risemeup1 <62429225+risemeup1@users.noreply.github.com> Date: Wed, 8 Feb 2023 14:29:13 +0800 Subject: [PATCH] fix gcc12 error (#48176) --- paddle/fluid/distributed/collective/process_group_custom.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/paddle/fluid/distributed/collective/process_group_custom.cc b/paddle/fluid/distributed/collective/process_group_custom.cc index 89ec97c08d..633b56dfd4 100644 --- a/paddle/fluid/distributed/collective/process_group_custom.cc +++ b/paddle/fluid/distributed/collective/process_group_custom.cc @@ -153,12 +153,10 @@ void ProcessGroupCustom::CreateCustomManagerCache( std::vector> dev_ctx; dev_ctx.resize(places.size()); - std::unique_ptr comms( - new phi::ccl::CCLComm[places.size()]); for (size_t i = 0; i < places.size(); ++i) { phi::DeviceGuard guard(places[i]); ccl_comms[i] = CustomCCLCommManager::Create( - device_type, GetSize(), GetRank(), &ccl_id, comms.get() + i); + device_type, GetSize(), GetRank(), &ccl_id, new phi::ccl::CCLComm); dev_ctx[i].reset(new CustomDeviceContext(places[i])); } -- GitLab