forked from mindspore-Ecosystem/mindspore
default build command
"-z" (minddata) and "-M on" (gpu) by default in build.sh
This commit is contained in:
parent
7a367af9c6
commit
f385f2a48b
24
build.sh
24
build.sh
|
@ -26,7 +26,7 @@ usage()
|
||||||
echo "Usage:"
|
echo "Usage:"
|
||||||
echo "bash build.sh [-d] [-r] [-v] [-c on|off] [-t on|off] [-g on|off] [-h] [-s] [-b ge|cpu] [-m infer|train] \\"
|
echo "bash build.sh [-d] [-r] [-v] [-c on|off] [-t on|off] [-g on|off] [-h] [-s] [-b ge|cpu] [-m infer|train] \\"
|
||||||
echo " [-a on|off] [-g on|off] [-p on|off] [-i] [-L] [-R] [-D on|off] [-j[n]] [-e gpu|d|cpu] \\"
|
echo " [-a on|off] [-g on|off] [-p on|off] [-i] [-L] [-R] [-D on|off] [-j[n]] [-e gpu|d|cpu] \\"
|
||||||
echo " [-P on|off] [-z] [-M on|off] [-V 9.2|10.1] [-I] [-K]"
|
echo " [-P on|off] [-z [on|off]] [-M on|off] [-V 9.2|10.1] [-I] [-K]"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Options:"
|
echo "Options:"
|
||||||
echo " -d Debug mode"
|
echo " -d Debug mode"
|
||||||
|
@ -50,8 +50,8 @@ usage()
|
||||||
echo " -P Enable dump anf graph to file in ProtoBuffer format, default on"
|
echo " -P Enable dump anf graph to file in ProtoBuffer format, default on"
|
||||||
echo " -Q Enable dump end to end, default off"
|
echo " -Q Enable dump end to end, default off"
|
||||||
echo " -D Enable dumping of function graph ir, default on"
|
echo " -D Enable dumping of function graph ir, default on"
|
||||||
echo " -z Compile dataset & mindrecord, default off"
|
echo " -z Compile dataset & mindrecord, default on"
|
||||||
echo " -M Enable MPI and NCCL for GPU training, default off"
|
echo " -M Enable MPI and NCCL for GPU training, default on"
|
||||||
echo " -V Specify the minimum required cuda version, default CUDA 9.2"
|
echo " -V Specify the minimum required cuda version, default CUDA 9.2"
|
||||||
echo " -I Compile predict, default off"
|
echo " -I Compile predict, default off"
|
||||||
echo " -K Compile with AKG, default off"
|
echo " -K Compile with AKG, default off"
|
||||||
|
@ -88,8 +88,8 @@ checkopts()
|
||||||
ENABLE_DUMP2PROTO="on"
|
ENABLE_DUMP2PROTO="on"
|
||||||
ENABLE_DUMPE2E="off"
|
ENABLE_DUMPE2E="off"
|
||||||
ENABLE_DUMP_IR="on"
|
ENABLE_DUMP_IR="on"
|
||||||
COMPILE_MINDDATA="off"
|
COMPILE_MINDDATA="on"
|
||||||
ENABLE_MPI="off"
|
ENABLE_MPI="on"
|
||||||
CUDA_VERSION="9.2"
|
CUDA_VERSION="9.2"
|
||||||
COMPILE_PREDICT="off"
|
COMPILE_PREDICT="off"
|
||||||
USE_GLOG="on"
|
USE_GLOG="on"
|
||||||
|
@ -177,7 +177,7 @@ checkopts()
|
||||||
if [[ "X$OPTARG" == "Xgpu" ]]; then
|
if [[ "X$OPTARG" == "Xgpu" ]]; then
|
||||||
ENABLE_GPU="on"
|
ENABLE_GPU="on"
|
||||||
ENABLE_CPU="on"
|
ENABLE_CPU="on"
|
||||||
elif [[ "X$OPTARG" == "Xd" ]]; then
|
elif [[ "X$OPTARG" == "Xd" || "X$OPTARG" == "Xascend" ]]; then
|
||||||
ENABLE_D="on"
|
ENABLE_D="on"
|
||||||
ENABLE_CPU="on"
|
ENABLE_CPU="on"
|
||||||
elif [[ "X$OPTARG" == "Xcpu" ]]; then
|
elif [[ "X$OPTARG" == "Xcpu" ]]; then
|
||||||
|
@ -216,7 +216,17 @@ checkopts()
|
||||||
echo "enable dump function graph ir"
|
echo "enable dump function graph ir"
|
||||||
;;
|
;;
|
||||||
z)
|
z)
|
||||||
COMPILE_MINDDATA="on"
|
eval ARG=\$\{$OPTIND\}
|
||||||
|
if [[ -n $ARG && $ARG != -* ]]; then
|
||||||
|
OPTARG=$ARG
|
||||||
|
check_on_off $OPTARG z
|
||||||
|
OPTIND=$((OPTIND + 1))
|
||||||
|
else
|
||||||
|
OPTARG=""
|
||||||
|
fi
|
||||||
|
if [[ "X$OPTARG" == "Xoff" ]]; then
|
||||||
|
COMPILE_MINDDATA="off"
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
I)
|
I)
|
||||||
COMPILE_PREDICT="on"
|
COMPILE_PREDICT="on"
|
||||||
|
|
|
@ -29,11 +29,11 @@ if (ENABLE_GPU)
|
||||||
include(${CMAKE_SOURCE_DIR}/cmake/external_libs/dmlc_core.cmake)
|
include(${CMAKE_SOURCE_DIR}/cmake/external_libs/dmlc_core.cmake)
|
||||||
include(${CMAKE_SOURCE_DIR}/cmake/external_libs/rang.cmake)
|
include(${CMAKE_SOURCE_DIR}/cmake/external_libs/rang.cmake)
|
||||||
include(${CMAKE_SOURCE_DIR}/cmake/external_libs/tvm_gpu.cmake)
|
include(${CMAKE_SOURCE_DIR}/cmake/external_libs/tvm_gpu.cmake)
|
||||||
endif()
|
|
||||||
|
|
||||||
if (ENABLE_MPI)
|
if (ENABLE_MPI)
|
||||||
include(${CMAKE_SOURCE_DIR}/cmake/external_libs/nccl.cmake)
|
include(${CMAKE_SOURCE_DIR}/cmake/external_libs/nccl.cmake)
|
||||||
include(${CMAKE_SOURCE_DIR}/cmake/external_libs/ompi.cmake)
|
include(${CMAKE_SOURCE_DIR}/cmake/external_libs/ompi.cmake)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (ENABLE_GE)
|
if (ENABLE_GE)
|
||||||
|
|
Loading…
Reference in New Issue