From d004a15a3edf6f772b9552007d584d0c031495af Mon Sep 17 00:00:00 2001 From: pllimax Date: Wed, 29 Jul 2026 21:44:17 +0800 Subject: [PATCH] Fix GLM4-7B-Flash accuracy test configuration, tune Qwen3.6-27B/35B performance test parameters, and harden Ascend NPU multi-node E2E test utilities against pod name format errors. (#32371) --- .../test/ascend/e2e/run_npu_e2e_test.py | 4 ++- .../ascend/e2e/test_npu_multi_node_utils.py | 23 +++++++++++-- .../test_npu_glm4_7_flash_1p_aime25.py | 6 ++-- .../test_npu_qwen3_6_27b_1p_gpqa.py | 4 +++ ...pu_qwen3_6_27b_w8a8_2p_in16k_out1k_50ms.py | 33 ++++++++++++++----- ...pu_qwen3_6_35b_a3b_1p_in3k5_out1k5_50ms.py | 2 +- 6 files changed, 56 insertions(+), 16 deletions(-) diff --git a/python/sglang/test/ascend/e2e/run_npu_e2e_test.py b/python/sglang/test/ascend/e2e/run_npu_e2e_test.py index 4fff84480..28295fdda 100644 --- a/python/sglang/test/ascend/e2e/run_npu_e2e_test.py +++ b/python/sglang/test/ascend/e2e/run_npu_e2e_test.py @@ -310,7 +310,9 @@ def create_or_update_configmap(cm_name: str, data: dict, namespace: str): def prepare_cm_data(namespace, pod_string): """Prepare a configmap data: {pod_name: pod_ip} by the running pod's information.""" - pods = core_api.list_namespaced_pod(namespace=namespace) + pods = core_api.list_namespaced_pod( + namespace=namespace, label_selector="app=sgl-ascend" + ) data = {} for pod in pods.items: pod_name = pod.metadata.name diff --git a/python/sglang/test/ascend/e2e/test_npu_multi_node_utils.py b/python/sglang/test/ascend/e2e/test_npu_multi_node_utils.py index ed0f3191c..8653152c3 100644 --- a/python/sglang/test/ascend/e2e/test_npu_multi_node_utils.py +++ b/python/sglang/test/ascend/e2e/test_npu_multi_node_utils.py @@ -426,7 +426,12 @@ def check_role(allowed_roles: Union[str, Iterable[str]]): def launch_pd_mix_node(model_config): logger.info(f"Launch pd mix node start ......") host_name = get_host_name() - pod_index = int(host_name.rsplit("-", 1)[-1]) + last_part = host_name.rsplit("-", 1)[-1] + if not last_part.isdigit(): + raise RuntimeError( + f"Unexpected hostname format, expected numeric suffix: {host_name}" + ) + pod_index = int(last_part) # Monitor ConfigMap to generate dist-init-addr and node-rank is_ready = False @@ -497,7 +502,12 @@ def launch_pd_mix_node(model_config): def launch_pd_separation_node(model_config): logger.info(f"Launch pd separation node start ......") host_name = get_host_name() - pod_index = int(host_name.rsplit("-", 1)[-1]) + last_part = host_name.rsplit("-", 1)[-1] + if not last_part.isdigit(): + raise RuntimeError( + f"Unexpected hostname format, expected numeric suffix: {host_name}" + ) + pod_index = int(last_part) role = "prefill" if "prefill" in host_name else "decode" bootstrap_init_port = BOOTSTRAP_INIT_PORT @@ -717,7 +727,14 @@ def launch_router(model_config): node_ip_list.clear() for pod_name, pod_ip in configmap.data.items(): - pod_index = int(pod_name.rsplit("-", 1)[-1]) + # Skip unexpected entries that don't end with a numeric index + last_part = pod_name.rsplit("-", 1)[-1] + if not last_part.isdigit(): + logger.info( + "Skipping ConfigMap entry with non-numeric suffix: %s", pod_name + ) + continue + pod_index = int(last_part) if "prefill" in pod_name: if is_multi_node_prefill_instance: diff --git a/test/registered/ascend/accuracy/glm4_7_flash/test_npu_glm4_7_flash_1p_aime25.py b/test/registered/ascend/accuracy/glm4_7_flash/test_npu_glm4_7_flash_1p_aime25.py index 678aa21e5..679c78a4a 100644 --- a/test/registered/ascend/accuracy/glm4_7_flash/test_npu_glm4_7_flash_1p_aime25.py +++ b/test/registered/ascend/accuracy/glm4_7_flash/test_npu_glm4_7_flash_1p_aime25.py @@ -16,7 +16,7 @@ register_npu_ci( ENVS = { "PYTORCH_NPU_ALLOC_CONF": "expandable_segments:True", "STREAMS_PER_DEVICE": "32", - "HCCL_BUFFSIZE": "1000", + "DEEPEP_HCCL_BUFFSIZE": "1000", "HCCL_OP_EXPANSION_MODE": "AIV", "HCCL_SOCKET_IFNAME": "lo", "GLOO_SOCKET_IFNAME": "lo", @@ -57,12 +57,12 @@ OTHER_ARGS = [ ] -class TestNPUDeepSeek_V3_2_8P_AIME2025(TestNpuAccuracyTestCaseBase): +class TestNPUGLM_4_7_FLASH_1P_AIME25(TestNpuAccuracyTestCaseBase): model = GLM_4_7_FLASH_MODEL_PATH envs = ENVS other_args = OTHER_ARGS - accuracy = 0.916 + accuracy = 0.7667 datasets = ["aime25"] few_shot_num = 0 generation_config = {"max_tokens": 65536, "temperature": 1.0} diff --git a/test/registered/ascend/accuracy/qwen3_6_27b/test_npu_qwen3_6_27b_1p_gpqa.py b/test/registered/ascend/accuracy/qwen3_6_27b/test_npu_qwen3_6_27b_1p_gpqa.py index 72c8acdc0..ca8edf142 100644 --- a/test/registered/ascend/accuracy/qwen3_6_27b/test_npu_qwen3_6_27b_1p_gpqa.py +++ b/test/registered/ascend/accuracy/qwen3_6_27b/test_npu_qwen3_6_27b_1p_gpqa.py @@ -76,6 +76,10 @@ QWEN3_6_27B_64K_PREFIX_OTHER_ARGS = [ 1, "--speculative-num-draft-tokens", 4, + "--reasoning-parser", + "qwen3", + "--tool-call-parser", + "qwen3_coder", ] diff --git a/test/registered/ascend/performance/qwen3_6_27b/test_npu_qwen3_6_27b_w8a8_2p_in16k_out1k_50ms.py b/test/registered/ascend/performance/qwen3_6_27b/test_npu_qwen3_6_27b_w8a8_2p_in16k_out1k_50ms.py index 8e497ff7f..d1e823bcd 100644 --- a/test/registered/ascend/performance/qwen3_6_27b/test_npu_qwen3_6_27b_w8a8_2p_in16k_out1k_50ms.py +++ b/test/registered/ascend/performance/qwen3_6_27b/test_npu_qwen3_6_27b_w8a8_2p_in16k_out1k_50ms.py @@ -21,9 +21,10 @@ QWEN3_6_27B_16K_1k_ENVS = { "GLOO_SOCKET_IFNAME": "lo", "HCCL_OP_EXPANSION_MODE": "AIV", "SGLANG_SET_CPU_AFFINITY": "1", + "SGLANG_ENABLE_SPEC_V2": "1", "SGLANG_ENABLE_OVERLAP_PLAN_STREAM": "1", "SGLANG_SCHEDULER_DECREASE_PREFILL_IDLE": "1", - "SGLANG_PREFILL_DELAYER_MAX_DELAY_PASSES": "100", + "SGLANG_PREFILL_DELAYER_MAX_DELAY_PASSES": "50", "GDN_ATTN_BACKEND_TRITON": "1", "ASCEND_USE_FIA": "1", } @@ -44,22 +45,37 @@ QWEN3_6_27B_16K_1k_OTHER_ARGS = [ "--disable-radix-cache", "--trust-remote-code", "--max-running-requests", - 29, + 37, "--max-mamba-cache-size", - 58, + 74, "--mem-fraction-static", - 0.68, + 0.70, "--cuda-graph-bs", 1, 2, + 3, + 4, + 6, 8, + 10, 12, + 14, 16, + 18, 20, + 21, + 23, 24, + 25, 26, + 27, 28, 29, + 30, + 31, + 33, + 35, + 37, "--quantization", "modelslim", "--dtype", @@ -69,11 +85,11 @@ QWEN3_6_27B_16K_1k_OTHER_ARGS = [ "--speculative-algorithm", "NEXTN", "--speculative-num-steps", - 3, + 4, "--speculative-eagle-topk", 1, "--speculative-num-draft-tokens", - 4, + 5, "--reasoning-parser", "qwen3", "--tool-call-parser", @@ -90,8 +106,9 @@ class TestNPUQwen3_6_27B_2P_In16k_Out1k_50ms(TestNpuPerformanceTestCaseBase): other_args = QWEN3_6_27B_16K_1k_OTHER_ARGS envs = QWEN3_6_27B_16K_1k_ENVS dataset_name = "random" - max_concurrency = 29 - num_prompts = 116 + max_concurrency = 37 + warmup_requests = 4 + num_prompts = 37 input_len = 16000 output_len = 1000 random_range_ratio = 1 diff --git a/test/registered/ascend/performance/qwen3_6_35b_a3b/test_npu_qwen3_6_35b_a3b_1p_in3k5_out1k5_50ms.py b/test/registered/ascend/performance/qwen3_6_35b_a3b/test_npu_qwen3_6_35b_a3b_1p_in3k5_out1k5_50ms.py index 825e4080e..3280f63ba 100644 --- a/test/registered/ascend/performance/qwen3_6_35b_a3b/test_npu_qwen3_6_35b_a3b_1p_in3k5_out1k5_50ms.py +++ b/test/registered/ascend/performance/qwen3_6_35b_a3b/test_npu_qwen3_6_35b_a3b_1p_in3k5_out1k5_50ms.py @@ -18,7 +18,7 @@ register_npu_ci( QWEN3_6_35B_A3B_3K5_1K5_ENVS = { "PYTORCH_NPU_ALLOC_CONF": "expandable_segments:True", "STREAMS_PER_DEVICE": "32", - "HCCL_BUFFSIZE": "1", + "HCCL_BUFFSIZE": "100", "HCCL_SOCKET_IFNAME": "lo", "GLOO_SOCKET_IFNAME": "lo", "HCCL_OP_EXPANSION_MODE": "AIV",