File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
src/cloudai/workloads/ai_dynamo Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -277,7 +277,7 @@ _compute_worker_allocation_sglang() {
277277_compute_worker_allocation_vllm () {
278278 local tp_arg_name=" --${dynamo_args["tp-arg-name"]} "
279279 local pp_arg_name=" --${dynamo_args["pp-arg-name"]} "
280- local num_gpus=$( echo " ${CUDA_VISIBLE_DEVICES :- } " | tr ' , ' ' \n ' | grep -c . )
280+ local num_gpus=" $( _gpus_per_node ) "
281281
282282 if [[ $num_gpus -eq 0 ]]; then
283283 log " ERROR: No GPUs found in CUDA_VISIBLE_DEVICES"
@@ -569,8 +569,7 @@ validate_environment() {
569569 fi
570570
571571 # GPU count sanity
572- local num_gpus
573- num_gpus=$( echo " ${CUDA_VISIBLE_DEVICES} " | tr ' ,' ' \n' | grep -c . || true)
572+ local num_gpus=" $( _gpus_per_node) "
574573 if [[ " $num_gpus " -le 0 ]]; then
575574 log " ERROR: Parsed zero GPUs from CUDA_VISIBLE_DEVICES='${CUDA_VISIBLE_DEVICES} '"
576575 exit 1
You can’t perform that action at this time.
0 commit comments