Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle-Lite
提交
875daa4d
P
Paddle-Lite
项目概览
PaddlePaddle
/
Paddle-Lite
通知
331
Star
4
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
271
列表
看板
标记
里程碑
合并请求
78
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle-Lite
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
271
Issue
271
列表
看板
标记
里程碑
合并请求
78
合并请求
78
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
875daa4d
编写于
3月 09, 2020
作者:
S
Santa An
提交者:
GitHub
3月 09, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
* support download bm_sdk, test=develop (#3093)
上级
f6e09aaf
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
19 addition
and
12 deletion
+19
-12
lite/kernels/bm/bridges/graph.cc
lite/kernels/bm/bridges/graph.cc
+4
-0
lite/kernels/bm/subgraph_compute.cc
lite/kernels/bm/subgraph_compute.cc
+0
-1
lite/kernels/npu/bridges/engine.cc
lite/kernels/npu/bridges/engine.cc
+3
-4
lite/tools/build_bm.sh
lite/tools/build_bm.sh
+12
-7
未找到文件。
lite/kernels/bm/bridges/graph.cc
浏览文件 @
875daa4d
...
...
@@ -25,7 +25,11 @@ void Graph::AddNode(const std::string& name) {
}
void
Graph
::
CreateCompilerHandle
()
{
#ifdef BM1682
compiler_handle_
=
create_bmcompiler
(
"BM1682"
);
#else
compiler_handle_
=
create_bmcompiler
(
"BM1684"
);
#endif
CHECK
(
compiler_handle_
!=
nullptr
);
}
...
...
lite/kernels/bm/subgraph_compute.cc
浏览文件 @
875daa4d
...
...
@@ -34,7 +34,6 @@ int SubgraphEngine::BuildDeviceProgram() {
const
auto
&
bridges
=
subgraph
::
Registry
::
Instance
();
graph
.
CreateCompilerHandle
();
auto
&
ctx
=
this
->
ctx_
->
template
As
<
BMContext
>();
int
kk
=
0
;
for
(
auto
&
inst
:
origin_program_
)
{
auto
op
=
inst
.
op
();
CHECK
(
op
);
...
...
lite/kernels/npu/bridges/engine.cc
浏览文件 @
875daa4d
...
...
@@ -56,12 +56,11 @@ int Engine::BuildOriginProgram() {
}
else
{
VLOG
(
3
)
<<
"The attr '"
<<
kKernelTypeAttr
<<
"' not found, pick the first kernel for "
<<
op_type
;
std
::
vector
<
std
::
unique_ptr
<
KernelBase
>>
kernels
;
#if defined(LITE_WITH_ARM)
auto
kernels
=
op
->
CreateKernels
({
Place
{
TARGET
(
kARM
)},
Place
{
TARGET
(
kHost
)}});
kernels
=
op
->
CreateKernels
({
Place
{
TARGET
(
kARM
)},
Place
{
TARGET
(
kHost
)}});
#elif defined(LITE_WITH_X86)
auto
kernels
=
op
->
CreateKernels
({
Place
{
TARGET
(
kX86
)},
Place
{
TARGET
(
kHost
)}});
kernels
=
op
->
CreateKernels
({
Place
{
TARGET
(
kX86
)},
Place
{
TARGET
(
kHost
)}});
#endif
if
(
kernels
.
size
()
>
0
)
{
picked_kernel
=
std
::
move
(
kernels
.
front
());
...
...
lite/tools/build_bm.sh
浏览文件 @
875daa4d
...
...
@@ -2,7 +2,7 @@
set
-ex
# global variables with default value
BM_SDK_ROOT
=
"
$(
pwd
)
/
../BM_SDK
"
# BM SDK
BM_SDK_ROOT
=
"
$(
pwd
)
/
third-party/bmlibs/bm_sc3_libs
"
# BM SDK
TARGET_NAME
=
"BM1682"
# default target
BUILD_EXTRA
=
OFF
# ON(with sequence ops)/OFF
WITH_TESTING
=
ON
# ON/OFF
...
...
@@ -39,6 +39,11 @@ function prepare_thirdparty {
else
git submodule update
--init
--recursive
fi
# clone bmlibs
if
[
!
-d
${
workspace
}
/third-party/bmlibs
]
;
then
git clone https://github.com/AnBaolei1984/bmlibs.git
${
workspace
}
/third-party/bmlibs
fi
}
# for code gen, a source file is generated after a test, but is dependended by some targets in cmake.
...
...
@@ -70,8 +75,8 @@ function build_bm {
${
CMAKE_COMMON_OPTIONS
}
\
-DWITH_GPU
=
OFF
\
-DWITH_MKLDNN
=
OFF
\
-DLITE_WITH_X86
=
O
N
\
-DWITH_MKL
=
O
N
\
-DLITE_WITH_X86
=
O
FF
\
-DWITH_MKL
=
O
FF
\
-DLITE_BUILD_EXTRA
=
ON
\
-DLITE_WITH_XPU
=
OFF
\
-DLITE_WITH_BM
=
ON
\
...
...
@@ -92,10 +97,10 @@ function main {
TARGET_NAME
=
"
${
i
#*=
}
"
shift
;;
--bm_sdk_root
=
*
)
BM_SDK_ROOT
=
"
${
i
#*=
}
"
shift
;;
#
--bm_sdk_root=*)
#
BM_SDK_ROOT="${i#*=}"
#
shift
#
;;
bm
)
build_bm
shift
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录