forked from mindspore-Ecosystem/mindspore
!27691 [MS][LITE]split codegen and train tasks
Merge pull request !27691 from XianglongZeng/myms_new
This commit is contained in:
commit
4705d5dce2
|
@ -77,7 +77,7 @@ if [[ $backend == "all" || $backend == "x86-all" || $backend == "x86_onnx" || $b
|
|||
fi
|
||||
fi
|
||||
|
||||
if [[ $backend == "all" || $backend == "codegen_and_train" ]]; then
|
||||
if [[ $backend == "all" || $backend == "codegen" ]]; then
|
||||
# run codegen
|
||||
sh $cur_path/scripts/run_benchmark_codegen.sh -r $release_path -m $models_path -d $device_id -e $backend
|
||||
x86_status=$?
|
||||
|
@ -85,6 +85,9 @@ if [[ $backend == "all" || $backend == "codegen_and_train" ]]; then
|
|||
echo "Run codegen failed"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ $backend == "all" || $backend == "train" ]]; then
|
||||
# run train
|
||||
sh $cur_path/scripts/run_net_train.sh -r $release_path -m ${models_path}/../../models_train -d $device_id -e $backend
|
||||
x86_status=$?
|
||||
|
|
|
@ -253,14 +253,14 @@ echo "input backend is ${backend}"
|
|||
backend=${backend:-"all"}
|
||||
isFailed=0
|
||||
echo "current backend is ${backend}"
|
||||
if [[ $backend == "all" || $backend == "codegen" || $backend == "x86_codegen" || $backend == "codegen_and_train" ]]; then
|
||||
if [[ $backend == "all" || $backend == "codegen" || $backend == "x86_codegen" ]]; then
|
||||
# Run on x86-codegen
|
||||
echo "start Run x86 codegen ..."
|
||||
Run_x86_codegen ${build_path_x86} ${ms_models_path} ${models_codegen_config} ${run_x86_codegen_log_file} ${run_benchmark_result_file} &
|
||||
Run_x86_codegen_PID=$!
|
||||
sleep 1
|
||||
fi
|
||||
if [[ $backend == "all" || $backend == "codegen" || $backend == "x86_codegen" || $backend == "x86_codegen_parallel" || $backend == "codegen_and_train" ]]; then
|
||||
if [[ $backend == "all" || $backend == "codegen" || $backend == "x86_codegen" || $backend == "x86_codegen_parallel" ]]; then
|
||||
# Run on x86-codegen-parallel
|
||||
echo "start Run x86 codegen parallel ..."
|
||||
Run_x86_codegen ${build_path_parallel} ${ms_models_path} ${models_codegen_parallel_config} ${run_x86_codegen_parallel_log_file} ${run_benchmark_result_file} &
|
||||
|
@ -268,7 +268,7 @@ if [[ $backend == "all" || $backend == "codegen" || $backend == "x86_codegen" ||
|
|||
Run_x86_codegen_parallel_PID=$!
|
||||
sleep 1
|
||||
fi
|
||||
if [[ $backend == "all" || $backend == "codegen" || $backend == "arm64_codegen" || $backend == "codegen_and_train" ]]; then
|
||||
if [[ $backend == "all" || $backend == "codegen" || $backend == "arm64_codegen" ]]; then
|
||||
# Run on codegen
|
||||
echo "start Run arm64 codegen ..."
|
||||
Run_arm_codegen ${build_path_arm64} ${ms_models_path} ${models_codegen_config} ${run_arm64_fp32_codegen_log_file} ${run_benchmark_result_file} ${device_id} "arm64" &
|
||||
|
@ -276,7 +276,7 @@ if [[ $backend == "all" || $backend == "codegen" || $backend == "arm64_codegen"
|
|||
Run_arm64_codegen_PID=$!
|
||||
sleep 1
|
||||
fi
|
||||
if [[ $backend == "all" || $backend == "codegen" || $backend == "arm32_codegen" || $backend == "codegen_and_train" ]]; then
|
||||
if [[ $backend == "all" || $backend == "codegen" || $backend == "arm32_codegen" ]]; then
|
||||
# Run on arm32 codegen
|
||||
echo "start Run arm32 codegen ..."
|
||||
Run_arm_codegen ${build_path_arm32} ${ms_models_path} ${models_codegen_config} ${run_arm32_fp32_codegen_log_file} ${run_benchmark_result_file} ${device_id} "arm32" &
|
||||
|
@ -285,7 +285,7 @@ if [[ $backend == "all" || $backend == "codegen" || $backend == "arm32_codegen"
|
|||
sleep 1
|
||||
fi
|
||||
|
||||
if [[ $backend == "all" || $backend == "codegen" || $backend == "x86_codegen" || $backend == "codegen_and_train" ]]; then
|
||||
if [[ $backend == "all" || $backend == "codegen" || $backend == "x86_codegen" ]]; then
|
||||
wait ${Run_x86_codegen_PID}
|
||||
Run_x86_codegen_status=$?
|
||||
if [[ ${Run_x86_codegen_status} != 0 ]];then
|
||||
|
@ -294,7 +294,7 @@ if [[ $backend == "all" || $backend == "codegen" || $backend == "x86_codegen" ||
|
|||
isFailed=1
|
||||
fi
|
||||
fi
|
||||
if [[ $backend == "all" || $backend == "codegen" || $backend == "x86_codegen" || $backend == "x86_codegen_parallel" || $backend == "codegen_and_train" ]]; then
|
||||
if [[ $backend == "all" || $backend == "codegen" || $backend == "x86_codegen" || $backend == "x86_codegen_parallel" ]]; then
|
||||
wait ${Run_x86_codegen_parallel_PID}
|
||||
Run_x86_codegen_parallel_status=$?
|
||||
if [[ ${Run_x86_codegen_parallel_status} != 0 ]];then
|
||||
|
@ -303,7 +303,7 @@ if [[ $backend == "all" || $backend == "codegen" || $backend == "x86_codegen" ||
|
|||
isFailed=1
|
||||
fi
|
||||
fi
|
||||
if [[ $backend == "all" || $backend == "codegen" || $backend == "arm64_codegen" || $backend == "codegen_and_train" ]]; then
|
||||
if [[ $backend == "all" || $backend == "codegen" || $backend == "arm64_codegen" ]]; then
|
||||
wait ${Run_arm64_codegen_PID}
|
||||
Run_arm64_codegen_status=$?
|
||||
if [[ ${Run_arm64_codegen_status} != 0 ]];then
|
||||
|
@ -312,7 +312,7 @@ if [[ $backend == "all" || $backend == "codegen" || $backend == "arm64_codegen"
|
|||
isFailed=1
|
||||
fi
|
||||
fi
|
||||
if [[ $backend == "all" || $backend == "codegen" || $backend == "arm32_codegen" || $backend == "codegen_and_train" ]]; then
|
||||
if [[ $backend == "all" || $backend == "codegen" || $backend == "arm32_codegen" ]]; then
|
||||
wait ${Run_arm32_codegen_PID}
|
||||
Run_arm32_codegen_status=$?
|
||||
if [[ ${Run_arm32_codegen_status} != 0 ]];then
|
||||
|
|
|
@ -642,28 +642,28 @@ run_code_examples_log_file=${logs_path}/run_code_examples_log.txt
|
|||
echo 'run code examlpe logs: ' > ${run_code_examples_log_file}
|
||||
|
||||
isFailed=0
|
||||
if [[ $backend == "all" || $backend == "train" || $backend == "x86_train" || $backend == "codegen_and_train" ]]; then
|
||||
if [[ $backend == "all" || $backend == "train" || $backend == "x86_train" ]]; then
|
||||
# Run on x86
|
||||
echo "Start Run x86 ..."
|
||||
Run_x86 &
|
||||
Run_x86_PID=$!
|
||||
sleep 1
|
||||
fi
|
||||
if [[ $backend == "all" || $backend == "train" || $backend == "x86_train" || $backend == "x86-java" || $backend == "codegen_and_train" || $backend == "arm64_train" ]]; then
|
||||
if [[ $backend == "all" || $backend == "train" || $backend == "x86_train" || $backend == "x86-java" || $backend == "arm64_train" ]]; then
|
||||
# Run Code Examples
|
||||
echo "Start Code Examples ..."
|
||||
Run_CodeExamples &
|
||||
Run_CodeExamples_PID=$!
|
||||
sleep 1
|
||||
fi
|
||||
if [[ $backend == "all" || $backend == "train" || $backend == "arm64_train" || $backend == "codegen_and_train" ]]; then
|
||||
if [[ $backend == "all" || $backend == "train" || $backend == "arm64_train" ]]; then
|
||||
# Run on arm64
|
||||
echo "Start Run arm64 ..."
|
||||
Run_arm arm64 &
|
||||
Run_arm64_PID=$!
|
||||
sleep 1
|
||||
fi
|
||||
if [[ $backend == "all" || $backend == "train" || $backend == "arm32_train" || $backend == "codegen_and_train" ]]; then
|
||||
if [[ $backend == "all" || $backend == "train" || $backend == "arm32_train" ]]; then
|
||||
# Run on arm32
|
||||
echo "Start Run arm32 ..."
|
||||
Run_arm arm32 &
|
||||
|
@ -671,7 +671,7 @@ if [[ $backend == "all" || $backend == "train" || $backend == "arm32_train" || $
|
|||
sleep 1
|
||||
fi
|
||||
|
||||
if [[ $backend == "all" || $backend == "train" || $backend == "x86_train" || $backend == "codegen_and_train" ]]; then
|
||||
if [[ $backend == "all" || $backend == "train" || $backend == "x86_train" ]]; then
|
||||
wait ${Run_x86_PID}
|
||||
Run_x86_status=$?
|
||||
if [[ ${Run_x86_status} != 0 ]];then
|
||||
|
@ -680,7 +680,7 @@ if [[ $backend == "all" || $backend == "train" || $backend == "x86_train" || $ba
|
|||
isFailed=1
|
||||
fi
|
||||
fi
|
||||
if [[ $backend == "all" || $backend == "train" || $backend == "x86_train" || $backend == "x86-java" || $backend == "codegen_and_train" || $backend == "arm64_train" ]]; then
|
||||
if [[ $backend == "all" || $backend == "train" || $backend == "x86_train" || $backend == "x86-java" || $backend == "arm64_train" ]]; then
|
||||
wait ${Run_CodeExamples_PID}
|
||||
Run_CodeExamples_status=$?
|
||||
if [[ ${Run_CodeExamples_status} != 0 ]];then
|
||||
|
@ -689,7 +689,7 @@ if [[ $backend == "all" || $backend == "train" || $backend == "x86_train" || $ba
|
|||
isFailed=1
|
||||
fi
|
||||
fi
|
||||
if [[ $backend == "all" || $backend == "train" || $backend == "arm64_train" || $backend == "codegen_and_train" ]]; then
|
||||
if [[ $backend == "all" || $backend == "train" || $backend == "arm64_train" ]]; then
|
||||
wait ${Run_arm64_PID}
|
||||
Run_arm64_status=$?
|
||||
if [[ ${Run_arm64_status} != 0 ]];then
|
||||
|
@ -698,7 +698,7 @@ if [[ $backend == "all" || $backend == "train" || $backend == "arm64_train" || $
|
|||
isFailed=1
|
||||
fi
|
||||
fi
|
||||
if [[ $backend == "all" || $backend == "train" || $backend == "arm32_train" || $backend == "codegen_and_train" ]]; then
|
||||
if [[ $backend == "all" || $backend == "train" || $backend == "arm32_train" ]]; then
|
||||
wait ${Run_arm32_PID}
|
||||
Run_arm32_status=$?
|
||||
if [[ ${Run_arm32_status} != 0 ]];then
|
||||
|
|
Loading…
Reference in New Issue