Skip to content

Commit db6a4a4

Browse files
authored
Merge branch 'main' into main
2 parents 70c65ff + 67f9046 commit db6a4a4

472 files changed

Lines changed: 29835 additions & 2806 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.buildkite/hardware_tests/amd.yaml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ steps:
1818
TERM: "xterm-256color"
1919
retry:
2020
automatic:
21+
- exit_status: 1 # Transient Docker/BuildKit failure
22+
limit: 1
2123
- exit_status: -1 # Agent was lost
2224
limit: 1
2325
- exit_status: -10 # Agent was lost
@@ -46,6 +48,8 @@ steps:
4648
VLLM_BRANCH: "$BUILDKITE_COMMIT"
4749
retry:
4850
automatic:
51+
- exit_status: 1 # Transient Docker/BuildKit failure
52+
limit: 1
4953
- exit_status: -1 # Agent was lost
5054
limit: 1
5155
- exit_status: -10 # Agent was lost
@@ -72,6 +76,8 @@ steps:
7276
VLLM_BRANCH: "$BUILDKITE_COMMIT"
7377
retry:
7478
automatic:
79+
- exit_status: 1 # Transient Docker/BuildKit failure
80+
limit: 1
7581
- exit_status: -1 # Agent was lost
7682
limit: 1
7783
- exit_status: -10 # Agent was lost

‎.buildkite/lm-eval-harness/configs/Meta-Llama-4-Maverick-17B-128E-Instruct-FP8.yaml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# For hf script, without -t option (tensor parallel size).
22
# bash .buildkite/lm-eval-harness/run-lm-eval-mmlupro-vllm-baseline.sh -m meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8 -l 250 -t 8 -f 5
33
model_name: "meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8"
4+
rocm_safetensors_load_strategy: lazy
45
required_gpu_arch:
56
- gfx942
67
- gfx950

‎.buildkite/lm-eval-harness/test_lm_eval_correctness.py‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ def launch_lm_eval(eval_config, tp_size):
7272
if moe_backend is not None:
7373
model_args += f"moe_backend={moe_backend},"
7474

