Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
9743d64e
Unverified
Commit
9743d64e
authored
Dec 05, 2024
by
youkaichao
Committed by
GitHub
Dec 05, 2024
Browse files
[ci][build] add tests for python only compilation (#10915)
Signed-off-by:
youkaichao
<
youkaichao@gmail.com
>
parent
a4306527
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
8 deletions
+46
-8
.buildkite/test-pipeline.yaml
.buildkite/test-pipeline.yaml
+9
-2
setup.py
setup.py
+7
-6
tests/standalone_tests/lazy_torch_compile.py
tests/standalone_tests/lazy_torch_compile.py
+0
-0
tests/standalone_tests/python_only_compile.sh
tests/standalone_tests/python_only_compile.sh
+30
-0
No files found.
.buildkite/test-pipeline.yaml
View file @
9743d64e
...
@@ -50,9 +50,9 @@ steps:
...
@@ -50,9 +50,9 @@ steps:
-
tests/multimodal
-
tests/multimodal
-
tests/test_utils
-
tests/test_utils
-
tests/worker
-
tests/worker
-
tests/test
_
lazy_torch_compile.py
-
tests/
standalone_
test
s/
lazy_torch_compile.py
commands
:
commands
:
-
python3 test
_
lazy_torch_compile.py
-
python3
standalone_
test
s/
lazy_torch_compile.py
-
pytest -v -s mq_llm_engine
# MQLLMEngine
-
pytest -v -s mq_llm_engine
# MQLLMEngine
-
pytest -v -s async_engine
# AsyncLLMEngine
-
pytest -v -s async_engine
# AsyncLLMEngine
-
NUM_SCHEDULER_STEPS=4 pytest -v -s async_engine/test_async_llm_engine.py
-
NUM_SCHEDULER_STEPS=4 pytest -v -s async_engine/test_async_llm_engine.py
...
@@ -61,6 +61,13 @@ steps:
...
@@ -61,6 +61,13 @@ steps:
-
pytest -v -s test_utils.py
# Utils
-
pytest -v -s test_utils.py
# Utils
-
pytest -v -s worker
# Worker
-
pytest -v -s worker
# Worker
-
label
:
Python-only Installation Test
source_file_dependencies
:
-
tests/standalone_tests/python_only_compile.sh
-
setup.py
commands
:
-
bash standalone_tests/python_only_compile.sh
-
label
:
Basic Correctness Test
# 30min
-
label
:
Basic Correctness Test
# 30min
#mirror_hardwares: [amd]
#mirror_hardwares: [amd]
fast_check
:
true
fast_check
:
true
...
...
setup.py
View file @
9743d64e
...
@@ -465,14 +465,15 @@ def get_vllm_version() -> str:
...
@@ -465,14 +465,15 @@ def get_vllm_version() -> str:
if
envs
.
VLLM_TARGET_DEVICE
==
"empty"
:
if
envs
.
VLLM_TARGET_DEVICE
==
"empty"
:
version
+=
f
"
{
sep
}
empty"
version
+=
f
"
{
sep
}
empty"
elif
_is_cuda
():
elif
_is_cuda
():
if
envs
.
VLLM_USE_PRECOMPILED
:
version
+=
".precompiled"
else
:
cuda_version
=
str
(
get_nvcc_cuda_version
())
cuda_version
=
str
(
get_nvcc_cuda_version
())
if
cuda_version
!=
MAIN_CUDA_VERSION
:
if
cuda_version
!=
MAIN_CUDA_VERSION
:
cuda_version_str
=
cuda_version
.
replace
(
"."
,
""
)[:
3
]
cuda_version_str
=
cuda_version
.
replace
(
"."
,
""
)[:
3
]
# skip this for source tarball, required for pypi
# skip this for source tarball, required for pypi
if
"sdist"
not
in
sys
.
argv
:
if
"sdist"
not
in
sys
.
argv
:
version
+=
f
"
{
sep
}
cu
{
cuda_version_str
}
"
version
+=
f
"
{
sep
}
cu
{
cuda_version_str
}
"
if
envs
.
VLLM_USE_PRECOMPILED
:
version
+=
".precompiled"
elif
_is_hip
():
elif
_is_hip
():
# Get the HIP version
# Get the HIP version
hipcc_version
=
get_hipcc_rocm_version
()
hipcc_version
=
get_hipcc_rocm_version
()
...
...
tests/test
_
lazy_torch_compile.py
→
tests/
standalone_
test
s/
lazy_torch_compile.py
View file @
9743d64e
File moved
tests/standalone_tests/python_only_compile.sh
0 → 100644
View file @
9743d64e
#!/bin/bash
# This script tests if the python only compilation works correctly
# for users who do not have any compilers installed on their system
set
-e
set
-x
cd
/vllm-workspace/
# uninstall vllm
pip3 uninstall
-y
vllm
# restore the original files
mv
test_docs/vllm ./vllm
# remove all compilers
apt remove
--purge
build-essential
-y
apt autoremove
-y
echo
'import os; os.system("touch /tmp/changed.file")'
>>
vllm/__init__.py
VLLM_USE_PRECOMPILED
=
1 pip3
install
-vvv
-e
.
# Run the script
python3
-c
'import vllm'
# Check if the clangd log file was created
if
[
!
-f
/tmp/changed.file
]
;
then
echo
"changed.file was not created, python only compilation failed"
exit
1
fi
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