提交 f385f2a4 编写于 作者: Z zhoufeng

default build command

 "-z" (minddata) and "-M on" (gpu) by default in build.sh
上级 7a367af9
......@@ -26,7 +26,7 @@ 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 " [-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 "Options:"
echo " -d Debug mode"
......@@ -50,8 +50,8 @@ usage()
echo " -P Enable dump anf graph to file in ProtoBuffer format, default on"
echo " -Q Enable dump end to end, default off"
echo " -D Enable dumping of function graph ir, default on"
echo " -z Compile dataset & mindrecord, default off"
echo " -M Enable MPI and NCCL for GPU training, default off"
echo " -z Compile dataset & mindrecord, default on"
echo " -M Enable MPI and NCCL for GPU training, default on"
echo " -V Specify the minimum required cuda version, default CUDA 9.2"
echo " -I Compile predict, default off"
echo " -K Compile with AKG, default off"
......@@ -88,8 +88,8 @@ checkopts()
ENABLE_DUMP2PROTO="on"
ENABLE_DUMPE2E="off"
ENABLE_DUMP_IR="on"
COMPILE_MINDDATA="off"
ENABLE_MPI="off"
COMPILE_MINDDATA="on"
ENABLE_MPI="on"
CUDA_VERSION="9.2"
COMPILE_PREDICT="off"
USE_GLOG="on"
......@@ -177,7 +177,7 @@ checkopts()
if [[ "X$OPTARG" == "Xgpu" ]]; then
ENABLE_GPU="on"
ENABLE_CPU="on"
elif [[ "X$OPTARG" == "Xd" ]]; then
elif [[ "X$OPTARG" == "Xd" || "X$OPTARG" == "Xascend" ]]; then
ENABLE_D="on"
ENABLE_CPU="on"
elif [[ "X$OPTARG" == "Xcpu" ]]; then
......@@ -216,7 +216,17 @@ checkopts()
echo "enable dump function graph ir"
;;
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)
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/rang.cmake)
include(${CMAKE_SOURCE_DIR}/cmake/external_libs/tvm_gpu.cmake)
endif()
if (ENABLE_MPI)
include(${CMAKE_SOURCE_DIR}/cmake/external_libs/nccl.cmake)
include(${CMAKE_SOURCE_DIR}/cmake/external_libs/ompi.cmake)
if (ENABLE_MPI)
include(${CMAKE_SOURCE_DIR}/cmake/external_libs/nccl.cmake)
include(${CMAKE_SOURCE_DIR}/cmake/external_libs/ompi.cmake)
endif()
endif()
if (ENABLE_GE)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册