Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle-Lite
提交
0062bf52
P
Paddle-Lite
项目概览
PaddlePaddle
/
Paddle-Lite
通知
332
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看板
提交
0062bf52
编写于
8月 14, 2018
作者:
H
hanbuhe
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
revert commit
上级
10bba751
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
5 addition
and
91 deletion
+5
-91
CMakeLists.txt
CMakeLists.txt
+3
-3
src/io/executor.cpp
src/io/executor.cpp
+0
-5
src/operators/feed_op.h
src/operators/feed_op.h
+2
-2
src/operators/kernel/fpga/conv_add_kernel.cpp
src/operators/kernel/fpga/conv_add_kernel.cpp
+0
-42
src/operators/kernel/fpga/conv_kernel.cpp
src/operators/kernel/fpga/conv_kernel.cpp
+0
-38
tools/op.cmake
tools/op.cmake
+0
-1
未找到文件。
CMakeLists.txt
浏览文件 @
0062bf52
...
...
@@ -6,9 +6,9 @@ option(USE_OPENMP "openmp support" OFF)
option
(
USE_EXCEPTION
"use std exception"
ON
)
option
(
LOG_PROFILE
"log profile"
ON
)
# select the platform to build
option
(
CPU
"armv7 with neon"
O
FF
)
option
(
CPU
"armv7 with neon"
O
N
)
option
(
MALI_GPU
"mali gpu"
OFF
)
option
(
FPGA
"fpga"
O
N
)
option
(
FPGA
"fpga"
O
FF
)
file
(
GLOB_RECURSE PADDLE_MOBILE_CC src/*.cc src/*.cpp src/*.c src/*.mm
)
file
(
GLOB_RECURSE PADDLE_MOBILE_H src/*.h
)
...
...
@@ -139,7 +139,7 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY build)
set
(
CMAKE_RUNTIME_OUTPUT_DIRECTORY build
)
# NET default
set
(
NET
"
FPGAnets
"
CACHE STRING
"select net type"
)
set
(
NET
"
default
"
CACHE STRING
"select net type"
)
set_property
(
CACHE NET PROPERTY STRINGS
"default"
"googlenet"
"mobilenet"
"yolo"
"squeezenet"
"FPGAnets"
)
include
(
"
${
CMAKE_CURRENT_LIST_DIR
}
/tools/op.cmake"
)
...
...
src/io/executor.cpp
浏览文件 @
0062bf52
...
...
@@ -77,7 +77,6 @@ Executor<Dtype, P>::Executor(const framework::Program<Dtype> p, int batch_size,
auto
op_base
=
framework
::
OpRegistry
<
Dtype
>::
CreateOp
(
op
->
Type
(),
op
->
GetInputs
(),
op
->
GetOutputs
(),
op
->
GetAttrMap
(),
program_
.
scope
);
DLOG
<<
"InferShape: "
;
op_base
->
InferShape
();
ops_of_block_
[
*
block_desc
.
get
()].
push_back
(
op_base
);
#ifdef PADDLE_EXECUTOR_MULTITHREAD
...
...
@@ -85,19 +84,15 @@ Executor<Dtype, P>::Executor(const framework::Program<Dtype> p, int batch_size,
#endif
}
}
DLOG
<<
"InitMemory: "
;
if
(
program_
.
combined
)
{
InitCombineMemory
();
}
else
{
InitMemory
();
}
DLOG
<<
"InitMemory end "
;
std
::
shared_ptr
<
framework
::
BlockDesc
>
to_predict_block
=
to_predict_program_
->
Block
(
0
);
auto
&
ops
=
ops_of_block_
[
*
to_predict_block
.
get
()];
for
(
const
auto
&
op
:
ops
)
{
DLOG
<<
"Init op "
<<
op
->
Type
();
op
->
Init
();
}
}
...
...
src/operators/feed_op.h
浏览文件 @
0062bf52
...
...
@@ -37,11 +37,11 @@ class FeedOp : public framework::OperatorBase<DeviceType> {
param_
.
Out
()
->
Resize
(
out_dims
);
}
#ifdef PADDLE_MOBILE_FPGA
__VV
#ifdef PADDLE_MOBILE_FPGA
void
RunImpl
()
const
{
fpga
::
PerformBypass
(
param_
.
FpgaArgs
());
}
void
Init
()
{
const
Tensor
*
input
=
param_
.
InputX
();
auto
input_ptr
=
input
->
data
<
float
>
();
auto
input_ptr
=
input
->
mutable_
data
<
float
>
();
Tensor
*
output
=
param_
.
Out
();
auto
output_ptr
=
output
->
mutable_data
<
half
>
();
fpga
::
BypassArgs
args
;
...
...
src/operators/kernel/fpga/conv_add_kernel.cpp
已删除
100644 → 0
浏览文件 @
10bba751
/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
#ifdef FUSION_CONVADD_OP
#include "operators/kernel/conv_add_kernel.h"
#include "../central-arm-func/conv_add_arm_func.h"
#include "fpga/fpga_quantilization.h"
namespace
paddle_mobile
{
namespace
operators
{
template
<
>
bool
ConvAddKernel
<
CPU
,
float
>::
Init
(
FusionConvAddParam
*
param
)
{
DLOG
<<
">>>>>>>>>>>>>>>>>>>> ConvKernel <<<<<<<<<<<<<<<<<<<<<<<"
;
Tensor
*
filter
=
param
->
Filter
();
fpga
::
quantify_filter
(
filter
);
return
true
;
}
template
<
>
void
ConvAddKernel
<
CPU
,
float
>::
Compute
(
const
FusionConvAddParam
&
param
)
const
{
ConvAddCompute
<
float
>
(
param
);
}
template
class
ConvAddKernel
<
CPU
,
float
>;
}
// namespace operators
}
// namespace paddle_mobile
#endif
src/operators/kernel/fpga/conv_kernel.cpp
已删除
100644 → 0
浏览文件 @
10bba751
/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
#ifdef CONV_OP
#include "operators/kernel/conv_kernel.h"
#include "operators/kernel/central-arm-func/conv_arm_func.h"
namespace
paddle_mobile
{
namespace
operators
{
template
<
>
bool
ConvKernel
<
FPGA
,
float
>::
Init
(
ConvParam
*
param
)
{
return
true
;
}
template
<
>
void
ConvKernel
<
FPGA
,
float
>::
Compute
(
const
ConvParam
&
param
)
const
{
ConvCompute
<
float
>
(
param
);
}
template
class
ConvKernel
<
FPGA
,
float
>;
}
// namespace operators
}
// namespace paddle_mobile
#endif
tools/op.cmake
浏览文件 @
0062bf52
...
...
@@ -82,7 +82,6 @@ if ("FPGAnets" IN_LIST NET)
set
(
CONCAT_OP ON
)
set
(
SOFTMAX_OP ON
)
set
(
DROPOUT_OP ON
)
set
(
FUSION_CONVADD_OP ON
)
# set(CONV_OP ON)
set
(
FOUND_MATCH ON
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录