[Doc][Example][Bugfix] Elements in local_device_ids should be casted … (#3782)
### What this PR does / why we need it?
It's a tiny bugfix in the `gen_ranktable.py` script. The script is an
util to help setup an example case. It is used to prepare a ranktable
before disaggregated prefill deployment.
Elements in `local_device_ids` list should be casted to `int` type
before referred for a MOD math operation.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
No.
- vLLM version: v0.11.0
- vLLM main:
c9461e05a4
---------
Signed-off-by: paulyu12 <507435917@qq.com>
This commit is contained in:
@@ -63,7 +63,11 @@ chips_per_card = get_cmd_stdout("npu-smi info -l | grep \"Chip Count\"").split(
|
||||
chips_per_card = int(chips_per_card)
|
||||
|
||||
if args.local_device_ids:
|
||||
local_device_ids = args.local_device_ids.split(',')
|
||||
try:
|
||||
local_device_ids = [int(id_str) for id_str in args.local_device_ids.split(',')]
|
||||
except ValueError:
|
||||
print(f"Error: --local-device-ids must be a comma-separated list of integers. Received: '{args.local_device_ids}'")
|
||||
exit(1)
|
||||
else:
|
||||
local_device_ids = []
|
||||
for card_id in range(num_cards):
|
||||
|
||||
Reference in New Issue
Block a user