Skip to content

Commit

Permalink
test: Limiting multi-gpu tests to use Ray as distributed_executor_bac…
Browse files Browse the repository at this point in the history
…kend (#47)
  • Loading branch information
oandreeva-nv authored Jul 25, 2024
1 parent db3d794 commit 05c5a8b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 4 additions & 2 deletions ci/L0_multi_gpu/multi_lora/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ model_json=$(cat <<EOF
"enforce_eager": "true",
"enable_lora": "true",
"max_lora_rank": 32,
"lora_extra_vocab_size": 256
"lora_extra_vocab_size": 256,
"distributed_executor_backend":"ray"
}
EOF
)
Expand Down Expand Up @@ -120,7 +121,8 @@ model_json=$(cat <<EOF
"block_size": 16,
"enforce_eager": "true",
"enable_lora": "false",
"lora_extra_vocab_size": 256
"lora_extra_vocab_size": 256,
"distributed_executor_backend":"ray"
}
EOF
)
Expand Down
8 changes: 7 additions & 1 deletion ci/L0_multi_gpu/vllm_backend/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ function run_multi_gpu_test() {
export KIND="${1}"
export TENSOR_PARALLELISM="${2}"
export INSTANCE_COUNT="${3}"
export DISTRIBUTED_EXECUTOR_BACKEND="${4}"

# Setup a clean model repository
export TEST_MODEL="vllm_opt_${KIND}_tp${TENSOR_PARALLELISM}_count${INSTANCE_COUNT}"
Expand All @@ -73,6 +74,10 @@ function run_multi_gpu_test() {
cp -r "${SAMPLE_MODELS_REPO}/vllm_model" "models/${TEST_MODEL}"
sed -i "s/KIND_MODEL/${KIND}/" "${TEST_MODEL_TRITON_CONFIG}"
sed -i "3s/^/ \"tensor_parallel_size\": ${TENSOR_PARALLELISM},\n/" "${TEST_MODEL_VLLM_CONFIG}"
if [ $TENSOR_PARALLELISM -ne "1" ]; then
jq --arg backend $DISTRIBUTED_EXECUTOR_BACKEND '. += {"distributed_executor_backend":$backend}' "${TEST_MODEL_VLLM_CONFIG}" > "temp.json"
mv temp.json "${TEST_MODEL_VLLM_CONFIG}"
fi
# Assert the correct kind is set in case the template config changes in the future
validate_file_contains "${KIND}" "${TEST_MODEL_TRITON_CONFIG}"

Expand Down Expand Up @@ -119,10 +124,11 @@ RET=0
KINDS="KIND_MODEL KIND_GPU"
TPS="1 2"
INSTANCE_COUNTS="1 2"
DISTRIBUTED_EXECUTOR_BACKEND="ray"
for kind in ${KINDS}; do
for tp in ${TPS}; do
for count in ${INSTANCE_COUNTS}; do
run_multi_gpu_test "${kind}" "${tp}" "${count}"
run_multi_gpu_test "${kind}" "${tp}" "${count}" "${DISTRIBUTED_EXECUTOR_BACKEND}"
done
done
done
Expand Down

0 comments on commit 05c5a8b

Please sign in to comment.