Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .buildkite/scripts/ci-fetch-log.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ fi
# Build-wide mode: fetch finished jobs matching $SCOPE.
[ -z "$OUT" ] || die "[output_file] is only valid when fetching a single job."

# shellcheck disable=SC2016 # single-quoted: these are awk field refs ($3/$4/$5), not shell vars
case "$SCOPE" in
failed) FILTER='$3 == "True" && $4 == "False" && $5 == "True"' ;;
soft) FILTER='$3 == "True" && $5 == "True"' ;;
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/scripts/docker-build-metadata-args.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if [[ -n "${BUILDKITE:-}" || -n "${BUILDKITE_COMMIT:-}" ]]; then
image_tag="${image_name}:nightly-${tag_commit}"
elif [[ "${variant}" == cu* ]]; then
cuda_variant="${variant%%-*}"
remaining_variant="${variant#${cuda_variant}}"
remaining_variant="${variant#"${cuda_variant}"}"
image_tag="${image_name}:${cuda_variant}-nightly-${tag_commit}${remaining_variant}"
else
image_tag="${image_name}:nightly-${tag_commit}${variant_suffix}"
Expand Down
19 changes: 15 additions & 4 deletions .buildkite/scripts/hardware_ci/run-amd-test.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#!/bin/bash

# shellcheck disable=SC2329 # Every function in this file is only ever reached
# transitively through handle_amd_runner_exit, the EXIT trap handler - shellcheck's
# unused-function check doesn't do full reachability analysis from an indirectly
# invoked entry point, so it flags the whole diagnostic-collection call chain as
# dead code even though it runs live on every nonzero exit.

# This script runs ROCm tests either directly in a native CI pod or inside the
# corresponding Docker container. Multi-node tests continue to use Docker.
#
Expand Down Expand Up @@ -1523,13 +1529,15 @@ fi
clear_ci_orchestration_env
if is_multi_node "$commands"; then
echo "--- Multi-node job detected"
export DCKR_VER=$(docker --version | sed 's/Docker version \(.*\), build .*/\1/')
DCKR_VER=$(docker --version | sed 's/Docker version \(.*\), build .*/\1/')
export DCKR_VER

# Parse the bracket syntax: prefix ; [node0_cmds] && [node1_cmds]
# BASH_REMATCH[1] = prefix (everything before first bracket)
# BASH_REMATCH[2] = comma-separated node0 commands
# BASH_REMATCH[3] = comma-separated node1 commands
if [[ "$commands" =~ ^(.*)\[(.*)"] && ["(.*)\]$ ]]; then
# shellcheck disable=SC2001 # verified equivalent behavior; TODO: switch to param expansion in a follow-up cleanup PR
prefix=$(echo "${BASH_REMATCH[1]}" | sed 's/;//g')
echo "PREFIX: ${prefix}"

Expand All @@ -1545,7 +1553,9 @@ if is_multi_node "$commands"; then
fi

for i in "${!node0[@]}"; do
# shellcheck disable=SC2001 # verified equivalent behavior; TODO: switch to param expansion in a follow-up cleanup PR
command_node_0=$(echo "${node0[i]}" | sed 's/\"//g')
# shellcheck disable=SC2001 # verified equivalent behavior; TODO: switch to param expansion in a follow-up cleanup PR
command_node_1=$(echo "${node1[i]}" | sed 's/\"//g')

step_cmd="./.buildkite/scripts/run-multi-node-test.sh /vllm-workspace/tests 2 2 ${image_name} '${command_node_0}' '${command_node_1}'"
Expand Down Expand Up @@ -1581,14 +1591,15 @@ else
ulimit_core_hard="-1"
fi
# Disable core dumps in the ROCm test container unless the ROCm debug agent is enabled
coredump_flags="--ulimit core=0:$ulimit_core_hard"
coredump_flags=(--ulimit "core=0:$ulimit_core_hard")
if [[ "$commands" == *"ROCm debug agent enabled"* ]]; then
# Works around https://github.com/rocm/rocm-systems/issues/6206
coredump_flags='-e HSA_COREDUMP_PATTERN="/tmp/gpucore.%p"'
coredump_flags=(-e 'HSA_COREDUMP_PATTERN="/tmp/gpucore.%p"')
else
echo "ROCm debug agent not enabled, coredumps are disabled in the test container."
fi

