[XPU][CI/Release][3/N] Add xpu wheel release to release pipeline (#52108)
Signed-off-by: Kunshang Ji <kunshang.ji@intel.com> Signed-off-by: Kunshang Ji <jikunshang95@gmail.com>
This commit is contained in:
@@ -53,11 +53,10 @@ if [[ "${UPDATE_NIGHTLY_INDEX:-1}" == "1" && \
|
||||
aws s3 cp --recursive "$INDICES_OUTPUT_DIR/" "s3://$BUCKET/nightly/"
|
||||
fi
|
||||
|
||||
# detect version from any wheel in the commit directory
|
||||
# download the first wheel we find to extract version metadata
|
||||
first_wheel_key=$($PYTHON -c "import json; obj=json.load(open('$obj_json')); print(next((c['Key'] for c in obj.get('Contents', []) if c['Key'].endswith('.whl')), ''))")
|
||||
# detect version from a vLLM wheel in the commit directory
|
||||
first_wheel_key=$($PYTHON -c "import json; obj=json.load(open('$obj_json')); print(next((c['Key'] for c in obj.get('Contents', []) if c['Key'].rsplit('/', 1)[-1].startswith('vllm-') and c['Key'].endswith('.whl')), ''))")
|
||||
if [[ -z "$first_wheel_key" ]]; then
|
||||
echo "Error: No wheels found in $S3_COMMIT_PREFIX"
|
||||
echo "Error: No vLLM wheel found in $S3_COMMIT_PREFIX"
|
||||
exit 1
|
||||
fi
|
||||
first_wheel=$(basename "$first_wheel_key")
|
||||
|
||||
@@ -91,9 +91,9 @@ def parse_from_filename(file: str) -> WheelFileInfo:
|
||||
else:
|
||||
if "+" in version:
|
||||
version_part, suffix = version.split("+", 1)
|
||||
# Only treat known patterns as variants (rocmXXX, cuXXX, cpu)
|
||||
# Only treat known patterns as variants (rocmXXX, cuXXX, cpu, xpu)
|
||||
# Git hashes and other suffixes are NOT variants
|
||||
if suffix.startswith(("rocm", "cu", "cpu")):
|
||||
if suffix.startswith(("rocm", "cu", "cpu", "xpu")):
|
||||
variant = suffix
|
||||
version = version_part
|
||||
# Otherwise keep the full version string (variant stays None)
|
||||
@@ -429,7 +429,11 @@ if __name__ == "__main__":
|
||||
if PY_VERSION_RE.match(version):
|
||||
# upload-wheels.sh ensures no "dev" is in args.version
|
||||
wheel_files = list(
|
||||
filter(lambda x: version in x and "dev" not in x, wheel_files)
|
||||
filter(
|
||||
lambda x: (version in x and "dev" not in x)
|
||||
or (x.startswith("triton-") and "+xpu-" in x),
|
||||
wheel_files,
|
||||
)
|
||||
)
|
||||
print(f"Non-nightly version detected, wheel files used: {wheel_files}")
|
||||
else:
|
||||
|
||||
@@ -11,12 +11,17 @@ readonly WHEEL_SHA256="3c822f73e9870512f59a6ecf5dc305a4bcab11fa623f9ce91011f6043
|
||||
readonly WHEEL_FILENAME="${WHEEL_URL##*/}"
|
||||
readonly ENCODED_WHEEL_FILENAME="${WHEEL_FILENAME/+/%2B}"
|
||||
readonly S3_PREFIX="s3://${BUCKET}/${PREFIX}/"
|
||||
readonly COMMIT="${BUILDKITE_COMMIT:-}"
|
||||
readonly DRY_RUN="${DRY_RUN:-0}"
|
||||
|
||||
if [[ "$DRY_RUN" != "0" && "$DRY_RUN" != "1" ]]; then
|
||||
echo "DRY_RUN must be 0 or 1" >&2
|
||||
exit 2
|
||||
fi
|
||||
if [[ "$DRY_RUN" == "0" && ! "$COMMIT" =~ ^[0-9a-f]{40}$ ]]; then
|
||||
echo "BUILDKITE_COMMIT must be a full lowercase commit hash" >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")/../../.."
|
||||
|
||||
@@ -70,9 +75,9 @@ sed 's/import regex as re/import re/' \
|
||||
# shellcheck disable=SC2086
|
||||
$PYTHON "$index_generator" \
|
||||
--version "$PREFIX" \
|
||||
--wheel-dir "$PREFIX" \
|
||||
--wheel-dir "$work_dir/$PREFIX" \
|
||||
--current-objects "$objects_path" \
|
||||
--output-dir "$index_output_dir" \
|
||||
--output-dir "$work_dir" \
|
||||
--comment "XPU Triton shim"
|
||||
|
||||
grep -Fq 'href="triton/"' "$index_output_dir/index.html"
|
||||
@@ -87,4 +92,7 @@ if [[ "$DRY_RUN" == "1" ]]; then
|
||||
else
|
||||
aws s3 cp --recursive "$index_output_dir/" "$S3_PREFIX"
|
||||
echo "Published XPU Triton shim index to https://wheels.vllm.ai/$PREFIX/"
|
||||
fi
|
||||
aws s3 cp "$S3_PREFIX$WHEEL_FILENAME" \
|
||||
"s3://$BUCKET/$COMMIT/$WHEEL_FILENAME"
|
||||
echo "Staged XPU Triton shim for https://wheels.vllm.ai/$COMMIT/xpu/"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user