75+
if current_platform.is_rocm():
76+
rocm_load_strategy = eval_config.get("rocm_safetensors_load_strategy")
77+
if rocm_load_strategy is not None:
78+
model_args += f"safetensors_load_strategy={rocm_load_strategy},"
79+
7580
env_vars = eval_config.get("env_vars", None)
7681
with scoped_env_vars(env_vars):
7782
results = lm_eval.simple_evaluate(

‎.buildkite/release-pipeline.yaml‎

Lines changed: 65 additions & 22 deletions
Large diffs are not rendered by default.

‎.buildkite/scripts/annotate-build-artifact.sh‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
44
#
55
# Append a build artifact line to the Buildkite annotation.
6-
# Usage: annotate-build-artifact.sh <label> <value>
6+
# Usage: annotate-build-artifact.sh <label> <value> <context>
77
set -e
88
echo "- **${1}**: \`${2}\`" | \
9-
buildkite-agent annotate --append --style 'info' --context 'release-artifacts'
9+
buildkite-agent annotate --append --style 'info' \
10+
--context "${3:?context is required}"
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/usr/bin/env bash
2+
# SPDX-License-Identifier: Apache-2.0
3+
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
4+
#
5+
# Build the macOS arm64 CPU wheel natively on a macOS agent (the `macmini`
6+
# queue) into artifacts/dist/ for upload-nightly-wheels.sh.
7+
8+
set -euo pipefail
9+
10+
# The Rust frontend build needs protoc.
11+
if ! command -v protoc >/dev/null 2>&1; then
12+
brew install protobuf
13+
fi
14+
15+
# upload-nightly-wheels.sh expects exactly one wheel.
16+
rm -rf artifacts/dist
17+
mkdir -p artifacts/dist
18+
19+
export VLLM_TARGET_DEVICE=cpu
20+
export VLLM_REQUIRE_RUST_FRONTEND=1
21+
export MACOSX_DEPLOYMENT_TARGET=11.0
22+
# uv's CPython is universal2; force an arm64-only build and tag so the wheel
23+
# isn't mislabelled universal2 and installed on Intel Macs where import fails.
24+
export ARCHFLAGS="-arch arm64"
25+
export _PYTHON_HOST_PLATFORM="macosx-11.0-arm64"
26+
export CMAKE_BUILD_PARALLEL_LEVEL="${CMAKE_BUILD_PARALLEL_LEVEL:-4}"
27+
28+
uv venv --python 3.12
29+
uv pip install -r requirements/build/cpu.txt --index-strategy unsafe-best-match
30+
uv build --wheel --no-build-isolation -o artifacts/dist
31+
32+
ls -l artifacts/dist/*.whl

‎.buildkite/scripts/ci-bake-rocm.sh‎

Lines changed: 97 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ get_content_arg_names() {
285285
fi | awk 'NF && !seen[$0]++'
286286
}
287287

288-
compute_ci_base_content_hash() {
288+
compute_ci_base_content_hash_once() {
289289
local -a content_paths=()
290290
local -a content_args=()
291291
local dockerfile="${CI_BASE_DOCKERFILE:-}"
@@ -301,7 +301,8 @@ compute_ci_base_content_hash() {
301301
if [[ -n "${dockerfile}" ]]; then
302302
printf 'dockerfile:%s\n' "${dockerfile}"
303303
printf 'resolved-build-args:\n'
304-
hash_dockerfile_arg_values "${dockerfile}" "${content_args[@]}"
304+
hash_dockerfile_arg_values "${dockerfile}" "${content_args[@]}" \
305+
|| return 1
305306
if [[ -n "${stages}" ]]; then
306307
printf 'dockerfile-stages:%s\n' "${stages}"
307308
if [[ -f "${dockerfile}" ]]; then
@@ -314,6 +315,53 @@ compute_ci_base_content_hash() {
314315
} | sha256sum | cut -d' ' -f1
315316
}
316317

318+
compute_ci_base_content_hash() {
319+
local attempts="${CI_BASE_HASH_ATTEMPTS:-3}"
320+
local delay_secs="${CI_BASE_HASH_RETRY_DELAY:-5}"
321+
local attempt=0
322+
local hash=""
323+
local failed=0
324+
local -a hashes=()
325+
326+
if [[ ! "${attempts}" =~ ^[1-9][0-9]*$ ]]; then
327+
echo "Invalid CI_BASE_HASH_ATTEMPTS: ${attempts}" >&2
328+
return 1
329+
fi
330+
if [[ ! "${delay_secs}" =~ ^[0-9]+$ ]]; then
331+
echo "Invalid CI_BASE_HASH_RETRY_DELAY: ${delay_secs}" >&2
332+
return 1
333+
fi
334+
335+
for ((attempt = 1; attempt <= attempts; attempt++)); do
336+
if ! hash=$(compute_ci_base_content_hash_once); then
337+
echo "ci_base content hash calculation ${attempt}/${attempts} failed" >&2
338+
failed=1
339+
else
340+
hashes+=("${hash}")
341+
echo "ci_base content hash calculation ${attempt}/${attempts}: ${hash}" >&2
342+
fi
343+
344+
if ((attempt < attempts)); then
345+
sleep "${delay_secs}"
346+
fi
347+
done
348+
349+
if ((failed)) || ((${#hashes[@]} != attempts)); then
350+
echo "Could not calculate a reliable ci_base content hash" >&2
351+
return 1
352+
fi
353+
354+
for hash in "${hashes[@]:1}"; do
355+
if [[ "${hash}" != "${hashes[0]}" ]]; then
356+
echo "ci_base content hash changed between calculations" >&2
357+
printf ' observed: %s\n' "${hashes[@]}" >&2
358+
return 1
359+
fi
360+
done
361+
362+
printf '%s\n' "${hashes[0]}"
363+
}
364+
317365
extract_dockerfile_arg_default() {
318366
local dockerfile="$1"
319367
local arg_name="$2"
@@ -366,7 +414,11 @@ hash_dockerfile_arg_values() {
366414
printf 'arg:%s=%s\n' "${arg_name}" "${arg_value:-<empty>}"
367415
if [[ "${arg_name}" == "BASE_IMAGE" && -n "${arg_value}" ]]; then
368416
digest=$(resolve_image_digest "${arg_value}")
369-
printf 'arg:%s.digest=%s\n' "${arg_name}" "${digest:-unknown}"
417+
if [[ -z "${digest}" ]]; then
418+
echo "Failed to resolve digest for BASE_IMAGE=${arg_value}" >&2
419+
return 1
420+
fi
421+
printf 'arg:%s.digest=%s\n' "${arg_name}" "${digest}"
370422
fi
371423
done
372424
}
@@ -1898,8 +1950,8 @@ confirm_remote_image_push() {
18981950
fi
18991951

19001952
if [[ -z "${remote_revision}" \
1901-
&& ${IMAGE_EXISTED_BEFORE_BUILD} -eq 0 \
1902-
&& image_tag_is_commit_scoped ]]; then
1953+
&& ${IMAGE_EXISTED_BEFORE_BUILD} -eq 0 ]] \
1954+
&& image_tag_is_commit_scoped; then
19031955
echo "Remote image exists under a commit-scoped tag; accepting push despite missing revision label."
19041956
return 0
19051957
fi
@@ -2029,36 +2081,57 @@ upload_wheel_artifacts_if_present() {
20292081
local wheel_dir="./wheel-export"
20302082
local artifact_dir="artifacts/vllm-rocm-install"
20312083
local archive_name="vllm-rocm-install.tar.gz"
2084+
local metadata_dir="${wheel_dir}/.vllm-ci-artifact"
2085+
local native_base_image=""
20322086
local whl=""
20332087
local whl_name=""
2088+
local -a wheels=()
20342089

20352090
if ! should_upload_wheel_artifacts; then
20362091
return 0
20372092
fi
20382093

2039-
if [[ ! -d "${wheel_dir}" ]] || ! ls "${wheel_dir}"/*.whl >/dev/null 2>&1; then
2040-
echo "No ROCm wheel artifacts found in ${wheel_dir}"
2041-
return 0
2094+
if [[ -d "${wheel_dir}" ]]; then
2095+
mapfile -t wheels < <(find "${wheel_dir}" -maxdepth 1 -type f -name '*.whl' -print)
2096+
fi
2097+
if [[ ${#wheels[@]} -ne 1 ]]; then
2098+
echo "Expected exactly one ROCm wheel in ${wheel_dir}; found ${#wheels[@]}" >&2
2099+
return 1
2100+
fi
2101+
whl="${wheels[0]}"
2102+
whl_name=$(basename "${whl}")
2103+
native_base_image="${CI_BASE_IMAGE_TAG_COMMIT_REF:-${CI_BASE_IMAGE:-}}"
2104+
if [[ -z "${native_base_image}" ]]; then
2105+
echo "Native ROCm artifact requires a ci_base image reference" >&2
2106+
return 1
20422107
fi
20432108

20442109
echo "--- :package: Uploading ROCm vLLM install artifact"
2045-
mkdir -p "${artifact_dir}"
2110+
rm -rf "${artifact_dir}" "${metadata_dir}"
2111+
mkdir -p "${artifact_dir}" "${metadata_dir}"
2112+
2113+
printf '%s\n' "${BUILDKITE_COMMIT:-local}" > "${metadata_dir}/commit.txt"
2114+
printf '%s\n' "${native_base_image}" > "${metadata_dir}/native-base-image.txt"
2115+
printf '%s\n' "${CI_BASE_IMAGE:-}" > "${metadata_dir}/ci-base-image.txt"
2116+
printf '%s\n' "${IMAGE_TAG:-}" > "${metadata_dir}/fallback-image.txt"
2117+
printf '%s\n' "${whl_name}" > "${metadata_dir}/wheel-filename.txt"
20462118

20472119
tar -C "${wheel_dir}" -czf "${artifact_dir}/${archive_name}" .
2120+
(
2121+
cd "${artifact_dir}"
2122+
sha256sum "${archive_name}" > "${archive_name}.sha256"
2123+
)
20482124
echo "Created ${archive_name}: $(du -sh "${artifact_dir}/${archive_name}" | cut -f1)"
2049-
printf '%s\n' "${CI_BASE_IMAGE:-}" > "${artifact_dir}/ci-base-image.txt"
2050-
printf '%s\n' "${IMAGE_TAG:-}" > "${artifact_dir}/fallback-image.txt"
2051-
2052-
for whl in "${wheel_dir}"/*.whl; do
2053-
[[ -f "${whl}" ]] || continue
2054-
whl_name=$(basename "${whl}")
2055-
cp "${whl}" "${artifact_dir}/${whl_name}"
2056-
echo "Copied ${whl_name}: $(du -sh "${artifact_dir}/${whl_name}" | cut -f1)"
2057-
done
2125+
cp "${metadata_dir}"/*.txt "${artifact_dir}/"
2126+
cp "${whl}" "${artifact_dir}/${whl_name}"
2127+
echo "Copied ${whl_name}: $(du -sh "${artifact_dir}/${whl_name}" | cut -f1)"
20582128

20592129
if command -v buildkite-agent >/dev/null 2>&1; then
2060-
buildkite-agent artifact upload "${artifact_dir}/*"
2130+
buildkite-agent artifact upload "${artifact_dir}/*" || return 1
20612131
echo "ROCm vLLM install artifacts uploaded to ${artifact_dir}/"
2132+
elif [[ "${BUILDKITE:-false}" == "true" ]]; then
2133+
echo "buildkite-agent not found; cannot upload required ROCm artifacts" >&2
2134+
return 1
20622135
else
20632136
echo "Not in Buildkite, skipping artifact upload"
20642137
fi
@@ -2090,6 +2163,11 @@ main() {
20902163
echo "BAKE_PRINT_ONLY=1 set; skipping build"
20912164
return 0
20922165
fi
2166+
if should_upload_wheel_artifacts; then
2167+
# wheel-export is an output directory, not a BuildKit cache. Starting
2168+
# clean prevents a failed/retried export from packaging a stale wheel.
2169+
rm -rf ./wheel-export
2170+
fi
20932171
seed_dependency_caches_if_needed
20942172
run_bake
20952173
upload_wheel_artifacts_if_present

0 commit comments

Comments
 (0)