Improve dp attention port assignment scheme (#5889)

Co-authored-by: Cheng Wan <cwan@x.ai>
This commit is contained in:
Yongtong Wu
2025-10-13 08:55:59 +08:00
committed by GitHub
parent 1bdd010291
commit a20e7df8d0
4 changed files with 175 additions and 44 deletions

View File

@@ -75,7 +75,8 @@ class TestPortArgs(unittest.TestCase):
server_args.nnodes = 1
server_args.dist_init_addr = "192.168.1.1:25000"
port_args = PortArgs.init_new(server_args, dp_rank=2)
worker_ports = [25006, 25007, 25008, 25009]
port_args = PortArgs.init_new(server_args, dp_rank=2, worker_ports=worker_ports)
self.assertTrue(port_args.scheduler_input_ipc_name.endswith(":25008"))