diff --git a/python/mscclpp/default_algos/send_recv.py b/python/mscclpp/default_algos/send_recv.py index 08a49ad2..2127eb91 100644 --- a/python/mscclpp/default_algos/send_recv.py +++ b/python/mscclpp/default_algos/send_recv.py @@ -21,7 +21,7 @@ def send_recv_test(name, nnodes, gpus_per_node, split_mask): use_double_scratch_buffer=False, min_message_size=0, max_message_size=2**64 - 1, - instances=1 + instances=4 ): # Creating separate port channels for next and prev directions. # When prev and next are the same peer (e.g., 2-node ring), both channels go to the same peer diff --git a/test.json b/test.json index 511b7907..4f412033 100644 --- a/test.json +++ b/test.json @@ -7,8 +7,8 @@ "gpus": [ { "id": 0, - "input_chunks": 1, - "output_chunks": 1, + "input_chunks": 4, + "output_chunks": 4, "scratch_chunks": 0, "threadblocks": [ { @@ -64,7 +64,7 @@ { "channel_type": "port", "channel_ids": [ - 1, + 4, 0 ] } @@ -77,12 +77,219 @@ ] } ] + }, + { + "id": 1, + "ops": [ + { + "name": "signal", + "channel_ids": [ + 0 + ], + "channel_type": "port" + }, + { + "name": "wait", + "channel_ids": [ + 1 + ], + "channel_type": "port" + }, + { + "name": "nop" + }, + { + "name": "pws", + "src_buff": [ + { + "type": "i", + "index": 1, + "size": 1 + } + ], + "dst_buff": [ + { + "buffer_id": 0, + "index": 1, + "size": 1 + } + ], + "channel_ids": [ + 1 + ], + "channel_type": "port" + }, + { + "name": "wait", + "channel_ids": [ + 0 + ], + "channel_type": "port" + } + ], + "channels": [ + { + "channel_type": "port", + "channel_ids": [ + 5, + 1 + ] + } + ], + "remote_buffer_refs": [ + { + "access_channel_type": "port", + "remote_buffer_ids": [ + 0 + ] + } + ] + }, + { + "id": 2, + "ops": [ + { + "name": "signal", + "channel_ids": [ + 0 + ], + "channel_type": "port" + }, + { + "name": "wait", + "channel_ids": [ + 1 + ], + "channel_type": "port" + }, + { + "name": "nop" + }, + { + "name": "pws", + "src_buff": [ + { + "type": "i", + "index": 2, + "size": 1 + } + ], + "dst_buff": [ + { + "buffer_id": 0, + "index": 2, + "size": 1 + } + ], + "channel_ids": [ + 1 + ], + "channel_type": "port" + }, + { + "name": "wait", + "channel_ids": [ + 0 + ], + "channel_type": "port" + } + ], + "channels": [ + { + "channel_type": "port", + "channel_ids": [ + 6, + 2 + ] + } + ], + "remote_buffer_refs": [ + { + "access_channel_type": "port", + "remote_buffer_ids": [ + 0 + ] + } + ] + }, + { + "id": 3, + "ops": [ + { + "name": "signal", + "channel_ids": [ + 0 + ], + "channel_type": "port" + }, + { + "name": "wait", + "channel_ids": [ + 1 + ], + "channel_type": "port" + }, + { + "name": "nop" + }, + { + "name": "pws", + "src_buff": [ + { + "type": "i", + "index": 3, + "size": 1 + } + ], + "dst_buff": [ + { + "buffer_id": 0, + "index": 3, + "size": 1 + } + ], + "channel_ids": [ + 1 + ], + "channel_type": "port" + }, + { + "name": "wait", + "channel_ids": [ + 0 + ], + "channel_type": "port" + } + ], + "channels": [ + { + "channel_type": "port", + "channel_ids": [ + 7, + 3 + ] + } + ], + "remote_buffer_refs": [ + { + "access_channel_type": "port", + "remote_buffer_ids": [ + 0 + ] + } + ] } ], "channels": [ { "channel_type": "port", "connected_to": [ + 1, + 1, + 1, + 1, + 1, + 1, 1, 1 ] @@ -101,8 +308,8 @@ }, { "id": 1, - "input_chunks": 1, - "output_chunks": 1, + "input_chunks": 4, + "output_chunks": 4, "scratch_chunks": 0, "threadblocks": [ { @@ -159,7 +366,208 @@ "channel_type": "port", "channel_ids": [ 0, + 4 + ] + } + ], + "remote_buffer_refs": [ + { + "access_channel_type": "port", + "remote_buffer_ids": [ + 0 + ] + } + ] + }, + { + "id": 1, + "ops": [ + { + "name": "signal", + "channel_ids": [ + 0 + ], + "channel_type": "port" + }, + { + "name": "wait", + "channel_ids": [ 1 + ], + "channel_type": "port" + }, + { + "name": "nop" + }, + { + "name": "pws", + "src_buff": [ + { + "type": "i", + "index": 1, + "size": 1 + } + ], + "dst_buff": [ + { + "buffer_id": 0, + "index": 1, + "size": 1 + } + ], + "channel_ids": [ + 1 + ], + "channel_type": "port" + }, + { + "name": "wait", + "channel_ids": [ + 0 + ], + "channel_type": "port" + } + ], + "channels": [ + { + "channel_type": "port", + "channel_ids": [ + 1, + 5 + ] + } + ], + "remote_buffer_refs": [ + { + "access_channel_type": "port", + "remote_buffer_ids": [ + 0 + ] + } + ] + }, + { + "id": 2, + "ops": [ + { + "name": "signal", + "channel_ids": [ + 0 + ], + "channel_type": "port" + }, + { + "name": "wait", + "channel_ids": [ + 1 + ], + "channel_type": "port" + }, + { + "name": "nop" + }, + { + "name": "pws", + "src_buff": [ + { + "type": "i", + "index": 2, + "size": 1 + } + ], + "dst_buff": [ + { + "buffer_id": 0, + "index": 2, + "size": 1 + } + ], + "channel_ids": [ + 1 + ], + "channel_type": "port" + }, + { + "name": "wait", + "channel_ids": [ + 0 + ], + "channel_type": "port" + } + ], + "channels": [ + { + "channel_type": "port", + "channel_ids": [ + 2, + 6 + ] + } + ], + "remote_buffer_refs": [ + { + "access_channel_type": "port", + "remote_buffer_ids": [ + 0 + ] + } + ] + }, + { + "id": 3, + "ops": [ + { + "name": "signal", + "channel_ids": [ + 0 + ], + "channel_type": "port" + }, + { + "name": "wait", + "channel_ids": [ + 1 + ], + "channel_type": "port" + }, + { + "name": "nop" + }, + { + "name": "pws", + "src_buff": [ + { + "type": "i", + "index": 3, + "size": 1 + } + ], + "dst_buff": [ + { + "buffer_id": 0, + "index": 3, + "size": 1 + } + ], + "channel_ids": [ + 1 + ], + "channel_type": "port" + }, + { + "name": "wait", + "channel_ids": [ + 0 + ], + "channel_type": "port" + } + ], + "channels": [ + { + "channel_type": "port", + "channel_ids": [ + 3, + 7 ] } ], @@ -177,6 +585,12 @@ { "channel_type": "port", "connected_to": [ + 0, + 0, + 0, + 0, + 0, + 0, 0, 0 ]