Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle-Lite
提交
c9deac4a
P
Paddle-Lite
项目概览
PaddlePaddle
/
Paddle-Lite
通知
338
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看板
未验证
提交
c9deac4a
编写于
7月 16, 2018
作者:
E
eclipsycn
提交者:
GitHub
7月 16, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #567 from dolphin8/develop
fix
#558
上级
9862e591
78c06e18
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
37 addition
and
3 deletion
+37
-3
Dockerfile
Dockerfile
+2
-1
doc/build.md
doc/build.md
+6
-1
src/jni/paddle_mobile_jni.cpp
src/jni/paddle_mobile_jni.cpp
+1
-0
src/operators/math/pooling.h
src/operators/math/pooling.h
+1
-1
tools/net.awk
tools/net.awk
+27
-0
未找到文件。
Dockerfile
浏览文件 @
c9deac4a
...
...
@@ -32,6 +32,7 @@ RUN cd /tmp && curl -O http://mirrors.neusoft.edu.cn/android/repository/android-
RUN
curl
-O
https://mms-res.cdn.bcebos.com/cmake-3.10.3-Linux-x86_64.tar.gz
&&
\
tar
xzf cmake-3.10.3-Linux-x86_64.tar.gz
&&
\
mv
cmake-3.10.3-Linux-x86_64 /opt/cmake-3.10
&&
\
mv
/usr/bin/cmake /usr/bin/cmake.bak
&&
ln
-s
/opt/cmake-3.10/bin/cmake /usr/bin/cmake
mv
/usr/bin/cmake /usr/bin/cmake.bak
&&
ln
-s
/opt/cmake-3.10/bin/cmake /usr/bin/cmake
&&
\
mv
/usr/bin/ccmake /usr/bin/ccmake.bak
&&
ln
-s
/opt/cmake-3.10/bin/ccmake /usr/bin/ccmake
RUN
cd
/opt
&&
unzip /tmp/android-ndk-r17b-linux-x86_64.zip
ENV
NDK_ROOT /opt/android-ndk-r17b
doc/build.md
浏览文件 @
c9deac4a
...
...
@@ -19,9 +19,14 @@ paddle-mobile dev 33b146787711 45 hours ago 372MB
```
$ docker run -it --mount type=bind,source=$PWD,target=/paddle-mobile paddle-mobile:dev
root@5affd29d4fc5:/ # cd /paddle-mobile
###
### paddle-mobile 支持 arm 架构下的各种平台,包括 android 以及 linux 等,可以使用不同的
### toolchain 文件生成满足需要的 makefile
###
# 生成构建 android 产出的 Makefile
root@5affd29d4fc5:/ # rm CMakeCache.txt
root@5affd29d4fc5:/ # cmake -DCMAKE_TOOLCHAIN_FILE=tools/toolchains/arm-android-neon.cmake
# 生成构建 linux 产出的 Makefile
root@5affd29d4fc5:/ # rm CMakeCache.txt
root@5affd29d4fc5:/ # cmake -DCMAKE_TOOLCHAIN_FILE=tools/toolchains/arm-linux-gnueabi.cmake
...
...
@@ -56,4 +61,4 @@ root@5affd29d4fc5:/ # make
构架产出可以在 host 机器上查看,在 paddle-mobile 的目录下,build 以及 test/build 下,可以使用 adb 指令或者 scp 传输到 device 上执行
## 不使用 docker
不使用 docker 的方法,可以直接用 cmake 生成 makefile 后构建。使用 ndk 构建 android 应用需要正确设置 NDK_ROOT。构建 linux 应用需要安装 arm-linux-gnueabi-gcc 或者类似的交叉编译工具,可能需要设置 CC,CXX 环境变量,或者在 tools/toolchains/ 中修改 arm-linux-gnueabi.cmake,或者增加自己需要的 toolchain file。
\ No newline at end of file
不使用 docker 的方法,可以直接用 cmake 生成 makefile 后构建。使用 ndk 构建 android 应用需要正确设置 NDK_ROOT。构建 linux 应用需要安装 arm-linux-gnueabi-gcc 或者类似的交叉编译工具,可能需要设置 CC,CXX 环境变量,或者在 tools/toolchains/ 中修改 arm-linux-gnueabi.cmake,或者增加自己需要的 toolchain file。
src/jni/paddle_mobile_jni.cpp
浏览文件 @
c9deac4a
...
...
@@ -15,6 +15,7 @@ limitations under the License. */
#ifdef ANDROID
#include "paddle_mobile_jni.h"
#include <cmath>
#include "common/log.h"
#include "framework/tensor.h"
#include "io/paddle_mobile.h"
...
...
src/operators/math/pooling.h
浏览文件 @
c9deac4a
...
...
@@ -65,7 +65,7 @@ class PoolFunctor {
const
std
::
vector
<
int
>
&
paddings
,
PoolProcess
pool_compute
,
framework
::
Tensor
*
output
);
};
}
}
// namespace math
}
// namespace operators
}
// namespace paddle_mobile
...
...
tools/net.awk
0 → 100644
浏览文件 @
c9deac4a
BEGIN
{
print
"digraph {"
}
/op:/
{
id
++
op
=
$NF
opname
=
op
"_"
id
print
opname
"[\"label\"=\""
op
" ["
id
"]"
"\"]"
}
/input/
{
type
=
"input"
}
/output/
{
type
=
"output"
}
/argument/
{
if
(
type
==
"output"
)
{
output
[
$NF
]
=
opname
}
else
if
(
type
==
"input"
)
{
if
(
output
[
$NF
])
{
print
output
[
$NF
]
" -> "
opname
}
}
}
END
{
print
"}"
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录