diff --git a/csrc/multidevice/ipc_handle.cpp b/csrc/multidevice/ipc_handle.cpp index cfacfb4bd75..c34b3fea886 100644 --- a/csrc/multidevice/ipc_handle.cpp +++ b/csrc/multidevice/ipc_handle.cpp @@ -143,6 +143,9 @@ void IpcHandleCache::exchangeHandles( insert(communication, std::move(ipc_handles)); } + if (non_cached_communications.empty()) { + return; + } // a barrier is needed here to ensure all ranks have received the // memhandles and the keys are deleted from the store before the next call to // exchangeHandles, otherwise there is a correctness issue diff --git a/tests/cpp/test_multidevice_host_ir_overlap.cpp b/tests/cpp/test_multidevice_host_ir_overlap.cpp index ec130c063a1..21b849d952d 100644 --- a/tests/cpp/test_multidevice_host_ir_overlap.cpp +++ b/tests/cpp/test_multidevice_host_ir_overlap.cpp @@ -1094,7 +1094,7 @@ TEST_F( TEST_F( RingAllgatherOverlapTest, - RingAllgatherBasedPipeliningHostIRImplementationCudaIpc) { + DISABLED_RingAllgatherBasedPipeliningHostIRImplementationCudaIpc) { if (communicator_->size() == 1) { GTEST_SKIP() << "Skipping test for single device"; }