Skip to content

Commit 9bb3813

Browse files
authored
[Bugfix] Fix GPU_ID issue in test script (#26442)
Signed-off-by: Chendi Xue <chendi.xue@intel.com>
1 parent b91d8db commit 9bb3813

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

tests/v1/kv_connector/nixl_integration/run_accuracy_test.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,12 @@ run_tests_for_model() {
101101
for i in $(seq 0 $((NUM_PREFILL_INSTANCES-1))); do
102102
# Calculate GPU ID - we'll distribute across available GPUs
103103
GPU_ID=$((i % $(get_num_gpus)))
104+
NEXT_GPU=${GPU_ID}
105+
# If PREFILLER_TP_SIZE is more than 1
106+
for (( j=1; j < PREFILLER_TP_SIZE; j++ )); do
107+
NEXT_GPU=$(((GPU_ID + j) % $(get_num_gpus)))
108+
GPU_ID="${GPU_ID},${NEXT_GPU}"
109+
done
104110

105111
# Calculate port number (base port + instance number)
106112
PORT=$((8100 + i))
@@ -136,7 +142,12 @@ run_tests_for_model() {
136142
# Start decode instances
137143
for i in $(seq 0 $((NUM_DECODE_INSTANCES-1))); do
138144
# Calculate GPU ID - we'll distribute across available GPUs, starting from after prefill GPUs
139-
GPU_ID=$(((i + NUM_PREFILL_INSTANCES) % $(get_num_gpus)))
145+
GPU_ID=$(((i + NEXT_GPU + 1) % $(get_num_gpus)))
146+
# If DECODER_TP_SIZE is more than 1
147+
for (( j=1; j < DECODER_TP_SIZE; j++ )); do
148+
NEXT_GPU=$(((GPU_ID + j) % $(get_num_gpus)))
149+
GPU_ID="${GPU_ID},${NEXT_GPU}"
150+
done
140151
# Calculate port number (base port + instance number)
141152
PORT=$((8200 + i))
142153
# Calculate side channel port

0 commit comments

Comments
 (0)