This is an automated email from the ASF dual-hosted git repository.

tqchen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git


The following commit(s) were added to refs/heads/main by this push:
     new 132daf6c95 [Disco] Fix double free of nccl communicator (#17275)
132daf6c95 is described below

commit 132daf6c959efe04cffa90234ef1688d82d193e3
Author: Wuwei Lin <[email protected]>
AuthorDate: Thu Aug 15 09:52:37 2024 -0700

    [Disco] Fix double free of nccl communicator (#17275)
---
 src/runtime/disco/nccl/nccl_context.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/runtime/disco/nccl/nccl_context.h 
b/src/runtime/disco/nccl/nccl_context.h
index 730479b61a..b874da219f 100644
--- a/src/runtime/disco/nccl/nccl_context.h
+++ b/src/runtime/disco/nccl/nccl_context.h
@@ -129,6 +129,9 @@ struct CCLThreadLocalContext {
   void Clear() {
     if (group_comm) {
       NCCL_CALL(ncclCommDestroy(group_comm));
+      if (global_comm == group_comm) {
+        global_comm = nullptr;
+      }
       group_comm = nullptr;
     }
     if (global_comm) {

Reply via email to