Skip to content

Commit 8d69b7b

Browse files
authored
[HPU] Fix benchmark CI failure caused by zero compilation time in lazy mode (#162)
* [HPU] Fix benchmark failure caused by zero compilation time in lazy mode HPU runs with PT_HPU_LAZY_MODE=1 which forces CompilationMode.NONE, meaning torch.compile never executes and compilation_time is always 0. This causes the --strict check in check_benchmark_results.py to fail with exit code 1 on all-zero compilation result files. Changes (HPU-only, no impact on other devices): - Skip --include-eager-mode for HPU: eager/compile mode distinction doesn't apply in lazy mode, avoids generating unnecessary _eager test variants with compilation-config parameters - Remove compilation time result files before strict check: since compilation is always disabled on HPU, these files legitimately contain all-zero values and would cause false failures * Add docker container prune step before image pruning in benchmarks
1 parent 177864d commit 8d69b7b

1 file changed

Lines changed: 26 additions & 2 deletions

File tree

.github/workflows/vllm-benchmark.yml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,9 @@ jobs:
217217
if: env.DEVICE_NAME == 'hpu' || contains(matrix.runner, 'gnr')
218218
run: |
219219
set -eux
220+
# Remove all stopped containers first so their referenced images
221+
# become eligible for pruning
222+
docker container prune -f || true
220223
docker image prune -a -f || true
221224
222225
- name: Check for last benchmark commit
@@ -281,14 +284,21 @@ jobs:
281284
rm .buildkite/performance-benchmarks/tests/*.json || true
282285
popd
283286
287+
# HPU uses lazy mode (PT_HPU_LAZY_MODE=1), so the eager/compile
288+
# mode distinction doesn't apply - skip eager mode and inductor
289+
# graph partition variants for HPU.
290+
EXTRA_FLAGS="--include-eager-mode --include-inductor-graph-partition"
291+
if [[ "${DEVICE_NAME}" == "hpu" ]]; then
292+
EXTRA_FLAGS=""
293+
fi
294+
284295
# Set the list of benchmarks we want to cover in this runner
285296
python3 .github/scripts/setup_vllm_benchmark.py \
286297
--from-benchmark-configs-dir vllm-benchmarks/benchmarks \
287298
--to-benchmark-configs-dir vllm-benchmarks/vllm/.buildkite/performance-benchmarks/tests \
288299
--models "${MODELS}" \
289300
--device "${DEVICE_NAME}" \
290-
--include-eager-mode \
291-
--include-inductor-graph-partition
301+
${EXTRA_FLAGS}
292302
293303
pushd vllm-benchmarks/vllm
294304
ls -lah .buildkite/performance-benchmarks/tests
@@ -364,6 +374,20 @@ jobs:
364374
cd vllm-benchmarks/vllm && bash .buildkite/performance-benchmarks/scripts/run-performance-benchmarks.sh
365375
"
366376
377+
- name: Remove HPU compilation time results
378+
if: env.DEVICE_NAME == 'hpu'
379+
env:
380+
BENCHMARK_RESULTS: vllm-benchmarks/vllm/benchmarks/results
381+
run: |
382+
set -eux
383+
# HPU uses lazy mode (PT_HPU_LAZY_MODE=1) which forces
384+
# CompilationMode.NONE, so compilation_time is always 0.
385+
# Remove these files to prevent false failures in strict check.
386+
sudo chown -R ${UID} "${BENCHMARK_RESULTS}" || true
387+
rm -f "${BENCHMARK_RESULTS}"/*compilation*.json || true
388+
echo "Remaining benchmark results:"
389+
ls -lah "${BENCHMARK_RESULTS}" || true
390+
367391
- name: Authenticate with AWS
368392
# AWS CUDA runners already have access to the bucket via its runner IAM role
369393
if: env.DEVICE_NAME == 'rocm' || env.DEVICE_NAME == 'hpu' || contains(env.DEVICE_TYPE, 'B200') || contains(matrix.runner, 'gnr')

0 commit comments

Comments
 (0)