Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
magicwindyyd
mindspore
提交
61d24efb
M
mindspore
项目概览
magicwindyyd
/
mindspore
与 Fork 源项目一致
Fork自
MindSpore / mindspore
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
mindspore
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
61d24efb
编写于
8月 05, 2020
作者:
M
mindspore-ci-bot
提交者:
Gitee
8月 05, 2020
浏览文件
操作
浏览文件
下载
差异文件
!3984 add -e gpu & add -DBUILD_MINDDATA
Merge pull request !3984 from hangq/master
上级
a301fc17
320d3315
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
19 addition
and
8 deletion
+19
-8
build.sh
build.sh
+18
-7
mindspore/lite/CMakeLists.txt
mindspore/lite/CMakeLists.txt
+1
-1
未找到文件。
build.sh
浏览文件 @
61d24efb
...
...
@@ -26,7 +26,7 @@ usage()
echo
"bash build.sh [-d] [-r] [-v] [-c on|off] [-t on|off] [-g on|off] [-h] [-b ge] [-m infer|train]
\\
"
echo
" [-a on|off] [-Q on|off] [-p on|off] [-i] [-L] [-R] [-D on|off] [-j[n]] [-e gpu|d|cpu]
\\
"
echo
" [-P on|off] [-z [on|off]] [-M on|off] [-V 9.2|10.1] [-I arm64|arm32|x86_64] [-K]
\\
"
echo
" [-B on|off] [-w on|off] [-E] [-l on|off]"
echo
" [-B on|off] [-w on|off] [-E] [-l on|off]
[-n]
"
echo
""
echo
"Options:"
echo
" -d Debug mode"
...
...
@@ -50,6 +50,7 @@ usage()
echo
" -Q Enable dump memory, default off"
echo
" -D Enable dumping of function graph ir, default on"
echo
" -z Compile dataset & mindrecord, default on"
echo
" -n Compile minddata lite"
echo
" -M Enable MPI and NCCL for GPU training, gpu default on"
echo
" -V Specify the minimum required cuda version, default CUDA 10.1"
echo
" -I Compile lite"
...
...
@@ -92,6 +93,7 @@ checkopts()
ENABLE_DUMPE2E
=
"off"
ENABLE_DUMP_IR
=
"on"
COMPILE_MINDDATA
=
"on"
COMPILE_MINDDATA_LITE
=
"off"
ENABLE_MPI
=
"off"
CUDA_VERSION
=
"10.1"
COMPILE_LITE
=
"off"
...
...
@@ -104,15 +106,19 @@ checkopts()
ENABLE_DEBUGGER
=
"off"
ENABLE_IBVERBS
=
"off"
ENABLE_PYTHON
=
"on"
ENABLE_GPU
=
"off"
# Process the options
while
getopts
'drvj:c:t:hsb:a:g:p:ie:m:l:I:LRP:Q:D:zM:V:K:swB:E'
opt
while
getopts
'drvj:c:t:hsb:a:g:p:ie:m:l:I:LRP:Q:D:zM:V:K:swB:E
n
'
opt
do
OPTARG
=
$(
echo
${
OPTARG
}
|
tr
'[A-Z]'
'[a-z]'
)
case
"
${
opt
}
"
in
d
)
DEBUG_MODE
=
"on"
;;
n
)
COMPILE_MINDDATA_LITE
=
"on"
;;
r
)
DEBUG_MODE
=
"off"
;;
...
...
@@ -567,7 +573,7 @@ build_lite()
{
echo
"start build mindspore lite project"
if
[
"
${
ENABLE_GPU
}
"
==
"on"
]
||
[
"
${
LITE_PLATFORM
}
"
==
"arm64"
]
;
then
if
[
"
${
ENABLE_GPU
}
"
==
"on"
]
&&
[
"
${
LITE_PLATFORM
}
"
==
"arm64"
]
;
then
echo
"start build opencl"
build_opencl
fi
...
...
@@ -577,7 +583,9 @@ build_lite()
build_flatbuffer
build_gtest
build_minddata_lite_deps
if
[
"
${
COMPILE_MINDDATA_LITE
}
"
==
"on"
]
;
then
build_minddata_lite_deps
fi
cd
"
${
BASEPATH
}
/mindspore/lite"
if
[[
"
${
INC_BUILD
}
"
==
"off"
]]
;
then
...
...
@@ -596,17 +604,20 @@ build_lite()
-DANDROID_NDK
=
"
${
ANDROID_NDK
}
"
-DANDROID_ABI
=
"arm64-v8a"
-DANDROID_TOOLCHAIN_NAME
=
"aarch64-linux-android-clang"
\
-DANDROID_STL
=
"c++_shared"
-DCMAKE_BUILD_TYPE
=
${
BUILD_TYPE
}
-DSUPPORT_TRAIN
=
${
SUPPORT_TRAIN
}
\
-DBUILD_DEVICE
=
on
-DPLATFORM_ARM64
=
on
-DBUILD_CONVERTER
=
off
-DENABLE_NEON
=
on
-DENABLE_FP16
=
"off"
\
-DSUPPORT_GPU
=
on
-DOFFLINE_COMPILE
=
${
OPENCL_OFFLINE_COMPILE
}
"
${
BASEPATH
}
/mindspore/lite"
-DSUPPORT_GPU
=
${
ENABLE_GPU
}
-DOFFLINE_COMPILE
=
${
OPENCL_OFFLINE_COMPILE
}
-DBUILD_MINDDATA
=
${
COMPILE_MINDDATA_LITE
}
\
"
${
BASEPATH
}
/mindspore/lite"
elif
[[
"
${
LITE_PLATFORM
}
"
==
"arm32"
]]
;
then
checkndk
cmake
-DCMAKE_TOOLCHAIN_FILE
=
"
${
ANDROID_NDK
}
/build/cmake/android.toolchain.cmake"
-DANDROID_NATIVE_API_LEVEL
=
"19"
\
-DANDROID_NDK
=
"
${
ANDROID_NDK
}
"
-DANDROID_ABI
=
"armeabi-v7a"
-DANDROID_TOOLCHAIN_NAME
=
"clang"
\
-DANDROID_STL
=
"c++_shared"
-DCMAKE_BUILD_TYPE
=
${
BUILD_TYPE
}
\
-DBUILD_DEVICE
=
on
-DPLATFORM_ARM32
=
on
-DENABLE_NEON
=
on
-DSUPPORT_TRAIN
=
${
SUPPORT_TRAIN
}
-DBUILD_CONVERTER
=
off
\
-DSUPPORT_GPU
=
${
ENABLE_GPU
}
-DOFFLINE_COMPILE
=
${
OPENCL_OFFLINE_COMPILE
}
"
${
BASEPATH
}
/mindspore/lite"
-DSUPPORT_GPU
=
${
ENABLE_GPU
}
-DOFFLINE_COMPILE
=
${
OPENCL_OFFLINE_COMPILE
}
-DBUILD_MINDDATA
=
${
COMPILE_MINDDATA_LITE
}
\
"
${
BASEPATH
}
/mindspore/lite"
else
cmake
-DBUILD_DEVICE
=
on
-DPLATFORM_ARM64
=
off
-DBUILD_CONVERTER
=
${
ENABLE_CONVERTER
}
-DSUPPORT_TRAIN
=
${
SUPPORT_TRAIN
}
\
-DCMAKE_BUILD_TYPE
=
${
BUILD_TYPE
}
-DSUPPORT_GPU
=
${
ENABLE_GPU
}
-DOFFLINE_COMPILE
=
${
OPENCL_OFFLINE_COMPILE
}
"
${
BASEPATH
}
/mindspore/lite"
-DCMAKE_BUILD_TYPE
=
${
BUILD_TYPE
}
-DSUPPORT_GPU
=
${
ENABLE_GPU
}
-DBUILD_MINDDATA
=
${
COMPILE_MINDDATA_LITE
}
\
-DOFFLINE_COMPILE
=
${
OPENCL_OFFLINE_COMPILE
}
"
${
BASEPATH
}
/mindspore/lite"
fi
VERBOSE
=
2 make
-j
$THREAD_NUM
COMPILE_RET
=
$?
...
...
mindspore/lite/CMakeLists.txt
浏览文件 @
61d24efb
...
...
@@ -33,7 +33,7 @@ option(BUILD_CONVERTER "if build converter" on)
option
(
ENABLE_FP16
"if build fp16 ops"
off
)
option
(
SUPPORT_GPU
"if support gpu"
off
)
option
(
OFFLINE_COMPILE
"if offline compile OpenCL kernel"
off
)
option
(
BUILD_MINDDATA
""
o
n
)
option
(
BUILD_MINDDATA
""
o
ff
)
if
(
BUILD_DEVICE
)
add_compile_definitions
(
BUILD_DEVICE
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录