default enable akg on mindspore and mindspore-lite
This commit is contained in:
parent
bfb0a7d54a
commit
6a134f95ef
|
@ -235,11 +235,13 @@ void GPUSession::RunOpHardwareOptimize(const std::shared_ptr<KernelGraph> &kerne
|
|||
}
|
||||
|
||||
void GPUSession::GraphKernelOptimize(const std::shared_ptr<KernelGraph> &kernel_graph) {
|
||||
#ifdef ENABLE_AKG
|
||||
if (!graphkernel::GraphKernelFlags::GetInstance().IsEnableGraphKernel()) {
|
||||
return;
|
||||
}
|
||||
graphkernel::GraphKernelOptimize(kernel_graph);
|
||||
kernel_graph->SetExecOrderByDefault();
|
||||
#endif
|
||||
}
|
||||
|
||||
void GPUSession::AssignStream(const std::shared_ptr<KernelGraph> &kernel_graph) {
|
||||
|
|
|
@ -36,7 +36,6 @@ void ScatterNdCheckShape(const PrimitivePtr &prim, const AbstractBasePtrList &in
|
|||
if (out_shape.empty()) {
|
||||
MS_EXCEPTION(ValueError) << "For '" << prim->name() << "', the input 'shape' can not be empty.";
|
||||
}
|
||||
|
||||
// the last dimension of indices_shape, use the same variable 'N' as document.
|
||||
if (indices_shape.back() == abstract::Shape::SHP_ANY) {
|
||||
MS_EXCEPTION(ValueError) << "For '" << prim->name() << "', the last dimension of 'indices' can not be dynamic.";
|
||||
|
|
|
@ -774,6 +774,10 @@ fi
|
|||
get_version
|
||||
CMAKE_ARGS="${CMAKE_ARGS} -DVERSION_STR=${VERSION_STR}"
|
||||
|
||||
if [[ "X$LITE_PLATFORM" != "Xx86_64" ]]; then
|
||||
export ENABLE_AKG="off"
|
||||
fi
|
||||
|
||||
if [[ "X$LITE_ENABLE_AAR" = "Xon" ]]; then
|
||||
build_aar
|
||||
elif [[ "X$LITE_PLATFORM" != "X" ]]; then
|
||||
|
|
|
@ -43,7 +43,7 @@ init_default_options()
|
|||
export LITE_PLATFORM=""
|
||||
export LITE_ENABLE_AAR="off"
|
||||
export USE_GLOG="on"
|
||||
export ENABLE_AKG="off"
|
||||
export ENABLE_AKG="on"
|
||||
export ENABLE_ACL="off"
|
||||
export ENABLE_D="off"
|
||||
export ENABLE_DEBUGGER="on"
|
||||
|
|
|
@ -49,6 +49,7 @@ parse_device()
|
|||
# building 310 package by giving specific -V 310 instruction
|
||||
if [[ "X$DEVICE_VERSION" == "X310" ]]; then
|
||||
ENABLE_ACL="on"
|
||||
export ENABLE_AKG="off"
|
||||
# universal ascend package
|
||||
elif [[ "X$DEVICE_VERSION" == "X910" ]]; then
|
||||
export ENABLE_D="on"
|
||||
|
@ -72,7 +73,7 @@ parse_device()
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if [[ "X$ENABLE_AKG" == "Xon" && "X$ENABLE_D" != "Xon" ]]; then
|
||||
if [[ "X$ENABLE_AKG" == "Xon" && "X$ENABLE_D" != "Xon" && "X$ENABLE_CPU" == "Xon" ]]; then
|
||||
# check llvm version for akg
|
||||
HAS_LLVM=`bash ${BASEPATH}/scripts/build/akg_find_llvm.sh`
|
||||
export USE_LLVM=$HAS_LLVM
|
||||
|
|
|
@ -84,8 +84,8 @@ process_options()
|
|||
I)
|
||||
build_option_proc_upper_i ;;
|
||||
K)
|
||||
export ENABLE_AKG="on"
|
||||
echo "enable compile with akg" ;;
|
||||
check_on_off $OPTARG K
|
||||
export ENABLE_AKG="$OPTARG" ;;
|
||||
B)
|
||||
build_option_proc_upper_b ;;
|
||||
E)
|
||||
|
|
|
@ -52,7 +52,7 @@ usage()
|
|||
echo " -V Specify the device version, if -e gpu, default CUDA 10.1, if -e ascend, default Ascend 910"
|
||||
echo " -I Enable compiling mindspore lite for arm64, arm32 or x86_64, default disable mindspore lite compilation"
|
||||
echo " -A Enable compiling mindspore lite aar package, option: on/off, default: off"
|
||||
echo " -K Compile with AKG, default on if -e gpu or -e ascend, else default off"
|
||||
echo " -K Compile with AKG, default on"
|
||||
echo " -B Enable debugger, default on"
|
||||
echo " -E Enable IBVERBS for parameter server, default off"
|
||||
echo " -l Compile with python dependency, default on"
|
||||
|
|
Loading…
Reference in New Issue