Add NPU basic function testcases#19382
Merged
iforgetmyname merged 45 commits intosgl-project:mainfrom Mar 16, 2026
Merged
Conversation
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Collaborator
|
/tag-and-rerun-ci |
| @classmethod | ||
| def setUpClass(cls): | ||
| cls.model = QWEN3_30B_A3B_WEIGHTS_PATH | ||
| cls.model = KIMI_K2_THINKING_WEIGHTS_PATH |
Collaborator
There was a problem hiding this comment.
we have qwen3-4b-thinking model & qwen3-30b-a3b-thinking model that shoud be suitable for this case
Collaborator
There was a problem hiding this comment.
this is a multimodal
2 tasks
…-pr-commit # Conflicts: # python/sglang/test/ascend/test_ascend_utils.py
iforgetmyname
approved these changes
Mar 16, 2026
Collaborator
iforgetmyname
left a comment
There was a problem hiding this comment.
try to avoid such a big pr later
Wangzheee
pushed a commit
to Wangzheee/sglang
that referenced
this pull request
Mar 21, 2026
Co-authored-by: cy <chenyang08056032@163.com> Co-authored-by: Cherry_ming <136634645@qq.com>
0-693
pushed a commit
to 0-693/sglang
that referenced
this pull request
Mar 25, 2026
Co-authored-by: cy <chenyang08056032@163.com> Co-authored-by: Cherry_ming <136634645@qq.com>
JustinTong0323
pushed a commit
to JustinTong0323/sglang
that referenced
this pull request
Apr 7, 2026
Co-authored-by: cy <chenyang08056032@163.com> Co-authored-by: Cherry_ming <136634645@qq.com>
yhyang201
pushed a commit
to yhyang201/sglang
that referenced
this pull request
Apr 22, 2026
Co-authored-by: cy <chenyang08056032@163.com> Co-authored-by: Cherry_ming <136634645@qq.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
This PR aims to comprehensively improve the test coverage of the Ascend (NPU) backend for the SGLang framework. A large number of targeted test cases have been added, and some existing test files have been optimized and adjusted. In total,48 files are involved (35 new files, 13 optimized files). The detailed changes are as follows:
1、Test Infrastructure Optimization
Adjusted the nightly-test-npu.yml workflow configuration, added the disaggregation_utils.py base class for PD disaggregation scenarios, and improved the test_ascend_utils.py test base class to support dependency management and model constant configuration for the new test cases.
2、Core Function Test Enhancement
Added dedicated test cases for basic functions including multi-level radix cache (L1/L2), expert parallelism, and speculative inference, covering validation for different input scenarios, models (DeepSeek, Qwen3, etc.), and performance metrics (TTFT).
3、Interface Layer Test Improvement
Fully supplemented Ascend platform API-related tests, covering scenarios such as chat/completions interfaces, function calling, stop matching, penalty, and profile performance analysis.
4、Model Test Iteration
Added or adjusted Ascend adaptation tests for various models including Gemma3, Phi4 multimodal, BGE reranker, and InternLM2 reward model; optimized existing test cases for models such as C4AI Command-R and DeepSeek V3.2. Slightly adjusted model test code for InternLM2, GLM4, etc., removed redundant logic, and improved the accuracy and integrity of test cases.
Modifications
1、Update nightly-test-npu.yml: Add test case dependency on third-party package installation.
2、Add disaggregation_utils.py:PD disaggregation scenario base class file.
3、Update the constant file test_ascend_utils.py, add model constants, and update model-related test cases.
4、Add model test cases, covering the models:
LLM Models, Reward Models, Rerank Models.
5、Add API test cases, covering the APIs:
/health; /health_generate; /ping; /model_info; /server_info; /get_load; /v1/models; /v1/models/{model:path}; /generate; /v1/chat/completions.
6、Add test cases for basic function:
L1 and L2 radix cache, deepep, speculative_inference.
Accuracy Tests
Benchmarking and Profiling
Checklist
Review Process
/tag-run-ci-label,/rerun-failed-ci,/tag-and-rerun-ci