Skip to content

Commit 824a3f4

Browse files
authored
[Misc] auto_tune: kill specific vllm process (#26304)
Signed-off-by: Karan Goel <[email protected]>
1 parent 05f6846 commit 824a3f4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

benchmarks/auto_tune/auto_tune.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ start_server() {
7474
local vllm_log=$4
7575
local profile_dir=$5
7676

77-
pkill -if vllm
77+
pkill -if "vllm serve" || true
7878

7979
# Define the common arguments as a bash array.
8080
# Each argument and its value are separate elements.
@@ -139,7 +139,7 @@ run_benchmark() {
139139
echo "vllm_log: $vllm_log"
140140
echo
141141
rm -f $vllm_log
142-
pkill -if vllm
142+
pkill -if "vllm serve" || true
143143

144144
echo "starting server..."
145145
# Call start_server without a profile_dir to avoid profiling overhead
@@ -232,7 +232,7 @@ run_benchmark() {
232232

233233
echo "best_max_num_seqs: $best_max_num_seqs, best_num_batched_tokens: $best_num_batched_tokens, best_throughput: $best_throughput"
234234

235-
pkill -if vllm
235+
pkill -if "vllm serve" || true
236236
sleep 10
237237
echo "===================="
238238
return 0
@@ -308,6 +308,6 @@ if (( $(echo "$best_throughput > 0" | bc -l) )); then
308308
else
309309
echo "No configuration met the latency requirements. Skipping final profiling run."
310310
fi
311-
pkill -if vllm
311+
pkill -if "vllm serve" || true
312312
echo "best_max_num_seqs: $best_max_num_seqs, best_num_batched_tokens: $best_num_batched_tokens, best_throughput: $best_throughput, profile saved in: $PROFILE_PATH"
313313
echo "best_max_num_seqs: $best_max_num_seqs, best_num_batched_tokens: $best_num_batched_tokens, best_throughput: $best_throughput, profile saved in: $PROFILE_PATH" >> "$RESULT"

0 commit comments

Comments
 (0)