[TIPC] add more scripts change, test=develop
parent
688f44ea32
commit
b1c2350a26
|
@ -265,9 +265,9 @@ else
|
||||||
if [ ${#gpu} -le 2 ]; then # train with cpu or single gpu
|
if [ ${#gpu} -le 2 ]; then # train with cpu or single gpu
|
||||||
cmd="${python} ${run_train} ${set_use_gpu} ${set_save_model} ${set_epoch} ${set_pretrain} ${set_autocast} ${set_batchsize} ${set_train_params1} "
|
cmd="${python} ${run_train} ${set_use_gpu} ${set_save_model} ${set_epoch} ${set_pretrain} ${set_autocast} ${set_batchsize} ${set_train_params1} "
|
||||||
elif [ ${#ips} -le 15 ]; then # train with multi-gpu
|
elif [ ${#ips} -le 15 ]; then # train with multi-gpu
|
||||||
cmd="${python} -m paddle.distributed.launch --gpus=${gpu} ${run_train} ${set_use_gpu} ${set_save_model} ${set_epoch} ${set_pretrain} ${set_autocast} ${set_batchsize} ${set_train_params1}"
|
cmd="${python} -m paddle.distributed.launch --devices=${gpu} ${run_train} ${set_use_gpu} ${set_save_model} ${set_epoch} ${set_pretrain} ${set_autocast} ${set_batchsize} ${set_train_params1}"
|
||||||
else # train with multi-machine
|
else # train with multi-machine
|
||||||
cmd="${python} -m paddle.distributed.launch --ips=${ips} --gpus=${gpu} ${run_train} ${set_use_gpu} ${set_save_model} ${set_pretrain} ${set_epoch} ${set_autocast} ${set_batchsize} ${set_train_params1}"
|
cmd="${python} -m paddle.distributed.launch --ips=${ips} --devices=${gpu} ${run_train} ${set_use_gpu} ${set_save_model} ${set_pretrain} ${set_epoch} ${set_autocast} ${set_batchsize} ${set_train_params1}"
|
||||||
fi
|
fi
|
||||||
# run train
|
# run train
|
||||||
eval "unset CUDA_VISIBLE_DEVICES"
|
eval "unset CUDA_VISIBLE_DEVICES"
|
||||||
|
|
|
@ -40,6 +40,9 @@ grep -n 'tools/.*yaml' $FILENAME | cut -d ":" -f 1 \
|
||||||
sed -i 's/device: gpu/device: npu/g' "$REPO_ROOT_PATH/$trainer_config"
|
sed -i 's/device: gpu/device: npu/g' "$REPO_ROOT_PATH/$trainer_config"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# change gpu to npu in execution script
|
||||||
|
sed -i "s/\"gpu\"/\"npu\"/g" test_tipc/test_train_inference_python.sh
|
||||||
|
|
||||||
# pass parameters to test_train_inference_python.sh
|
# pass parameters to test_train_inference_python.sh
|
||||||
cmd="bash test_tipc/test_train_inference_python.sh ${FILENAME} $2"
|
cmd="bash test_tipc/test_train_inference_python.sh ${FILENAME} $2"
|
||||||
echo $cmd
|
echo $cmd
|
||||||
|
|
|
@ -40,6 +40,9 @@ grep -n 'tools/.*yaml' $FILENAME | cut -d ":" -f 1 \
|
||||||
sed -i 's/device: gpu/device: xpu/g' "$REPO_ROOT_PATH/$trainer_config"
|
sed -i 's/device: gpu/device: xpu/g' "$REPO_ROOT_PATH/$trainer_config"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# change gpu to npu in execution script
|
||||||
|
sed -i "s/\"gpu\"/\"npu\"/g" test_tipc/test_train_inference_python.sh
|
||||||
|
|
||||||
# pass parameters to test_train_inference_python.sh
|
# pass parameters to test_train_inference_python.sh
|
||||||
cmd="bash test_tipc/test_train_inference_python.sh ${FILENAME} $2"
|
cmd="bash test_tipc/test_train_inference_python.sh ${FILENAME} $2"
|
||||||
echo $cmd
|
echo $cmd
|
||||||
|
|
Loading…
Reference in New Issue