Skip to content

Commit

Permalink
initialize root just for bcast
Browse files Browse the repository at this point in the history
  • Loading branch information
SreevatsaAnantharamu committed Jan 3, 2025
1 parent 337c711 commit 80fb073
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions msccl/language/collectives.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@ class Collective:

def __init__(self, num_ranks, chunk_factor, inplace, root=0, num_ranks_per_node=-1, **kwargs):
self.num_ranks = num_ranks
self.root=root
self.chunk_factor = chunk_factor
self.inplace = inplace
self.name = "custom"
self.root=root
# Devide the buffer into num_chunk_groups group
if num_ranks_per_node == -1:
self.num_ranks_per_node = num_ranks
Expand Down Expand Up @@ -76,6 +74,7 @@ class Broadcast(Collective):
def __init__(self, num_ranks, chunk_factor, inplace, root, create_all_chunks=False):
Collective.__init__(self, num_ranks, chunk_factor, inplace, root)
self.name = "broadcast"
self.root=root

# Initializes input buffer for an broadcast
def init_buffers(self):
Expand Down

0 comments on commit 80fb073

Please sign in to comment.