[NPU][CI] Add CANN 9.1.0 and Ascend a5 nightly suites (#38833)
This commit is contained in:
+143
@@ -0,0 +1,143 @@
|
||||
import unittest
|
||||
|
||||
from sglang.test.ascend.e2e.test_npu_accuracy_utils import (
|
||||
BENCHMARK_TOOL_DEFAULT,
|
||||
TestNpuAccuracyTestCaseBase,
|
||||
)
|
||||
from sglang.test.ascend.e2e.test_npu_performance_utils import (
|
||||
DEEPSEEK_V4_FLASH_DEFAULT_MODEL_PATH,
|
||||
)
|
||||
from sglang.test.ci.ci_register import register_npu_ci
|
||||
|
||||
register_npu_ci(
|
||||
est_time=7200,
|
||||
suite="nightly-acc-4-npu-a5",
|
||||
nightly=True,
|
||||
)
|
||||
|
||||
DEEPSEEK_V4_FLASH_FP8_4P_ENVS = {
|
||||
"PYTORCH_NPU_ALLOC_CONF": "expandable_segments:True",
|
||||
"STREAMS_PER_DEVICE": "32",
|
||||
"SGLANG_SET_CPU_AFFINITY": "1",
|
||||
"TASK_QUEUE_ENABLE": "1",
|
||||
"INF_NAN_MODE_FORCE_DISABLE": "1",
|
||||
"SGLANG_DEFAULT_THINKING": "1",
|
||||
"SGLANG_DSV4_REASONING_EFFORT": "max",
|
||||
# HCCL deepep
|
||||
"HCCL_BUFFSIZE": "1024",
|
||||
"HCCL_SOCKET_IFNAME": "lo",
|
||||
"GLOO_SOCKET_IFNAME": "lo",
|
||||
# DeepEP long-sequence normal combine (ROUND * TOKENS >= chunked_prefill_size / tp * dp)
|
||||
"DEEPEP_NORMAL_COMBINE_ENABLE_LONG_SEQ": "1",
|
||||
"DEEPEP_NORMAL_LONG_SEQ_ROUND": "16",
|
||||
"DEEPEP_NORMAL_LONG_SEQ_PER_ROUND_TOKENS": "2048",
|
||||
# "DEEPEP_HYBRID_DEPLOYMENT": "1",
|
||||
# dsv4
|
||||
"IS_DEEPSEEK_V4": "1",
|
||||
"USE_FUSED_HC_PRE_ASCENDC": "1",
|
||||
"SGLANG_DSV4_NPU_FUSED_COMPRESSOR": "1",
|
||||
"SGLANG_DSV4_NPU_FUSED_COMPRESSOR_PREFILL": "1",
|
||||
# skip gpu branch
|
||||
"SGLANG_OPT_USE_OVERLAP_STORE_CACHE": "False",
|
||||
"FORCE_DRAFT_MODEL_NON_QUANT": "1",
|
||||
"SGLANG_DSV4_FP4_EXPERTS": "True",
|
||||
"SGLANG_OPT_FUSE_WQA_WKV": "0",
|
||||
"SGLANG_OPT_BF16_FP32_GEMM_ALGO": "torch",
|
||||
"SGLANG_OPT_USE_FUSED_HASH_TOPK": "False",
|
||||
"SGLANG_OPT_USE_TILELANG_MHC_PRE": "False",
|
||||
"SGLANG_OPT_DEEPGEMM_HC_PRENORM": "False",
|
||||
"SGLANG_OPT_USE_TILELANG_MHC_POST": "False",
|
||||
"SGLANG_OPT_FP8_WO_A_GEMM": "False",
|
||||
# performance
|
||||
"SGLANG_ENABLE_OVERLAP_PLAN_STREAM": "1",
|
||||
"SGLANG_NPU_USE_MULTI_STREAM": "1",
|
||||
"USE_NPU_MOE_GATING_TOP_K": "1",
|
||||
"SGLANG_PROFILE_WITH_STACK": "False",
|
||||
}
|
||||
|
||||
DEEPSEEK_V4_FLASH_FP8_4P_OTHER_ARGS = [
|
||||
"--page-size",
|
||||
128,
|
||||
"--tp-size",
|
||||
4,
|
||||
"--trust-remote-code",
|
||||
"--attention-backend",
|
||||
"dsv4",
|
||||
"--device",
|
||||
"npu",
|
||||
"--watchdog-timeout",
|
||||
9000,
|
||||
"--mem-fraction-static",
|
||||
0.72,
|
||||
"--max-running-requests",
|
||||
64,
|
||||
"--chunked-prefill-size",
|
||||
131072,
|
||||
"--max-prefill-tokens",
|
||||
131072,
|
||||
"--cuda-graph-bs-decode",
|
||||
1,
|
||||
2,
|
||||
4,
|
||||
8,
|
||||
10,
|
||||
16,
|
||||
"--kv-cache-dtype",
|
||||
"auto",
|
||||
"--enable-dp-lm-head",
|
||||
"--disable-radix-cache",
|
||||
"--enable-dp-attention",
|
||||
"--dp-size",
|
||||
4,
|
||||
"--reasoning-parser",
|
||||
"deepseek-v4",
|
||||
"--speculative-algorithm",
|
||||
"EAGLE",
|
||||
"--speculative-num-steps",
|
||||
2,
|
||||
"--speculative-eagle-topk",
|
||||
1,
|
||||
"--speculative-num-draft-tokens",
|
||||
3,
|
||||
"--quantization",
|
||||
"fp8",
|
||||
"--moe-a2a-backend",
|
||||
"deepep",
|
||||
"--deepep-mode",
|
||||
"auto",
|
||||
]
|
||||
|
||||
DEEPSEEK_V4_FLASH_FP8_4P_GENERATION_CONFIG_MAX = {
|
||||
"max_tokens": 125000,
|
||||
"top_p": 1,
|
||||
"temperature": 1,
|
||||
"n": 1,
|
||||
"extra_body": {
|
||||
"chat_template_kwargs": {"thinking": True, "reasoning_effort": "max"}
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
class TestNPUDeepSeekV4FlashFP84PGPQA(TestNpuAccuracyTestCaseBase):
|
||||
"""Test NPU accuracy for DeepSeek-V4-Flash FP8 4p EAGLE GPQA."""
|
||||
|
||||
benchmark_tool = BENCHMARK_TOOL_DEFAULT
|
||||
model = DEEPSEEK_V4_FLASH_DEFAULT_MODEL_PATH
|
||||
other_args = DEEPSEEK_V4_FLASH_FP8_4P_OTHER_ARGS
|
||||
envs = DEEPSEEK_V4_FLASH_FP8_4P_ENVS
|
||||
accuracy = 0.874
|
||||
datasets = ["gpqa_diamond"]
|
||||
few_shot_num = 0
|
||||
generation_config = DEEPSEEK_V4_FLASH_FP8_4P_GENERATION_CONFIG_MAX
|
||||
eval_batch_size = 128
|
||||
stream = True
|
||||
timeout = 6000
|
||||
seed = 1
|
||||
|
||||
def test_npu_deepseek_v4_flash_fp8_4p_gpqa(self):
|
||||
"""Run NPU accuracy test for DeepSeek-V4-Flash FP8 4p EAGLE GPQA."""
|
||||
self.run_accuracy()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
+6
@@ -15,6 +15,12 @@ register_npu_ci(
|
||||
nightly=True,
|
||||
)
|
||||
|
||||
register_npu_ci(
|
||||
est_time=7200,
|
||||
suite="nightly-acc-16-npu-a3-cann910",
|
||||
nightly=True,
|
||||
)
|
||||
|
||||
DEEPSEEK_V4_FLASH_W8A8_DSPARK_8P_ENVS = {
|
||||
"PYTORCH_NPU_ALLOC_CONF": "expandable_segments:True",
|
||||
"STREAMS_PER_DEVICE": "32",
|
||||
|
||||
-132
@@ -1,132 +0,0 @@
|
||||
import unittest
|
||||
|
||||
from sglang.test.ascend.e2e.test_npu_performance_utils import (
|
||||
AISBENCHMARK_DATASET_DEFAULT,
|
||||
BENCHMARK_TOOL_DEFAULT,
|
||||
DEEPSEEK_V4_FLASH_0731_W8A8_MODEL_PATH,
|
||||
TestNpuPerformanceTestCaseBase,
|
||||
)
|
||||
from sglang.test.ci.ci_register import register_npu_ci
|
||||
|
||||
register_npu_ci(est_time=1800, suite="nightly-perf-16-npu-a3", nightly=True)
|
||||
|
||||
# Environment variables for DSV4-Flash single-node PD-mix deployment.
|
||||
DEEPSEEK_V4_FLASH_W8A8_8P_ENVS = {
|
||||
"PYTORCH_NPU_ALLOC_CONF": "expandable_segments:True",
|
||||
"STREAMS_PER_DEVICE": "32",
|
||||
"INF_NAN_MODE_FORCE_DISABLE": "1",
|
||||
"SGLANG_SET_CPU_AFFINITY": "1",
|
||||
"HCCL_SOCKET_IFNAME": "lo",
|
||||
"GLOO_SOCKET_IFNAME": "lo",
|
||||
"HCCL_OP_EXPANSION_MODE": "AIV",
|
||||
"USE_NPU_MOE_GATING_TOP_K": "1",
|
||||
"SGLANG_NPU_USE_MULTI_STREAM": "1",
|
||||
# deepep
|
||||
"DEEP_NORMAL_MODE_USE_INT8_QUANT": "1",
|
||||
"DEEPEP_HCCL_BUFFSIZE": "2048",
|
||||
"SGLANG_DEEPEP_NUM_MAX_DISPATCH_TOKENS_PER_RANK": "35",
|
||||
"DEEPEP_HYBRID_DEPLOYMENT": "1",
|
||||
# war barrier
|
||||
"SGLANG_ENABLE_WAR_BARRIER": "1",
|
||||
"SGLANG_FORCE_COARSE_WAR_BARRIER": "1",
|
||||
# skip gpu branch
|
||||
"SGLANG_OPT_FP8_WO_A_GEMM": "0",
|
||||
"SGLANG_OPT_USE_OVERLAP_STORE_CACHE": "False",
|
||||
"FORCE_DRAFT_MODEL_NON_QUANT": "1",
|
||||
"SGLANG_DSV4_FP4_EXPERTS": "False",
|
||||
"SGLANG_OPT_FUSE_WQA_WKV": "0",
|
||||
"SGLANG_OPT_BF16_FP32_GEMM_ALGO": "torch",
|
||||
"SGLANG_OPT_USE_FUSED_HASH_TOPK": "False",
|
||||
"SGLANG_OPT_USE_TILELANG_MHC_PRE": "False",
|
||||
"SGLANG_OPT_DEEPGEMM_HC_PRENORM": "False",
|
||||
"SGLANG_OPT_USE_TILELANG_MHC_POST": "False",
|
||||
# mtp
|
||||
"SGLANG_ENABLE_SPEC_V2": "1",
|
||||
"SGLANG_ENABLE_OVERLAP_PLAN_STREAM": "1",
|
||||
}
|
||||
|
||||
# Server launch arguments for DSV4-Flash W8A8 single-node 8p PD-mix.
|
||||
DEEPSEEK_V4_FLASH_W8A8_8P_OTHER_ARGS = [
|
||||
"--page-size",
|
||||
128,
|
||||
"--tp-size",
|
||||
16,
|
||||
"--trust-remote-code",
|
||||
"--device",
|
||||
"npu",
|
||||
"--prefill-max-requests",
|
||||
32,
|
||||
"--max-prefill-tokens",
|
||||
80000,
|
||||
"--attention-backend",
|
||||
"dsv4",
|
||||
"--watchdog-timeout",
|
||||
9000,
|
||||
"--mem-fraction-static",
|
||||
0.68,
|
||||
"--chunked-prefill-size",
|
||||
131072,
|
||||
"--max-running-requests",
|
||||
64,
|
||||
"--dp-size",
|
||||
16,
|
||||
"--enable-dp-attention",
|
||||
"--moe-a2a-backend",
|
||||
"deepep",
|
||||
"--deepep-mode",
|
||||
"auto",
|
||||
"--quantization",
|
||||
"modelslim",
|
||||
"--enable-dp-lm-head",
|
||||
"--kv-cache-dtype",
|
||||
"bfloat16",
|
||||
"--skip-server-warmup",
|
||||
"--cuda-graph-bs-decode",
|
||||
1,
|
||||
2,
|
||||
4,
|
||||
8,
|
||||
# MTP (EAGLE) configuration.
|
||||
"--speculative-algorithm",
|
||||
"EAGLE",
|
||||
"--speculative-num-steps",
|
||||
2,
|
||||
"--speculative-eagle-topk",
|
||||
1,
|
||||
"--speculative-num-draft-tokens",
|
||||
3,
|
||||
"--ep-size",
|
||||
16,
|
||||
"--disable-radix-cache",
|
||||
]
|
||||
|
||||
|
||||
class TestNPUDeepSeekV4FlashW8A88PIn32kOut1k50ms(TestNpuPerformanceTestCaseBase):
|
||||
"""Test NPU performance for DeepSeek-V4-Flash W8A8 8p in32k out1k."""
|
||||
|
||||
benchmark_tool = BENCHMARK_TOOL_DEFAULT
|
||||
dataset_type = AISBENCHMARK_DATASET_DEFAULT
|
||||
model = DEEPSEEK_V4_FLASH_0731_W8A8_MODEL_PATH
|
||||
other_args = DEEPSEEK_V4_FLASH_W8A8_8P_OTHER_ARGS
|
||||
envs = DEEPSEEK_V4_FLASH_W8A8_8P_ENVS
|
||||
dataset_name = "random"
|
||||
dataset_path = "/root/.cache/modelscope/hub/datasets/gsm8k_deepseekv4/cache0_32000/formal_run1_64_32000_cache0.json"
|
||||
input_len = 32000
|
||||
output_len = 1000
|
||||
num_prompts = 64
|
||||
max_concurrency = 64
|
||||
random_range_ratio = 1
|
||||
warmup_requests = 16
|
||||
request_rate = float("inf")
|
||||
seed = 1
|
||||
tpot = 50
|
||||
max_attempts = 3
|
||||
output_token_throughput = 927
|
||||
|
||||
def test_npu_deepseek_v4_flash_w8a8_8p_in32k_out1k_50ms(self):
|
||||
"""Run NPU performance test for DeepSeek-V4-Flash W8A8 8p in32k out1k."""
|
||||
self.run_throughput()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
+1
@@ -9,6 +9,7 @@ from sglang.test.ascend.e2e.test_npu_performance_utils import (
|
||||
from sglang.test.ci.ci_register import register_npu_ci
|
||||
|
||||
register_npu_ci(est_time=1800, suite="nightly-perf-16-npu-a3", nightly=True)
|
||||
register_npu_ci(est_time=1800, suite="nightly-perf-16-npu-a3-cann910", nightly=True)
|
||||
|
||||
# Environment variables for DSV4-Flash single-node PD-mix deployment.
|
||||
DEEPSEEK_V4_FLASH_W8A8_8P_ENVS = {
|
||||
|
||||
@@ -170,9 +170,12 @@ NIGHTLY_SUITES = {
|
||||
"nightly-acc-2-npu-a3",
|
||||
"nightly-acc-8-npu-a3",
|
||||
"nightly-acc-16-npu-a3",
|
||||
"nightly-acc-4-npu-a5",
|
||||
"nightly-perf-2-npu-a3",
|
||||
"nightly-perf-4-npu-a3",
|
||||
"nightly-perf-16-npu-a3",
|
||||
"nightly-perf-16-npu-a3-cann910",
|
||||
"nightly-acc-16-npu-a3-cann910",
|
||||
"full-4-npu-a2",
|
||||
"full-1-npu-a3",
|
||||
"full-2-npu-a3",
|
||||
|
||||
Reference in New Issue
Block a user