@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / b4b9813b5e
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 14, 05:30 UTC

add the codes to check AMD Instinct GPU number (#22367)

Signed-off-by: Zhang Jason <ning.zhang2@amd.com>

Zhang Jason committed Aug 6, 2025 at 23:58 UTC b4b9813b5e2076d510ae518252f64064e6646a3e
1 file changed +8 -2
examples/others/lmcache/disagg_prefill_lmcache_v1/disagg_example_nixl.sh
+8 -2
@@ -21,8 +21,14 @@ check_hf_token() {
21 }
22
23 check_num_gpus() {
24 - # can you check if the number of GPUs are >=2 via nvidia-smi?
25 - num_gpus=$(nvidia-smi --query-gpu=name --format=csv,noheader | wc -l)
24 + # can you check if the number of GPUs are >=2 via nvidia-smi/rocm-smi?
25 + which rocm-smi > /dev/null 2>&1
26 + if [ $? -ne 0 ]; then
27 + num_gpus=$(nvidia-smi --query-gpu=name --format=csv,noheader | wc -l)
28 + else
29 + num_gpus=$(rocm-smi --showid | grep Instinct | wc -l)
30 + fi
31 +
32 if [ "$num_gpus" -lt 2 ]; then
33 echo "You need at least 2 GPUs to run disaggregated prefill."
34 exit 1