mirror of
https://github.com/microsoft/mscclpp.git
synced 2026-05-13 01:36:10 +00:00
Get rid of comm.setup()
This commit is contained in:
committed by
Saeed Maleki
parent
0863e862f5
commit
8cb63a7d1a
@@ -35,15 +35,13 @@ def main(args):
|
||||
size = elements * memory.itemsize
|
||||
my_reg_mem = comm.register_memory(ptr, size, mscclpp.Transport.IB0)
|
||||
|
||||
conn = comm.connect_on_setup((rank + 1) % 2, 0, mscclpp.Transport.IB0)
|
||||
conn = comm.connect((rank + 1) % 2, 0, mscclpp.Transport.IB0)
|
||||
|
||||
other_reg_mem = None
|
||||
if rank == 0:
|
||||
other_reg_mem = comm.recv_memory_on_setup((rank + 1) % 2, 0)
|
||||
other_reg_mem = comm.recv_memory((rank + 1) % 2, 0)
|
||||
else:
|
||||
comm.send_memory_on_setup(my_reg_mem, (rank + 1) % 2, 0)
|
||||
|
||||
comm.setup()
|
||||
comm.send_memory(my_reg_mem, (rank + 1) % 2, 0)
|
||||
|
||||
if rank == 0:
|
||||
other_reg_mem = other_reg_mem.get()
|
||||
|
||||
Reference in New Issue
Block a user