@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / a2f14dc8f9
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 15, 03:30 UTC

[CI][Intel Gaudi][vllm-Plugin]Add CI for hpu-plugin-v1-test (#20196)

Signed-off-by: Chendi Xue <chendi.xue@intel.com>

Chendi.Xue committed Jun 30, 2025 at 23:17 UTC a2f14dc8f9bb04bd782d1aa4d2e6364841d63d6c
1 file changed +40 -8
.buildkite/scripts/hardware_ci/run-hpu-test.sh
+40 -8
@@ -2,10 +2,34 @@
2
3 # This script build the CPU docker image and run the offline inference inside the container.
4 # It serves a sanity check for compilation and basic model usage.
5 -set -ex
5 +set -exuo pipefail
6
7 # Try building the docker image
8 -docker build -t hpu-test-env -f docker/Dockerfile.hpu .
8 +cat <<EOF | docker build -t hpu-plugin-v1-test-env -f - .
9 +FROM 1.22-413-pt2.7.1:latest
10 +
11 +COPY ./ /workspace/vllm
12 +
13 +WORKDIR /workspace/vllm
14 +
15 +RUN pip install -v -r requirements/hpu.txt
16 +RUN pip install git+https://github.com/vllm-project/vllm-gaudi.git
17 +
18 +ENV no_proxy=localhost,127.0.0.1
19 +ENV PT_HPU_ENABLE_LAZY_COLLECTIVES=true
20 +
21 +RUN VLLM_TARGET_DEVICE=hpu python3 setup.py install
22 +
23 +# install development dependencies (for testing)
24 +RUN python3 -m pip install -e tests/vllm_test_utils
25 +
26 +WORKDIR /workspace/
27 +
28 +RUN git clone https://github.com/vllm-project/vllm-gaudi.git
29 +
30 +RUN ln -s /workspace/vllm/tests && ln -s /workspace/vllm/examples && ln -s /workspace/vllm/benchmarks
31 +
32 +EOF
33
34 # Setup cleanup
35 # certain versions of HPU software stack have a bug that can
@@ -14,13 +38,21 @@ docker build -t hpu-test-env -f docker/Dockerfile.hpu .
38 # functions, while other platforms only need one remove_docker_container
39 # function.
40 EXITCODE=1
17 -remove_docker_containers() { docker rm -f hpu-test || true; docker rm -f hpu-test-tp2 || true; }
18 -remove_docker_containers_and_exit() { remove_docker_containers; exit $EXITCODE; }
19 -trap remove_docker_containers_and_exit EXIT
41 +remove_docker_containers() { docker rm -f hpu-plugin-v1-test || true; }
42 +trap 'remove_docker_containers; exit $EXITCODE;' EXIT
43 remove_docker_containers
44
22 -# Run the image and launch offline inference
23 -docker run --runtime=habana --name=hpu-test --network=host -e HABANA_VISIBLE_DEVICES=all -e VLLM_SKIP_WARMUP=true --entrypoint="" hpu-test-env python3 examples/offline_inference/basic/generate.py --model facebook/opt-125m
24 -docker run --runtime=habana --name=hpu-test-tp2 --network=host -e HABANA_VISIBLE_DEVICES=all -e VLLM_SKIP_WARMUP=true --entrypoint="" hpu-test-env python3 examples/offline_inference/basic/generate.py --model facebook/opt-125m --tensor-parallel-size 2
45 +echo "Running HPU plugin v1 test"
46 +docker run --rm --runtime=habana --name=hpu-plugin-v1-test --network=host \
47 + -e HABANA_VISIBLE_DEVICES=all \
48 + hpu-plugin-v1-test-env \
49 + /bin/bash "/workspace/vllm-gaudi/tests/upstream_tests/ci_tests.sh"
50
51 EXITCODE=$?
52 +if [ $EXITCODE -eq 0 ]; then
53 + echo "Test with basic model passed"
54 +else
55 + echo "Test with basic model FAILED with exit code: $EXITCODE" >&2
56 +fi
57 +
58 +# The trap will handle the container removal and final exit.
\ No newline at end of file