# shellcheck disable=SC2086 # word splitting is intentional: both hold multiple docker flags
docker run \
"${docker_run_terminal_args[@]}" \
--device /dev/kfd $BUILDKITE_AGENT_META_DATA_RENDER_DEVICES \
Expand All @@ -1597,7 +1608,7 @@ else
--shm-size=16gb \
--group-add "$render_gid" \
--rm \
$coredump_flags \
"${coredump_flags[@]}" \
-e HF_TOKEN \
-e "HF_HUB_DOWNLOAD_TIMEOUT=${HF_HUB_DOWNLOAD_TIMEOUT}" \
-e "HF_HUB_ETAG_TIMEOUT=${HF_HUB_ETAG_TIMEOUT}" \
Expand Down
132 changes: 66 additions & 66 deletions .buildkite/scripts/publish-release-images.sh

Large diffs are not rendered by default.

29 changes: 14 additions & 15 deletions .buildkite/scripts/run-multi-node-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,20 @@ start_network() {

start_nodes() {
for node in $(seq 0 $(($NUM_NODES-1))); do
if [ "$IS_ROCM" -eq 1 ]; then
GPU_DEVICES='--device /dev/kfd --device /dev/dri -e HIP_VISIBLE_DEVICES='
else
GPU_DEVICES='--gpus "device='
fi
DEVICE_LIST=""
for node_gpu in $(seq 0 $(($NUM_GPUS - 1))); do
DEVICE_NUM=$(($node * $NUM_GPUS + $node_gpu))
GPU_DEVICES+=$(($DEVICE_NUM))
DEVICE_LIST+=$(($DEVICE_NUM))
if [ "$node_gpu" -lt $(($NUM_GPUS - 1)) ]; then
GPU_DEVICES+=','
DEVICE_LIST+=','
fi
done
if [ "$IS_ROCM" -eq 0 ]; then
GPU_DEVICES+='"'
if [ "$IS_ROCM" -eq 1 ]; then
GPU_DEVICES=(--device /dev/kfd --device /dev/dri -e "HIP_VISIBLE_DEVICES=${DEVICE_LIST}")
else
# The literal quotes around device=... are required by docker's
# --gpus value parser when the device list itself contains commas.
GPU_DEVICES=(--gpus "\"device=${DEVICE_LIST}\"")
fi

# start the container in detached mode
Expand All @@ -67,7 +67,7 @@ start_nodes() {
# 3. map the huggingface cache directory to the container
# 3. assign ip addresses to the containers (head node: 192.168.10.10, worker nodes:
# starting from 192.168.10.11)
docker run -d $GPU_DEVICES --shm-size=10.24gb -e HF_TOKEN \
docker run -d "${GPU_DEVICES[@]}" --shm-size=10.24gb -e HF_TOKEN \
-v ~/.cache/huggingface:/root/.cache/huggingface --name "node$node" \
--network docker-net --ip 192.168.10.$((10 + $node)) --rm "$DOCKER_IMAGE" \
/bin/bash -c "tail -f /dev/null"
Expand Down Expand Up @@ -96,16 +96,15 @@ run_nodes() {
# we start the worker nodes first, in detached mode, and then start the head node
# in the foreground, so that the output of the head node is visible in the buildkite logs
for node in $(seq $(($NUM_NODES - 1)) -1 0); do
GPU_DEVICES='"device='
DEVICE_LIST=""
for node_gpu in $(seq 0 $(($NUM_GPUS - 1))); do
DEVICE_NUM=$(($node * $NUM_GPUS + $node_gpu))
GPU_DEVICES+=$(($DEVICE_NUM))
DEVICE_LIST+=$(($DEVICE_NUM))
if [ "$node_gpu" -lt $(($NUM_GPUS - 1)) ]; then
GPU_DEVICES+=','
DEVICE_LIST+=','
fi
done
GPU_DEVICES+='"'
echo "Running node$node with GPU devices: $GPU_DEVICES"
echo "Running node$node with GPU devices: $DEVICE_LIST"
if [ "$node" -ne 0 ]; then
docker exec -d "node$node" /bin/bash -c "cd $WORKING_DIR ; ${COMMANDS[$node]}"
else
Expand Down
1 change: 1 addition & 0 deletions .buildkite/scripts/tool_call/run-bfcl-eval.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ fi

# ---- Cleanup handler ----
SERVER_PID=""
# shellcheck disable=SC2329 # invoked via `trap cleanup EXIT` below
cleanup() {
if [ -n "$SERVER_PID" ]; then
echo "Stopping vLLM server (pid=$SERVER_PID)..."
Expand Down
4 changes: 2 additions & 2 deletions .buildkite/scripts/xpu/create-xpu-ecr-manifest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ REPO="vllm-release-repo"
ARCH_TAG="${BUILDKITE_COMMIT}-$(uname -m)-xpu"
PLATFORM_TAG="${BUILDKITE_COMMIT}-xpu"

aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin ${REGISTRY}
aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin "${REGISTRY}"
docker manifest rm "${REGISTRY}/${REPO}:${PLATFORM_TAG}" || true
docker manifest create "${REGISTRY}/${REPO}:${PLATFORM_TAG}" "${REGISTRY}/${REPO}:${ARCH_TAG}" --amend
docker manifest push ${REGISTRY}/${REPO}:${PLATFORM_TAG}
docker manifest push "${REGISTRY}/${REPO}:${PLATFORM_TAG}"
18 changes: 18 additions & 0 deletions .github/workflows/matchers/shellcheck.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"problemMatcher": [
{
"owner": "shellcheck",
"pattern": [
{
"regexp": "^(.+):(\\d+):(\\d+): (error|warning|note|info): (.+) \\[(SC\\d+)\\]$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5,
"code": 6
}
]
}
]
}
5 changes: 1 addition & 4 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,10 @@ jobs:
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
python-version: "3.12"
# Provide shellcheck on PATH so tools/pre_commit/shellcheck.sh skips its
# wget + tar -xJ self-download, which the self-hosted runner image lacks
# (no wget/xz). Pinned to shellcheck 0.10.0 to match the script's "stable".
- run: python -m pip install shellcheck-py==0.10.0.1
- run: echo "::add-matcher::.github/workflows/matchers/actionlint.json"
- run: echo "::add-matcher::.github/workflows/matchers/markdownlint.json"
- run: echo "::add-matcher::.github/workflows/matchers/mypy.json"
- run: echo "::add-matcher::.github/workflows/matchers/shellcheck.json"
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
with:
extra_args: --all-files --hook-stage manual
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ repos:
rev: v1.7.7
hooks:
- id: actionlint
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: 745eface02aef23e168a8afb6b5737818efbea95 # v0.11.0.1
hooks:
- id: shellcheck
args: ["-s", "bash", "--format=gcc"]
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.11.1
hooks:
Expand Down Expand Up @@ -195,11 +200,6 @@ repos:
entry: python tools/pre_commit/mypy.py "3.13"
<<: *mypy_common
stages: [manual] # Only run in CI
- id: shellcheck
name: Lint shell scripts
entry: tools/pre_commit/shellcheck.sh
language: script
types: [shell]
- id: png-lint
name: Lint PNG exports from excalidraw
entry: tools/pre_commit/png-lint.sh
Expand Down
9 changes: 5 additions & 4 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,14 @@ pre-commit install
### Installing dependencies

```bash
# If you are only making Python changes:
# Start with precompiled artifacts for an editable install:
VLLM_USE_PRECOMPILED=1 uv pip install -e . --torch-backend=auto

# If you are also making C/C++ changes:
uv pip install -e . --torch-backend=auto
```

For C/C++ or CUDA changes, follow the
[incremental compilation workflow](docs/contributing/incremental_build.md) to
configure and perform incremental builds.

### Tests

> Requires [Environment setup](#environment-setup) and [Installing dependencies](#installing-dependencies).
Expand Down
2 changes: 1 addition & 1 deletion build_vllm_ppc64le.sh
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ TEMP_BUILD_DIR=$(mktemp -d)
cd "${TEMP_BUILD_DIR}"
export BUILD_SOX=1 BUILD_KALDI=1 BUILD_RNNT=1 USE_FFMPEG=0 USE_ROCM=0 USE_CUDA=0
export TORCHAUDIO_TEST_ALLOW_SKIP_IF_NO_FFMPEG=1
git clone --recursive https://github.com/pytorch/audio.git -b v${TORCHAUDIO_VERSION}
git clone --recursive https://github.com/pytorch/audio.git -b "v${TORCHAUDIO_VERSION}"
cd audio
#patching
sed -i '
Expand Down
11 changes: 8 additions & 3 deletions docker/Dockerfile.xpu
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,11 @@ RUN --mount=type=cache,target=/root/.cache/uv \

FROM vllm-base AS ucx-nixl-build

ARG UCX_VERSION=v1.21.0-rc2
ARG NIXL_VERSION=v1.2.0
# Keep UCX_VERSION aligned with the UCX that NIXL itself builds against for this
# NIXL_VERSION (nixl contrib/Dockerfile.manylinux: ARG UCX_REF), so XPU runs the
# same UCX commit as the released nixl-cu* wheels rather than an untested pairing.
ARG UCX_VERSION=v1.21.x
ARG NIXL_VERSION=v1.3.2

# Build-time only: compiler, autotools, and verbs dev headers
RUN apt-get update -y && apt-get install -y --no-install-recommends \
Expand Down Expand Up @@ -198,7 +201,9 @@ RUN --mount=type=cache,target=/root/.cache/uv \

FROM vllm-base AS vllm-openai

ARG NIXL_VERSION=v1.2.0
# Must match the ucx-nixl-build stage above: ARG does not cross stages, so a stale
# value here installs a meta package that disagrees with the wheel built there.
ARG NIXL_VERSION=v1.3.2

# Copy compiled UCX runtime libraries and the pre-built NIXL wheel.
# No compiler or autotools are installed in this stage.
Expand Down
6 changes: 3 additions & 3 deletions docker/entrypoints/test_vllm_nonroot_entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ run_wrapper() {
_env="$_env $1"; shift
done
shift
# shellcheck disable=SC2086 # word splitting is intentional: $_env holds multiple NAME=value assignments
env -i PATH="$WORKDIR/bin:/usr/bin:/bin" $_env "$WRAPPER" "$@" > "$_out"
}

Expand Down Expand Up @@ -140,9 +141,8 @@ fake_passwd="$WORKDIR/fake-passwd-prepopulated"
printf 'vllm:x:%s:%s:vllm:/home/vllm:/bin/bash\n' "$current_uid" "$current_gid" > "$fake_passwd"
out="$WORKDIR/case6.out"
run_wrapper "$out" "HOME=$case5_home" "VLLM_PASSWD_FILE=$fake_passwd" -- --model foo
line_count="$(wc -l < "$fake_passwd")"
# NOTE: wc may count 0 or 1 depending on trailing newline; accept 1.
# More robust: count lines matching our UID.
# wc may count 0 or 1 depending on trailing newline, so count lines
# matching our UID instead for a robust check.
uid_lines="$(grep -c ":${current_uid}:" "$fake_passwd" || true)"
[ "$uid_lines" = "1" ] \
|| { echo "FAIL: case6: expected exactly one entry for UID $current_uid, got $uid_lines"; cat "$fake_passwd"; exit 1; }
Expand Down
1 change: 1 addition & 0 deletions docs/pre_run_check.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# shellcheck disable=SC2317 # code after the exit/exit-183 gate below is intentionally dead pending re-enablement (see line comment)
if [ "$READTHEDOCS_VERSION_TYPE" != "external" ]; then
echo "Not a PR build (version type=$READTHEDOCS_VERSION_TYPE); skipping pre-run-check gate."
exit 0
Expand Down
3 changes: 2 additions & 1 deletion rust/src/chat/src/parser/reasoning/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ impl ReasoningParserFactory {
.register_pattern("deepseek-v3", names::DEEPSEEK_V3)
.register_pattern("gemma-4", names::GEMMA4)
.register_pattern("gemma4", names::GEMMA4)
.register_pattern("qwen", names::QWEN3)
.register_pattern("qwq", names::DEEPSEEK_R1)
.register_pattern("qwen3", names::QWEN3)
.register_pattern("glm-5", names::GLM45)
.register_pattern("glm-4.7", names::GLM45)
.register_pattern("glm-4.6", names::GLM45)
Expand Down
17 changes: 17 additions & 0 deletions rust/src/chat/src/parser/reasoning/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,23 @@ fn factory_resolves_deepseek_v4_to_qwen3_alias() {
);
}

#[test]
fn factory_distinguishes_qwen_model_families() {
let factory = ReasoningParserFactory::new();
assert_eq!(
factory.resolve_name_for_model("Qwen/QwQ-32B"),
Some(names::DEEPSEEK_R1)
);
assert_eq!(
factory.resolve_name_for_model("Qwen/Qwen3-8B"),
Some(names::QWEN3)
);
assert_eq!(
factory.resolve_name_for_model("Qwen/Qwen2.5-0.5B-Instruct"),
None
);
}

#[test]
fn factory_routes_step3p5_models_to_dedicated_parser() {
let factory = ReasoningParserFactory::new();
Expand Down
5 changes: 3 additions & 2 deletions rust/src/chat/src/parser/tool/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,10 @@ impl ToolParserFactory {
.register_pattern("mistral-", names::MISTRAL)
.register_pattern("mixtral-", names::MISTRAL)
.register_pattern("qwen3-coder", names::QWEN3_CODER)
.register_pattern("qwen2.5-coder", names::QWEN3_CODER)
.register_pattern("qwen3.5", names::QWEN3_CODER)
.register_pattern("qwen", names::QWEN3_XML)
.register_pattern("qwq", names::HERMES)
.register_pattern("qwen2.5", names::HERMES)
.register_pattern("qwen3", names::QWEN3_XML)
.register_pattern("hermes", names::HERMES)
.register_pattern("hy3", names::HY_V3)
.register_pattern("hy_v3", names::HY_V3)
Expand Down
Loading
Loading