Skip to content

Commit 030a750

Browse files
author
Saeed Maleki
committed
clean ups
1 parent db171e0 commit 030a750

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

examples/mscclang/allgather_a100_pcie.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
from msccl.topologies import *
77
from msccl.language.collectives import AllGather
88

9-
# Allpairs allgather for A100
10-
def allgather_allpairs(gpus, instances, protocol):
9+
# Hierarchical allgather for A100
10+
def allgather_hier(gpus, instances, protocol):
1111
size = gpus
1212
chunksperloop = 1
1313
topology = fully_connected(gpus)
@@ -39,4 +39,4 @@ def allgather_allpairs(gpus, instances, protocol):
3939
parser.add_argument('--protocol', type=str, default='LL128', choices=['Simple', 'LL', 'LL128'], help ='NCCL protocol. Default: Simple')
4040
args = parser.parse_args()
4141

42-
allgather_allpairs(args.num_gpus, args.instances, args.protocol)
42+
allgather_hier(args.num_gpus, args.instances, args.protocol)

examples/mscclang/allgather_allpairs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
def allgather_allpairs(gpus, instances, protocol):
1111
size = gpus
1212
topology = fully_connected(gpus)
13-
collective = AllGather(size, size, True)
13+
collective = AllGather(size, 1, True)
1414

1515
with MSCCLProgram(f"allgather_allpairs", topology, collective, instances,
1616
protocol=protocol, threadblock_policy=ThreadblockPolicy.manual):
@@ -20,7 +20,7 @@ def allgather_allpairs(gpus, instances, protocol):
2020
for r2 in range(gpus):
2121
if r1 != r2:
2222
index = 0
23-
c = chunk(r1, Buffer.input, index, size)
23+
c = chunk(r1, Buffer.input, index, 1)
2424
c.copy(r2, Buffer.input, index, sendtb=r2, recvtb=r1)
2525
XML()
2626
Check()

0 commit comments

Comments
 (0)