fix: small fix

This commit is contained in:
wql 2024-09-11 10:05:07 +08:00
parent 6122d9b04d
commit 3eb6328ff1
1 changed files with 2 additions and 2 deletions

View File

@ -32,14 +32,14 @@ loop_cnt=0
while true; do while true; do
device_mem_usage="" device_mem_usage=""
for ((i=0; i<device_cnt; i++)); do for ((i=0; i<device_cnt; i++)); do
mem_usage="get_mem_usage ${chip_id_arr_from_info[i]} ${i}" mem_usage=$(get_mem_usage ${chip_id_arr_from_info[i]} ${i})
device_mem_usage="${device_mem_usage}{"npu_id": ${npu_id_arr_from_info[i]}, "chip_id": ${chip_id_arr_from_info[i]}, "device_id": ${i}, "mem_usage": ${mem_usage}}, " device_mem_usage="${device_mem_usage}{"npu_id": ${npu_id_arr_from_info[i]}, "chip_id": ${chip_id_arr_from_info[i]}, "device_id": ${i}, "mem_usage": ${mem_usage}}, "
done done
device_mem_usage="${device_mem_usage%??}" device_mem_usage="${device_mem_usage%??}"
npu_power_dissipation="" npu_power_dissipation=""
for npu_id in "${npu_id_arr[@]}"; do for npu_id in "${npu_id_arr[@]}"; do
power_dissipation="get_power_dissipation ${npu_id}" power_dissipation=$(get_power_dissipation ${npu_id})
npu_power_dissipation="${npu_power_dissipation}{"npu_id": ${npu_id}, "power_dissipation": ${power_dissipation}}, " npu_power_dissipation="${npu_power_dissipation}{"npu_id": ${npu_id}, "power_dissipation": ${power_dissipation}}, "
done done
npu_power_dissipation="${npu_power_dissipation%??}" npu_power_dissipation="${npu_power_dissipation%??}"