forked from vllm-project/vllm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CI] Add Buildkite (vllm-project#2355)
- Loading branch information
Showing
13 changed files
with
192 additions
and
37 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# This script is run by buildkite to run the benchmarks and upload the results to buildkite | ||
|
||
set -ex | ||
|
||
# cd into parent directory of this file | ||
cd "$(dirname "${BASH_SOURCE[0]}")/.." | ||
|
||
# run benchmarks and upload the result to buildkite | ||
python3 benchmarks/benchmark_latency.py 2>&1 | tee benchmark_latency.txt | ||
|
||
python3 benchmarks/benchmark_throughput.py --input-len 256 --output-len 256 2>&1 | tee benchmark_throughput.txt | ||
|
||
# write the results into a markdown file | ||
echo "### Latency Benchmarks" >> benchmark_results.md | ||
sed -n '1p' benchmark_latency.txt >> benchmark_results.md | ||
echo "" >> benchmark_results.md | ||
sed -n '$p' benchmark_latency.txt >> benchmark_results.md | ||
echo "### Throughput Benchmarks" >> benchmark_results.md | ||
sed -n '1p' benchmark_throughput.txt >> benchmark_results.md | ||
echo "" >> benchmark_results.md | ||
sed -n '$p' benchmark_throughput.txt >> benchmark_results.md | ||
|
||
# upload the results to buildkite | ||
/workspace/buildkite-agent annotate --style "info" --context "benchmark-results" < benchmark_results.md |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# In this file, you can add more tests to run either by adding a new step or | ||
# adding a new command to an existing step. See different options here for examples. | ||
# This script will be feed into Jinja template in `test-template.j2` to generate | ||
# the final pipeline yaml file. | ||
|
||
steps: | ||
- label: Regression Test | ||
command: pytest -v -s test_regression.py | ||
working_dir: "/vllm-workspace/tests" # optional | ||
|
||
- label: AsyncEngine Test | ||
command: pytest -v -s async_engine | ||
|
||
- label: Distributed Test | ||
command: pytest -v -s test_comm_ops.py | ||
working_dir: "/vllm-workspace/tests/distributed" | ||
num_gpus: 2 # only support 1 or 2 for now. | ||
|
||
- label: Engine Test | ||
command: pytest -v -s engine | ||
|
||
- label: Kernels Test | ||
command: pytest -v -s kernels | ||
soft_fail: true | ||
|
||
- label: Models Test | ||
commands: | ||
- pytest -v -s models --forked | ||
soft_fail: true | ||
|
||
- label: Samplers Test | ||
command: pytest -v -s samplers --forked | ||
|
||
- label: Worker Test | ||
command: pytest -v -s worker | ||
|
||
- label: Benchmarks | ||
working_dir: "/vllm-workspace/.buildkite" | ||
commands: | ||
- pip install aiohttp | ||
- bash run-benchmarks.sh |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{% set docker_image = "us-central1-docker.pkg.dev/vllm-405802/vllm-ci-test-repo/vllm-test:$BUILDKITE_COMMIT" %} | ||
{% set default_num_gpu = 1 %} | ||
{% set default_working_dir = "/vllm-workspace/tests" %} | ||
|
||
steps: | ||
- label: ":docker: build image" | ||
commands: | ||
- "docker build --tag {{ docker_image }} --target test --progress plain ." | ||
- "docker push {{ docker_image }}" | ||
env: | ||
DOCKER_BUILDKIT: "1" | ||
- wait | ||
|
||
{% for step in steps %} | ||
- label: "{{ step.label }}" | ||
agents: | ||
queue: kubernetes | ||
soft_fail: {{ step.soft_fail or false }} | ||
plugins: | ||
- kubernetes: | ||
podSpec: | ||
volumes: | ||
- name: dshm | ||
emptyDir: | ||
medium: Memory | ||
containers: | ||
- image: "{{ docker_image }}" | ||
command: ["bash"] | ||
args: | ||
- "-c" | ||
- "'cd {{ (step.working_dir or default_working_dir) | safe }} && {{ step.command or (step.commands | join(' && ')) | safe }}'" | ||
resources: | ||
requests: | ||
nvidia.com/gpu: "{{ step.num_gpus or default_num_gpu }}" | ||
limits: | ||
nvidia.com/gpu: "{{ step.num_gpus or default_num_gpu }}" | ||
env: | ||
- name: HF_TOKEN | ||
valueFrom: | ||
secretKeyRef: | ||
name: hf-token-secret | ||
key: token | ||
volumeMounts: | ||
- mountPath: /dev/shm | ||
name: dshm | ||
{% endfor %} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.