chore: prepare for test

This commit is contained in:
wql 2024-09-11 09:54:50 +08:00
parent 6f1af13e03
commit c4fcb9689b
2 changed files with 6 additions and 6 deletions

View File

@ -7,9 +7,9 @@ print_to_screen=$3
output_file_path="${output_dir}/gpu_status_$(date +"%Y%m%d%H%M%S").json" output_file_path="${output_dir}/gpu_status_$(date +"%Y%m%d%H%M%S").json"
device_cnt=$(npu-smi info | grep '310P3' | wc -l) device_cnt=$(npu-smi info | grep '310P3' | wc -l)
chip_id_arr_from_info=(0 1 0 1) chip_id_arr_from_info=(0 1 0 1 0 1 0 1)
npu_id_arr_from_info=(5 5 6 6) npu_id_arr_from_info=(2 2 3 3 5 5 6 6)
npu_id_arr=(5 6) npu_id_arr=(2 3 5 6)
loop_cnt=0 loop_cnt=0
@ -48,7 +48,7 @@ done
get_power_dissipation() { get_power_dissipation() {
local npu_id="$1" local npu_id="$1"
# need to varify # need to varify
power_dissipation=$(npu-smi info -t power -i ${npu_id} | grep 'Power Dissipation(W)' | awk '{print $2}') power_dissipation=$(npu-smi info -t power -i ${npu_id} | grep 'Power Dissipation(W)' | awk '{print $4}')
echo "${power_dissipation}" echo "${power_dissipation}"
} }

View File

@ -29,7 +29,7 @@ python prepare_yaml_file.py ${run_type} ${model} ${max_steps} ${run_name} ${outp
export USE_MODELSCOPE_HUB=1 export USE_MODELSCOPE_HUB=1
echo "Start recording npu status " echo "Start recording npu status "
bash npu_status.sh ${output_dir} 10 1 & bash npu_status.sh ${output_dir} 60 0 &
npu_status_pid=$! npu_status_pid=$!
echo "${npu_status_pid}" echo "${npu_status_pid}"
@ -46,6 +46,6 @@ fi
wait $train_pid wait $train_pid
echo "Train ended" echo "Train ended"
sleep 90 sleep 60
kill $npu_status_pid kill $npu_status_pid
echo "Npu status ended" echo "Npu status ended"