Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
04707b09
Unverified
Commit
04707b09
authored
Aug 21, 2024
by
Yineng Zhang
Committed by
GitHub
Aug 21, 2024
Browse files
misc: add hypervisor vendor (#1165)
parent
ff2cfdb1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
python/sglang/check_env.py
python/sglang/check_env.py
+15
-0
No files found.
python/sglang/check_env.py
View file @
04707b09
...
@@ -170,6 +170,17 @@ def get_gpu_topology():
...
@@ -170,6 +170,17 @@ def get_gpu_topology():
return
None
return
None
def
get_hypervisor_vendor
():
try
:
output
=
subprocess
.
check_output
([
"lscpu"
],
text
=
True
)
for
line
in
output
.
split
(
"
\n
"
):
if
"Hypervisor vendor:"
in
line
:
return
line
.
split
(
":"
)[
1
].
strip
()
return
None
except
:
return
None
def
check_env
():
def
check_env
():
"""
"""
Check and print environment information.
Check and print environment information.
...
@@ -184,6 +195,10 @@ def check_env():
...
@@ -184,6 +195,10 @@ def check_env():
if
gpu_topo
:
if
gpu_topo
:
env_info
[
"NVIDIA Topology"
]
=
gpu_topo
env_info
[
"NVIDIA Topology"
]
=
gpu_topo
hypervisor_vendor
=
get_hypervisor_vendor
()
if
hypervisor_vendor
:
env_info
[
"Hypervisor vendor"
]
=
hypervisor_vendor
ulimit_soft
,
_
=
resource
.
getrlimit
(
resource
.
RLIMIT_NOFILE
)
ulimit_soft
,
_
=
resource
.
getrlimit
(
resource
.
RLIMIT_NOFILE
)
env_info
[
"ulimit soft"
]
=
ulimit_soft
env_info
[
"ulimit soft"
]
=
ulimit_soft
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment