-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[Ascend] Add Ascend NPU support for sglang.check_env & rework proposal #11052
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
d53a613 to
bdc520b
Compare
ping1jing2
reviewed
Oct 16, 2025
ping1jing2
reviewed
Oct 16, 2025
ping1jing2
reviewed
Oct 16, 2025
ping1jing2
reviewed
Oct 16, 2025
ping1jing2
reviewed
Oct 16, 2025
87a1d28 to
797cbc9
Compare
Alcanderian
reviewed
Oct 17, 2025
ping1jing2
reviewed
Oct 18, 2025
ping1jing2
reviewed
Oct 18, 2025
ping1jing2
reviewed
Oct 18, 2025
ping1jing2
approved these changes
Oct 26, 2025
Alcanderian
approved these changes
Oct 31, 2025
sglang-bot
approved these changes
Nov 2, 2025
mingfeima
pushed a commit
to mingfeima/sglang
that referenced
this pull request
Nov 6, 2025
sgl-project#11052) Co-authored-by: ronnie_zheng <[email protected]>
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
The first commit adds Ascend NPU support for
sglang.check_envscript that allow users to export their environments for raising Github issues or other diagnostic purposes.The second commit refactors the script, which allows vendors to write difference version check procedures without breaking others' implemetation while avoiding naming confusion.
Modifications
We provide two implementations and request decision from the community.
Legacy approach
commit 1624b08
Add additional branches on the existing functions to get device information and driver/complier/toolkit version. Details are as follows,
get_cuda_info:torch_npuinterface differences.PACKAGE_LISTto avoid unnecessary package check for other hardwares._get_cuda_version_info: Use multiple environment variable to locate CANN path, fall back to default installation path if none of them works._get_nvcc_info:$CANN_HOME/version.cfg. The toolkit versioning rule is different with Bisheng compiler (unlike CUDA)._get_cuda_driver_version: Usenpu-smi info -t board -i 0to get driver version since driver applies for all NPUs in a single server.Class-based refractoring
commit 0acff70
As @Alcanderian pointed out, function name like
_get_cuda_version_infocan be ambiguous for inlcuding multiple hardware types, so we propose to rework the script as follows,BaseEnv: create a base environment checker class and move common helper functions into it, likeget_package_versions,get_device_info,get_hypervisor_vendorget_info(get cuda info) andget_topo(get device topology).__main__and callBaseEnv.check_env()to print the enviroment info.Accuracy Tests
Script output using Atlas 800T A2 server with
main-910bdocker image.Script output on H20 with
lmsysorg/sglang:v0.5.3.post1-cu129-amd64dockerBenchmarking and Profiling
Not applicable
Checklist