[router] add base_gpu_id server args & merged radix tree python reference (#2115)
This commit is contained in:
@@ -156,7 +156,7 @@ class DataParallelController:
|
||||
)
|
||||
for tp_rank in tp_rank_range:
|
||||
reader, writer = mp.Pipe(duplex=False)
|
||||
gpu_id = base_gpu_id + tp_rank % tp_size_per_node
|
||||
gpu_id = server_args.base_gpu_id + base_gpu_id + tp_rank % tp_size_per_node
|
||||
proc = mp.Process(
|
||||
target=run_scheduler_process,
|
||||
args=(server_args, port_args, gpu_id, tp_rank, dp_rank, writer),
|
||||
|
||||
@@ -1380,6 +1380,10 @@ def run_scheduler_process(
|
||||
dp_rank: Optional[int],
|
||||
pipe_writer,
|
||||
):
|
||||
# [For Router] if env var "DP_RANK" exist, set dp_rank to the value of the env var
|
||||
if dp_rank is None:
|
||||
dp_rank = int(os.getenv("DP_RANK", -1))
|
||||
|
||||
if dp_rank is None:
|
||||
configure_logger(server_args, prefix=f" TP{tp_rank}")
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user