[CI/Release][1/N][XPU] Publish XPU Triton shim index (#51759)

Signed-off-by: Kunshang Ji <kunshang.ji@intel.com> Co-authored-by: GitHub Copilot <copilot@github.com>

Kunshang Ji committed Aug 12, 2026 at 11:45 UTC f4e9bb01de39dda517c8555640696bd9a9758be2
2 files changed +95
.buildkite/release-pipeline.yaml
+8
@@ -164,6 +164,14 @@ steps:
164 env:
165 DOCKER_BUILDKIT: "1"
166
167 + - label: "Publish XPU Triton shim index"
168 + key: publish-xpu-triton-shim
169 + depends_on: ~
170 + agents:
171 + queue: cpu_queue_release
172 + commands:
173 + - "bash .buildkite/scripts/xpu/publish-triton-shim.sh"
174 +
175 - label: "Generate and upload wheel indices"
176 key: generate-wheel-indices
177 depends_on: "build-wheels"
.buildkite/scripts/xpu/publish-triton-shim.sh new
+87
@@ -0,0 +1,87 @@
1 +#!/usr/bin/env bash
2 +# SPDX-License-Identifier: Apache-2.0
3 +# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
4 +
5 +set -euo pipefail
6 +
7 +readonly BUCKET="vllm-wheels"
8 +readonly PREFIX="xpu"
9 +readonly WHEEL_URL="https://github.com/intel/intel-xpu-backend-for-triton/releases/download/v3.7.2/triton-3.7.2+xpu-py3-none-any.whl"
10 +readonly WHEEL_SHA256="3c822f73e9870512f59a6ecf5dc305a4bcab11fa623f9ce91011f604315227e9"
11 +readonly WHEEL_FILENAME="${WHEEL_URL##*/}"
12 +readonly ENCODED_WHEEL_FILENAME="${WHEEL_FILENAME/+/%2B}"
13 +readonly S3_PREFIX="s3://${BUCKET}/${PREFIX}/"
14 +readonly DRY_RUN="${DRY_RUN:-0}"
15 +
16 +if [[ "$DRY_RUN" != "0" && "$DRY_RUN" != "1" ]]; then
17 + echo "DRY_RUN must be 0 or 1" >&2
18 + exit 2
19 +fi
20 +
21 +cd "$(dirname "${BASH_SOURCE[0]}")/../../.."
22 +
23 +work_dir=$(mktemp -d)
24 +trap 'rm -rf "$work_dir"' EXIT
25 +
26 +wheel_path="$work_dir/$WHEEL_FILENAME"
27 +objects_path="$work_dir/objects.json"
28 +index_output_dir="$work_dir/$PREFIX"
29 +index_generator="$work_dir/generate-nightly-index.py"
30 +
31 +curl --fail --location --retry 3 --output "$wheel_path" "$WHEEL_URL"
32 +
33 +if command -v sha256sum >/dev/null 2>&1; then
34 + actual_sha=$(sha256sum "$wheel_path")
35 +else
36 + actual_sha=$(shasum -a 256 "$wheel_path")
37 +fi
38 +actual_sha=${actual_sha%% *}
39 +if [[ "$actual_sha" != "$WHEEL_SHA256" ]]; then
40 + echo "SHA256 mismatch for $WHEEL_FILENAME" >&2
41 + echo "Expected: $WHEEL_SHA256" >&2
42 + echo "Actual: $actual_sha" >&2
43 + exit 1
44 +fi
45 +
46 +if [[ "$DRY_RUN" == "1" ]]; then
47 + printf '{"Contents":[{"Key":"%s/%s"}]}' \
48 + "$PREFIX" "$WHEEL_FILENAME" > "$objects_path"
49 +else
50 + aws s3 cp "$wheel_path" "$S3_PREFIX"
51 + aws s3api list-objects-v2 \
52 + --bucket "$BUCKET" \
53 + --prefix "$PREFIX/" \
54 + --delimiter / \
55 + --output json > "$objects_path"
56 +fi
57 +
58 +# Pick Python >= 3.12 locally or use the container fallback.
59 +# shellcheck source=../lib/select-python.sh
60 +source .buildkite/scripts/lib/select-python.sh
61 +select_python
62 +
63 +# The index generator only needs stdlib re here. Keep the tracked source intact.
64 +sed 's/import regex as re/import re/' \
65 + .buildkite/scripts/generate-nightly-index.py > "$index_generator"
66 +
67 +# shellcheck disable=SC2086
68 +$PYTHON "$index_generator" \
69 + --version "$PREFIX" \
70 + --wheel-dir "$PREFIX" \
71 + --current-objects "$objects_path" \
72 + --output-dir "$index_output_dir" \
73 + --comment "XPU Triton shim"
74 +
75 +grep -Fq 'href="triton/"' "$index_output_dir/index.html"
76 +grep -Fq "href=\"../$ENCODED_WHEEL_FILENAME\"" \
77 + "$index_output_dir/triton/index.html"
78 +grep -Fq "\"filename\": \"$WHEEL_FILENAME\"" \
79 + "$index_output_dir/triton/metadata.json"
80 +
81 +if [[ "$DRY_RUN" == "1" ]]; then
82 + echo "Dry run succeeded; generated files:"
83 + find "$index_output_dir" -type f -print | sort
84 +else
85 + aws s3 cp --recursive "$index_output_dir/" "$S3_PREFIX"
86 + echo "Published XPU Triton shim index to https://wheels.vllm.ai/$PREFIX/"
87 +fi
\ No newline at end of file