From 60b771c8154559fbf990db23278941605daf8d11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wang=20Ran=20=28=E6=B1=AA=E7=84=B6=29?= Date: Tue, 25 Feb 2025 08:51:23 +0800 Subject: [PATCH] Improve: fix typos (#3801) Co-authored-by: Chayenne --- python/sglang/srt/entrypoints/engine.py | 2 +- python/sglang/srt/managers/scheduler.py | 2 +- python/sglang/srt/utils.py | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/python/sglang/srt/entrypoints/engine.py b/python/sglang/srt/entrypoints/engine.py index ede57adce..1fb2f7c64 100644 --- a/python/sglang/srt/entrypoints/engine.py +++ b/python/sglang/srt/entrypoints/engine.py @@ -98,7 +98,7 @@ class Engine: kwargs["log_level"] = "error" server_args = ServerArgs(**kwargs) - # Shutdown the subprocesses automatically when the program exists + # Shutdown the subprocesses automatically when the program exits atexit.register(self.shutdown) # Launch subprocesses diff --git a/python/sglang/srt/managers/scheduler.py b/python/sglang/srt/managers/scheduler.py index 203e0dbf4..4cd69d0ed 100644 --- a/python/sglang/srt/managers/scheduler.py +++ b/python/sglang/srt/managers/scheduler.py @@ -1832,7 +1832,7 @@ def run_scheduler_process( if dp_rank is None and "SGLANG_DP_RANK" in os.environ: dp_rank = int(os.environ["SGLANG_DP_RANK"]) - # Configue the logger + # Configure the logger if dp_rank is None: configure_logger(server_args, prefix=f" TP{tp_rank}") else: diff --git a/python/sglang/srt/utils.py b/python/sglang/srt/utils.py index be3b82946..8f5227d51 100644 --- a/python/sglang/srt/utils.py +++ b/python/sglang/srt/utils.py @@ -1154,9 +1154,9 @@ def set_gpu_proc_affinity( if psutil.cpu_count() != psutil.cpu_count(logical=False): # HT on - upper_cpu_ids = [id for id in range(start_cpu_id, end_cpu_id)] - lower_cpu_ids = [id + total_pcores for id in range(start_cpu_id, end_cpu_id)] - bind_cpu_ids = list(itertools.chain(upper_cpu_ids, lower_cpu_ids)) + lower_cpu_ids = [id for id in range(start_cpu_id, end_cpu_id)] + upper_cpu_ids = [id + total_pcores for id in range(start_cpu_id, end_cpu_id)] + bind_cpu_ids = list(itertools.chain(lower_cpu_ids, upper_cpu_ids)) else: # HT off bind_cpu_ids = [id for id in range(start_cpu_id, end_cpu_id)]